diff options
| author | Ian Rogers <[email protected]> | 2025-07-19 03:05:07 +0000 |
|---|---|---|
| committer | Namhyung Kim <[email protected]> | 2025-07-24 20:41:35 +0000 |
| commit | 175c852325a1f566426e2470e5d5d67efc7621dd (patch) | |
| tree | dce45d5597579302daf7ef0dd8bf2c64d9d7c513 /tools/perf/util/scripting-engines/trace-event-python.c | |
| parent | perf parse-events: Allow the cpu term to be a PMU or CPU range (diff) | |
| download | kernel-175c852325a1f566426e2470e5d5d67efc7621dd.tar.gz kernel-175c852325a1f566426e2470e5d5d67efc7621dd.zip | |
perf tool_pmu: Allow num_cpus(_online) to be specific to a cpumask
For hybrid metrics it is useful to know the number of p-core or e-core
CPUs. If a cpumask is specified for the num_cpus or num_cpus_online
tool events, compute the value relative to the given mask rather than
for the full system.
```
$ sudo /tmp/perf/perf stat -e 'tool/num_cpus/,tool/num_cpus,cpu=cpu_core/,
tool/num_cpus,cpu=cpu_atom/,tool/num_cpus_online/,tool/num_cpus_online,
cpu=cpu_core/,tool/num_cpus_online,cpu=cpu_atom/' true
Performance counter stats for 'true':
28 tool/num_cpus/
16 tool/num_cpus,cpu=cpu_core/
12 tool/num_cpus,cpu=cpu_atom/
28 tool/num_cpus_online/
16 tool/num_cpus_online,cpu=cpu_core/
12 tool/num_cpus_online,cpu=cpu_atom/
0.000767205 seconds time elapsed
0.000938000 seconds user
0.000000000 seconds sys
```
Reviewed-by: Thomas Falcon <[email protected]>
Signed-off-by: Ian Rogers <[email protected]>
Tested-by: James Clark <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions
