summaryrefslogtreecommitdiff
path: root/simpleperf/record_file.h
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2018-02-02 14:18:40 -0800
committerYabin Cui <yabinc@google.com>2018-02-05 16:13:26 -0800
commitc3bf9d08671e8d41d24eeb5978a01b2dd40d0bc4 (patch)
tree29c18a6c1cf5e761a0ec45616e0204a2f2ffa3d6 /simpleperf/record_file.h
parentb58c9fa94cd59bf492e0bfd364e3f1dafc134b2f (diff)
downloadextras-c3bf9d08671e8d41d24eeb5978a01b2dd40d0bc4.tar.gz
simpleperf: add debug-unwind cmd.
Currently, we use --log debug option in record cmd to debug offline unwinding. However, it has below disadvantages: 1. It adds extra complexity in record cmd. 2. It doesn't keep reg/stack data of samples. 3. It isn't convenient to reproduce samples in problem. Because each time recording gets different samples. 4. It isn't very suitable for performance test of unwinding, for the same reason as item 3. So instead, this CL adds debug-unwind cmd focusing on debugging and testing offline unwinding. It solves problems mentioned above. Also change unwinding_result_reporter.py to make it work with perf.data generated by debug-unwind cmd. Bug: http://b/72556486 Test: run simpleperf_unit_test. Test: run unwinding_result_reporter.py manually. Change-Id: I11cdf1eba993f48d61ef9891ad1be54d29679fdb
Diffstat (limited to 'simpleperf/record_file.h')
-rw-r--r--simpleperf/record_file.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/simpleperf/record_file.h b/simpleperf/record_file.h
index 4e09d48e..00b8a344 100644
--- a/simpleperf/record_file.h
+++ b/simpleperf/record_file.h
@@ -54,11 +54,13 @@ class RecordFileWriter {
bool WriteFeatureString(int feature, const std::string& s);
bool WriteCmdlineFeature(const std::vector<std::string>& cmdline);
bool WriteBranchStackFeature();
+ bool WriteFileFeatures(const std::vector<Dso*>& files);
bool WriteFileFeature(const std::string& file_path,
uint32_t file_type,
uint64_t min_vaddr,
const std::vector<const Symbol*>& symbols);
bool WriteMetaInfoFeature(const std::unordered_map<std::string, std::string>& info_map);
+ bool WriteFeature(int feature, const std::vector<char>& data);
bool EndWriteFeatures();
bool Close();