summaryrefslogtreecommitdiff
path: root/simpleperf/doc
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2020-05-14 14:07:39 -0700
committerYabin Cui <yabinc@google.com>2020-05-14 14:07:39 -0700
commit2e7d0e9bb7ff17cab4fb7db34dec08c0994eb703 (patch)
tree63e59e991ed350984cf93a4d8a3bdf7386262d90 /simpleperf/doc
parent2114bfc4c19c201bd5aef5b2f89397e68fb58c4e (diff)
downloadextras-2e7d0e9bb7ff17cab4fb7db34dec08c0994eb703.tar.gz
simpleperf: add doc for pmu counter limit.
Bug: none Test: none Change-Id: I8e76b5e6ac6c55080458fab57aabc6e4adc19393
Diffstat (limited to 'simpleperf/doc')
-rw-r--r--simpleperf/doc/android_platform_profiling.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/simpleperf/doc/android_platform_profiling.md b/simpleperf/doc/android_platform_profiling.md
index ed641259..797d640a 100644
--- a/simpleperf/doc/android_platform_profiling.md
+++ b/simpleperf/doc/android_platform_profiling.md
@@ -5,6 +5,7 @@
- [Table of Contents](#table-of-contents)
- [General Tips](#general-tips)
- [Start simpleperf from system_server process](#start-simpleperf-from-systemserver-process)
+ - [Hardware PMU counter limit](#hardware-pmu-counter-limit)
## General Tips
@@ -66,3 +67,15 @@ try {
e.printStackTrace();
}
```
+
+## Hardware PMU counter limit
+
+When monitoring instruction and cache related perf events (in hw/cache/raw/pmu category of list cmd),
+these events are mapped to PMU counters on each cpu core. But each core only has a limited number
+of PMU counters. If number of events > number of PMU counters, then the counters are multiplexed
+among events, which probably isn't what we want.
+
+On Pixel devices, the number of PMU counters on each core is usually 7, of which 4 of them are used
+by the kernel to monitor memory latency. So only 3 counters are available. It's fine to monitor up
+to 3 PMU events at the same time. To monitor more than 3 events, the `--use-devfreq-counters` option
+can be used to borrow from the counters used by the kernel.