diff options
author | Yabin Cui <yabinc@google.com> | 2018-04-18 13:10:40 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2018-04-20 18:18:45 -0700 |
commit | acf04b213d334df8880aa324711a03a8a91ffa07 (patch) | |
tree | eaf0ca754d9e7b9f0c7d2bf13600faba72e2a3fc /simpleperf/record_file.h | |
parent | ddb48c1cac7442b8aa7b7b2487c074da449eb3a0 (diff) | |
download | extras-acf04b213d334df8880aa324711a03a8a91ffa07.tar.gz |
simpleperf: add --size-limit option in record cmd.
--size-limit option stops recording when the recorded data
reaches the size limit. It is used by
run_simpleperf_without_usb_connection.py to avoid taking too much disk
space.
Bug: http://b/74198167
Test: run simpleperf_unit_test.
Test: run test.py.
Change-Id: I11f0023c342c50e1cf8035430e6af1b3caa329e7
Diffstat (limited to 'simpleperf/record_file.h')
-rw-r--r-- | simpleperf/record_file.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/simpleperf/record_file.h b/simpleperf/record_file.h index c90b2692..4ec6c31c 100644 --- a/simpleperf/record_file.h +++ b/simpleperf/record_file.h @@ -47,6 +47,7 @@ class RecordFileWriter { bool WriteAttrSection(const std::vector<EventAttrWithId>& attr_ids); bool WriteRecord(const Record& record); + uint64_t GetDataSectionSize() const { return data_section_size_; } bool ReadDataSection(const std::function<void(const Record*)>& callback); bool BeginWriteFeatures(size_t feature_count); |