summaryrefslogtreecommitdiff
path: root/simpleperf/environment.h
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2017-03-06 17:05:50 -0800
committerYabin Cui <yabinc@google.com>2017-03-06 17:08:54 -0800
commit0720d488b902fa5ddea20813dfaf34e942218c48 (patch)
tree2dc4195408859db0ea3082a5dbba441915b5172f /simpleperf/environment.h
parent0e82c84abaa3a6368d17545d9f9e494f462c95cd (diff)
downloadextras-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.h1
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();