summaryrefslogtreecommitdiff
path: root/doc/executable_commands_reference.md
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2024-02-08 12:09:02 -0800
committerYabin Cui <yabinc@google.com>2024-02-13 12:49:55 -0800
commitec4d791d52db4e98eba9544c1b865215d29b6634 (patch)
tree37b36f97cb66fd41ffd9231289c023360ffb4f9d /doc/executable_commands_reference.md
parentfcf547baf46e6aa4c9ce93eee7f4d0edc7f90bc6 (diff)
downloadsimpleperf-master.tar.gz
Update NDK prebuilts to build 11421629.HEADndk-r27-rc1ndk-r27-releasemastermain
Taken from branch aosp-simpleperf-release. Bug: 323599819 Test: run test/test.py on android N-V for emulators and devices Test: run test/test.py on darwin/linux/windows Change-Id: I496b28ebf26e11687a45da0ce5c560ff143c49a0
Diffstat (limited to 'doc/executable_commands_reference.md')
-rw-r--r--doc/executable_commands_reference.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/executable_commands_reference.md b/doc/executable_commands_reference.md
index 0e29fbf..b5c051a 100644
--- a/doc/executable_commands_reference.md
+++ b/doc/executable_commands_reference.md
@@ -333,6 +333,27 @@ $ su 0 simpleperf stat --per-core -a --duration 1
$ su 0 simpleperf stat -e cpu-cycles -a --per-thread --per-core --duration 1
```
+### Monitor different events on different cores
+
+Android devices usually have big and little cores. Different cores may support different events.
+Therefore, we may want to monitor different events on different cores. We can do this using
+the `--cpu` option. The `--cpu` option selects the cores on which to monitor events. A `--cpu`
+option affects all the following events until meeting another `--cpu` option. The first `--cpu`
+option also affects all events before it. Following are some examples:
+
+```sh
+# By default, cpu-cycles and instructions are monitored on all cpus.
+$ su 0 simpleperf stat -e cpu-cycles,instructions -a --duration 1 --per-core
+
+# Use one `--cpu` option to monitor cpu-cycles and instructions only on cpu 0-3,8.
+$ su 0 simpleperf stat -e cpu-cycles --cpu 0-3,8 -e instructions -a --duration 1 --per-core
+
+# Use two `--cpu` options to monitor raw-l3d-cache-refill-rd on cpu 0-3, and raw-l3d-cache-refill on
+# cpu 4-8.
+$ su 0 simpleperf stat --cpu 0-3 -e raw-l3d-cache-refill-rd --cpu 4-8 -e raw-l3d-cache-refill \
+ -a --duration 1 --per-core
+```
+
## The record command
The record command is used to dump samples of the profiled processes. Each sample can contain