diff options
author | Yabin Cui <yabinc@google.com> | 2016-07-08 13:56:48 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2016-07-12 15:18:49 -0700 |
commit | 6173592d3d086b8e493590d626fdbdb4e344c433 (patch) | |
tree | 74412077b3158288e4a7a078bfe144e42d2710db /simpleperf/event_selection_set.h | |
parent | b17b6c3edf1c4027f38683dd97458a7aea176dc4 (diff) | |
download | extras-6173592d3d086b8e493590d626fdbdb4e344c433.tar.gz |
simpleperf: combine mapped buffer used for the same event and cpu.
Non root users have a size limit of buffers used for profiling.
By combining buffers used for the same event and cpu, we can
reduce buffer cost when monitoring multiple threads, thus
avoid mmap() failures.
Increase default value for -m option for non system wide profiling.
Bug: 28911532
Change-Id: I91148061eb54840c144cf72e7bb901e7b74897ec
Test: run simpleperf_unit_test.
Diffstat (limited to 'simpleperf/event_selection_set.h')
-rw-r--r-- | simpleperf/event_selection_set.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/simpleperf/event_selection_set.h b/simpleperf/event_selection_set.h index d393a3b8..87bdeab7 100644 --- a/simpleperf/event_selection_set.h +++ b/simpleperf/event_selection_set.h @@ -88,8 +88,7 @@ class EventSelectionSet { bool OpenEventFilesForCpus(const std::vector<int>& cpus); bool OpenEventFilesForThreadsOnCpus(const std::vector<pid_t>& threads, std::vector<int> cpus); bool ReadCounters(std::vector<CountersInfo>* counters); - void PrepareToPollForEventFiles(std::vector<pollfd>* pollfds); - bool MmapEventFiles(size_t mmap_pages); + bool MmapEventFiles(size_t mmap_pages, std::vector<pollfd>* pollfds); void PrepareToReadMmapEventData(std::function<bool (Record*)> callback); bool ReadMmapEventData(); bool FinishReadMmapEventData(); |