diff options
| author | Namhyung Kim <[email protected]> | 2022-11-14 23:02:26 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2022-11-16 12:51:23 +0000 |
| commit | 67f8b7eb4e9195d037b60f1614880234aca15fee (patch) | |
| tree | 41ef70573a46bca93cd2877b57bfa71d69259d62 /tools/perf/util/scripting-engines/trace-event-python.c | |
| parent | perf stat: Factor out print_metric_{begin,end}() (diff) | |
| download | kernel-67f8b7eb4e9195d037b60f1614880234aca15fee.tar.gz kernel-67f8b7eb4e9195d037b60f1614880234aca15fee.zip | |
perf stat: Support --for-each-cgroup and --metric-only
When we have events for each cgroup, the metric should be printed for
each cgroup separately. Add print_cgroup_counter() to handle that
situation properly.
Also change print_metric_headers() not to print duplicate headers
by checking cgroups.
$ perf stat -a --for-each-cgroup system.slice,user.slice --metric-only sleep 1
Performance counter stats for 'system wide':
GHz insn per cycle branch-misses of all branches
system.slice 3.792 0.61 3.24%
user.slice 3.661 2.32 0.37%
1.016111516 seconds time elapsed
Signed-off-by: Namhyung Kim <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Athira Jajeev <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Xing Zhengjun <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions
