aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/util/session.c
diff options
context:
space:
mode:
authorDapeng Mi <dapeng1.mi@linux.intel.com>2024-09-13 08:47:07 +0000
committerNamhyung Kim <namhyung@kernel.org>2024-09-30 15:23:43 -0700
commit39820ced2aa1fb2453294909651dfc7dd6e6e028 (patch)
treeb37192b518703d14da5523377d9df7fe96004e4d /tools/perf/util/session.c
parentperf evsel: Reduce a variables scope (diff)
downloadwireguard-linux-39820ced2aa1fb2453294909651dfc7dd6e6e028.tar.xz
wireguard-linux-39820ced2aa1fb2453294909651dfc7dd6e6e028.zip
perf x86/topdown: Complete topdown slots/metrics events check
It's not complete to check whether an event is a topdown slots or topdown metrics event by only comparing the event name since user may assign the event by RAW format, e.g. perf stat -e '{instructions,cpu/r400/,cpu/r8300/}' sleep 1 Performance counter stats for 'sleep 1': <not counted> instructions <not counted> cpu/r400/ <not supported> cpu/r8300/ 1.002917796 seconds time elapsed 0.002955000 seconds user 0.000000000 seconds sys The RAW format slots and topdown-be-bound events are not recognized and not regroup the events, and eventually cause error. Thus add two helpers arch_is_topdown_slots()/arch_is_topdown_metrics() to detect whether an event is topdown slots/metrics event by comparing the event config directly, and use these two helpers to replace the original event name comparisons. Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Yongwei Ma <yongwei.ma@intel.com> Link: https://lore.kernel.org/r/20240913084712.13861-2-dapeng1.mi@linux.intel.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/util/session.c')
0 files changed, 0 insertions, 0 deletions