]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf stat: Choose the most disaggregate command line option
authorIan Rogers <irogers@google.com>
Wed, 5 Jun 2024 06:38:28 +0000 (23:38 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 7 Jun 2024 20:00:03 +0000 (13:00 -0700)
commitf5803651b4a4b67d9521994d501619a0d8ff3b11
tree8b9516b7cd44512ef22d521f74b68d2d40ff4707
parent0dddd91ab68fed4fe12b69fe225cb00a4ea16126
perf stat: Choose the most disaggregate command line option

When multiple aggregation options are passed to perf stat the behavior
isn't clear. Consider "perf stat -A --per-socket .." and "perf stat
--per-socket -A ..", the first won't aggregate at all while the second
will do per-socket aggregation, even though the same options were
passed.

Rather than set an enum value, gather the options in a struct and
process them from most to least aggregate. This ensures the least
aggregate option always applies, so no aggregation if "-A" is passed.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240605063828.195700-2-irogers@google.com
tools/perf/builtin-stat.c