diff options
author | Yabin Cui <yabinc@google.com> | 2018-06-18 17:44:27 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2018-06-18 17:51:01 -0700 |
commit | 8b5a352cbfd70935eeeae507e165018812f18991 (patch) | |
tree | af5cf06db56e3f4aa9f86f330d6e7e80380cded6 /simpleperf/record_file.h | |
parent | 9e00d29710a22146f7a2a525807540c7a6a0bbd3 (diff) | |
download | extras-8b5a352cbfd70935eeeae507e165018812f18991.tar.gz |
simpleperf: remove RecordCache.
When using debug-unwind cmd for system wide profiling result, I
found it might took a lot of memory because RecordCache cached
too many samples. Since simpleperf no longer relies on RecordCache
to sort records, I think it is fine to remove RecordCache instead
of fixing it.
Bug: none.
Test: run simpleperf_unit_test.
Change-Id: Ie28ce17b4158add455004a56bbdac745f9d05f19
Diffstat (limited to 'simpleperf/record_file.h')
-rw-r--r-- | simpleperf/record_file.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/simpleperf/record_file.h b/simpleperf/record_file.h index 4ec6c31c..185862a8 100644 --- a/simpleperf/record_file.h +++ b/simpleperf/record_file.h @@ -130,13 +130,12 @@ class RecordFileReader { // is by calling ReadRecord() in a loop. // If sorted is true, sort records before passing them to callback function. - bool ReadDataSection(const std::function<bool(std::unique_ptr<Record>)>& callback, - bool sorted = true); + bool ReadDataSection(const std::function<bool(std::unique_ptr<Record>)>& callback); // Read next record. If read successfully, set [record] and return true. // If there is no more records, set [record] to nullptr and return true. // Otherwise return false. - bool ReadRecord(std::unique_ptr<Record>& record, bool sorted = true); + bool ReadRecord(std::unique_ptr<Record>& record); size_t GetAttrIndexOfRecord(const Record* record); @@ -183,7 +182,6 @@ class RecordFileReader { size_t event_id_pos_in_sample_records_; size_t event_id_reverse_pos_in_non_sample_records_; - std::unique_ptr<RecordCache> record_cache_; uint64_t read_record_size_; DISALLOW_COPY_AND_ASSIGN(RecordFileReader); |