aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/bin/task-analyzer-record
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2025-08-25 14:12:04 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2025-09-12 15:53:32 -0300
commit035c17893082b403c98330f1fdb58fd925951038 (patch)
treeded7894a9e341d60ae2f7a5ccfefee5c3d21b212 /tools/perf/scripts/python/bin/task-analyzer-record
parentperf stat: Don't skip failing group events (diff)
downloadlinux-035c17893082b403c98330f1fdb58fd925951038.tar.gz
linux-035c17893082b403c98330f1fdb58fd925951038.zip
perf parse-events: Add 'X' modifier to exclude an event from being regrouped
The function parse_events__sort_events_and_fix_groups is needed to fix uncore events like: ``` $ perf stat -e '{data_read,data_write}' ... ``` so that the multiple uncore PMUs have a group each of data_read and data_write events. The same function will perform architecture sorting and group fixing, in particular for Intel topdown/perf-metric events. Grouping multiple perf metric events together causes perf_event_open to fail as the group can only support one. This means command lines like: ``` $ perf stat -e 'slots,slots' ... ``` fail as the slots events are forced into a group together to try to satisfy the perf-metric event constraints. As the user may know better than parse_events__sort_events_and_fix_groups add a 'X' modifier to skip its regrouping behavior. This allows the following to succeed rather than fail on the second slots event being opened: ``` $ perf stat -e 'slots,slots:X' -a sleep 1 Performance counter stats for 'system wide': 6,834,154,071 cpu_core/slots/ (50.13%) 5,548,629,453 cpu_core/slots/X (49.87%) 1.002634606 seconds time elapsed ``` Closes: https://lore.kernel.org/lkml/20250822082233.1850417-1-dapeng1.mi@linux.intel.com/ Reported-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Reported-by: Xudong Hao <xudong.hao@intel.com> Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Falcon <thomas.falcon@intel.com> Cc: Yoshihiro Furudera <fj5100bi@fujitsu.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/task-analyzer-record')
0 files changed, 0 insertions, 0 deletions