]> git.baikalelectronics.ru Git - kernel.git/commit
perf stat: Do not allow --for-each-cgroup without cpu
authorNamhyung Kim <namhyung@kernel.org>
Mon, 30 Aug 2021 17:02:00 +0000 (10:02 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 30 Aug 2021 21:22:23 +0000 (18:22 -0300)
commitc75b36926aff4d292a695768a29d57340928b678
tree48155858a50738238d3935e93d8c474f5ba23132
parent72630ad905d6f12eb79b82e5ed774965dbc9b32c
perf stat: Do not allow --for-each-cgroup without cpu

The cgroup mode should work with cpu events.  Warn if --for-each-cgroup
option is used with a task target like existing -G option.

  # perf stat --for-each-cgroup . sleep 1
  both cgroup and no-aggregation modes only available in system-wide mode

   Usage: perf stat [<options>] [<command>]

      -G, --cgroup <name>   monitor event in cgroup name only
      -A, --no-aggr         disable CPU count aggregation
      -a, --all-cpus        system-wide collection from all CPUs
          --for-each-cgroup <name>
                            expand events for each cgroup

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20210830170200.55652-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-stat.c