linux-stable/tools/perf
Namhyung Kim 4dd7ff4a03 perf stat: Add print_aggr_cgroup() for --for-each-cgroup and --topdown
Normally, --for-each-cgroup only works with AGGR_GLOBAL.  However
the --topdown on some cpu (e.g. Intel Skylake) converts it to the
AGGR_CORE internally.

To support those machines, add print_aggr_cgroup and handle the events
like in print_cgroup_events().

  $ perf stat -a --for-each-cgroup system.slice,user.slice --topdown sleep 1
  nmi_watchdog enabled with topdown. May give wrong results.
  Disable with echo 0 > /proc/sys/kernel/nmi_watchdog

   Performance counter stats for 'system wide':

                               retiring   bad speculation  frontend bound  backend bound
  S0-D0-C0  2  system.slice       49.0%            -46.6%           31.4%
  S0-D0-C1  2  system.slice       55.5%              8.0%           45.5%          -9.0%
  S0-D0-C2  2  system.slice       87.8%             22.1%           30.3%         -40.3%
  S0-D0-C3  2  system.slice       53.3%            -11.9%           45.2%          13.4%
  S0-D0-C0  2  user.slice        123.5%              4.0%           48.5%         -75.9%
  S0-D0-C1  2  user.slice         19.9%              6.5%           89.9%         -16.3%
  S0-D0-C2  2  user.slice         29.9%              7.9%           71.3%          -9.1
  S0-D0-C3  2  user.slice         28.0%              7.2%           43.3%          21.5%

         1.004136937 seconds time elapsed

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
Link: https://lore.kernel.org/r/20221114230227.1255976-20-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2022-11-16 09:51:23 -03:00
..
Documentation perf list: Generalize limiting to a PMU name 2022-11-15 10:25:48 -03:00
arch perf intel-pt: Add hybrid CPU compatibility test 2022-11-09 15:23:12 -03:00
bench perf tools: Move 'struct perf_sample' to a separate header file to disentangle headers 2022-10-31 11:06:41 -03:00
dlfilters perf dlfilter dlfilter-show-cycles: Fix types for print format 2022-09-08 12:17:45 -03:00
examples/bpf perf trace: Add augmenter for clock_gettime's rqtp timespec arg 2022-11-10 15:30:10 -03:00
include/perf perf bpf: Remove now unused BPF headers 2022-11-04 11:41:48 -03:00
jvmti
pmu-events perf vendor events: Add Arm Neoverse V2 PMU events 2022-11-10 15:41:18 -03:00
python perf python: Convert tracepoint.py example to python3 2022-04-01 16:19:35 -03:00
scripts perf scripts python: intel-pt-events.py: Add ability interleave output 2022-10-27 16:37:26 -03:00
tests Merge remote-tracking branch 'torvalds/master' into perf/core 2022-11-14 16:12:23 -03:00
trace perf trace: Add augmenter for clock_gettime's rqtp timespec arg 2022-11-10 15:30:10 -03:00
ui perf tools: Fix "kernel lock contention analysis" test by not printing warnings in quiet mode 2022-10-27 16:37:26 -03:00
util perf stat: Add print_aggr_cgroup() for --for-each-cgroup and --topdown 2022-11-16 09:51:23 -03:00
.gitignore perf tools: Add the include/perf/ directory to .gitignore 2022-11-08 18:54:41 -03:00
Build perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue) 2022-07-26 16:01:24 -03:00
CREDITS
MANIFEST
Makefile
Makefile.config perf bpf: Rename perf_include_dir to libbpf_include_dir 2022-11-04 11:45:36 -03:00
Makefile.perf perf bpf: Remove now unused BPF headers 2022-11-04 11:41:48 -03:00
builtin-annotate.c perf tools: Make quiet mode consistent between tools 2022-10-27 16:37:26 -03:00
builtin-bench.c perf bench: Add breakpoint benchmarks 2022-05-13 11:00:38 -03:00
builtin-buildid-cache.c
builtin-buildid-list.c perf buildid-list: Add a "-m" option to show kernel and modules build-ids 2022-07-18 16:35:34 -03:00
builtin-c2c.c perf mem/c2c: Set PERF_SAMPLE_WEIGHT for LOAD_STORE events 2022-10-06 16:29:32 -03:00
builtin-config.c
builtin-daemon.c perf daemon: Use sig_atomic_t to avoid UB 2022-11-03 09:35:44 -03:00
builtin-data.c perf data: Don't mention --to-ctf if it's not supported 2022-02-22 21:23:08 -03:00
builtin-diff.c perf tools: Make quiet mode consistent between tools 2022-10-27 16:37:26 -03:00
builtin-evlist.c
builtin-ftrace.c perf ftrace: Use sig_atomic_t to avoid UB 2022-11-03 09:36:09 -03:00
builtin-help.c
builtin-inject.c perf dso: Hold lock when accessing nsinfo 2022-10-04 08:55:20 -03:00
builtin-kallsyms.c
builtin-kmem.c perf tools: Enhance the matching of sub-commands abbreviations 2022-03-26 10:55:57 -03:00
builtin-kvm.c perf kvm: Fix subcommand matching error 2022-08-10 10:44:02 -03:00
builtin-kwork.c perf kwork: Remove includes not needed in kwork.h 2022-10-31 11:06:46 -03:00
builtin-list.c perf list: Generalize limiting to a PMU name 2022-11-15 10:25:48 -03:00
builtin-lock.c perf lock: Allow concurrent record and report 2022-11-10 15:34:19 -03:00
builtin-mem.c perf tools: Move 'struct perf_sample' to a separate header file to disentangle headers 2022-10-31 11:06:41 -03:00
builtin-probe.c perf tools: Make quiet mode consistent between tools 2022-10-27 16:37:26 -03:00
builtin-record.c perf record: Use sig_atomic_t for signal handlers 2022-11-03 09:34:40 -03:00
builtin-report.c perf tools: Make quiet mode consistent between tools 2022-10-27 16:37:26 -03:00
builtin-sched.c perf sched: Factor out destroy_tasks() 2022-10-04 08:55:21 -03:00
builtin-script.c perf stat: Allocate evsel->stats->aggr properly 2022-10-27 16:37:25 -03:00
builtin-stat.c perf stat: Clear screen only if output file is a tty 2022-11-16 09:51:22 -03:00
builtin-timechart.c perf timechart: Add p_state_end helper 2022-10-04 08:55:21 -03:00
builtin-top.c perf top: Use sig_atomic_t to avoid undefined behaviour in a signal handler 2022-11-03 09:38:01 -03:00
builtin-trace.c perf trace: Add augmenter for clock_gettime's rqtp timespec arg 2022-11-10 15:30:10 -03:00
builtin-version.c perf version: Add HAVE_DEBUGINFOD_SUPPORT to built-in features 2022-04-20 13:32:09 -03:00
builtin.h perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue) 2022-07-26 16:01:24 -03:00
check-headers.sh tools headers: Update the copy of x86's memcpy_64.S used in 'perf bench' 2022-10-25 17:40:48 -03:00
command-list.txt perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue) 2022-07-26 16:01:24 -03:00
design.txt
perf-archive.sh
perf-completion.sh
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf tools: Add same_cmd_with_prefix() helper 2022-10-04 08:55:21 -03:00
perf.h