diff options
author | Yabin Cui <yabinc@google.com> | 2018-08-13 15:58:25 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2018-08-14 11:10:08 -0700 |
commit | 6e173a4bf8ea66718c7fc9053cd9d2e3f79aa341 (patch) | |
tree | 7efe0585463aa46e86aa76f7fecd51694eddf09d /simpleperf/event_selection_set.h | |
parent | 9d3d54a4642c0b7047fda7555d1eec164b0fd052 (diff) | |
download | extras-6e173a4bf8ea66718c7fc9053cd9d2e3f79aa341.tar.gz |
simpleperf: set kernel resources used for profiling on Android >=Q.
On Android >=Q, some debug system properties are used to set max
sample freq, cpu percentage and kernel buffer size used for recording.
This patches uses these debug properties to set needed kernel resources.
To set cpu percentage used for recording, add --cpu-percent option.
Bug: 110706031
Test: run simpleperf_unit_test.
Change-Id: I532ce417099c5a39ae89bdadfe76e512241904dd
Diffstat (limited to 'simpleperf/event_selection_set.h')
-rw-r--r-- | simpleperf/event_selection_set.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/simpleperf/event_selection_set.h b/simpleperf/event_selection_set.h index 3f17522a..b929afb1 100644 --- a/simpleperf/event_selection_set.h +++ b/simpleperf/event_selection_set.h @@ -39,6 +39,8 @@ namespace simpleperf { constexpr double DEFAULT_PERIOD_TO_DETECT_CPU_HOTPLUG_EVENTS_IN_SEC = 0.5; constexpr double DEFAULT_PERIOD_TO_CHECK_MONITORED_TARGETS_IN_SEC = 1; +constexpr uint64_t DEFAULT_SAMPLE_FREQ_FOR_NONTRACEPOINT_EVENT = 4000; +constexpr uint64_t DEFAULT_SAMPLE_PERIOD_FOR_TRACEPOINT_EVENT = 1; struct CounterInfo { pid_t tid; |