summaryrefslogtreecommitdiff
path: root/simpleperf/record_file_test.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-10-24 13:38:38 -0700
committerYabin Cui <yabinc@google.com>2016-10-31 10:40:03 -0700
commitc5b4a3106a0845d1bd8fd2c1b1c724eeb719ec62 (patch)
tree8d045224b547f708cadcd4c7c23476b0a78e262e /simpleperf/record_file_test.cpp
parentd2fcab88ef855a9a415159b669f7ea7e00f5a575 (diff)
downloadextras-c5b4a3106a0845d1bd8fd2c1b1c724eeb719ec62.tar.gz
simpleperf: dump file feature section.
For `record --dump-symbols` option, change from dumping DsoRecord and SymbolRecord to dumping file feature section. It is to avoid reading symbols from elf files during recording, which takes a lot of time. And we don't want to mix optional data (the symbol tables) with necessary data (the profiling records). Bug: http://b/32340274 Test: run simpleperf_unit_test. Test: run simpleperf runtest.py. Change-Id: I0a387de243afac93486fc885f223a58060ec07f4
Diffstat (limited to 'simpleperf/record_file_test.cpp')
-rw-r--r--simpleperf/record_file_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/simpleperf/record_file_test.cpp b/simpleperf/record_file_test.cpp
index 2d619a2f..4fe725b9 100644
--- a/simpleperf/record_file_test.cpp
+++ b/simpleperf/record_file_test.cpp
@@ -66,7 +66,7 @@ TEST_F(RecordFileTest, smoke) {
ASSERT_TRUE(writer->WriteRecord(mmap_record));
// Write feature section.
- ASSERT_TRUE(writer->WriteFeatureHeader(1));
+ ASSERT_TRUE(writer->BeginWriteFeatures(1));
char p[BuildId::Size()];
for (size_t i = 0; i < BuildId::Size(); ++i) {
p[i] = i;
@@ -75,6 +75,7 @@ TEST_F(RecordFileTest, smoke) {
std::vector<BuildIdRecord> build_id_records;
build_id_records.push_back(BuildIdRecord(false, getpid(), build_id, "init"));
ASSERT_TRUE(writer->WriteBuildIdFeature(build_id_records));
+ ASSERT_TRUE(writer->EndWriteFeatures());
ASSERT_TRUE(writer->Close());
// Read from a record file.