diff options
author | Yabin Cui <yabinc@google.com> | 2017-03-06 17:05:50 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2017-03-06 17:08:54 -0800 |
commit | 0720d488b902fa5ddea20813dfaf34e942218c48 (patch) | |
tree | 2dc4195408859db0ea3082a5dbba441915b5172f /simpleperf/environment.h | |
parent | 0e82c84abaa3a6368d17545d9f9e494f462c95cd (diff) | |
download | extras-0720d488b902fa5ddea20813dfaf34e942218c48.tar.gz |
simpleperf: adjust sample_freq based on max_sample_rate file.
Starting from kernel 4.4, perf_event_max_sample_rate can be
adjusted dynamically by the kernel to limit the cpu percentage
used to dump records.
Bug: http://b/35554543
Test: echo 100 >/proc/sys/kernel/perf_event_max_sample_rate &&
Test: run CtsSimpleperfTestCases
Change-Id: I75f6cbc124c545d05fd56b07c6a868b7ca15cd8a
Diffstat (limited to 'simpleperf/environment.h')
-rw-r--r-- | simpleperf/environment.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/simpleperf/environment.h b/simpleperf/environment.h index 16df6906..11eee2ff 100644 --- a/simpleperf/environment.h +++ b/simpleperf/environment.h @@ -69,6 +69,7 @@ bool GetThreadName(pid_t tid, std::string* name); bool GetValidThreadsFromThreadString(const std::string& tid_str, std::set<pid_t>* tid_set); bool CheckPerfEventLimit(); +bool GetMaxSampleFrequency(uint64_t* max_sample_freq); bool CheckSampleFrequency(uint64_t sample_freq); bool CheckKernelSymbolAddresses(); |