Commit fbc79831 authored by Dapeng Mi's avatar Dapeng Mi Committed by Namhyung Kim
Browse files

perf x86/topdown: Refine helper arch_is_topdown_metrics()



Leverage the existed function perf_pmu__name_from_config() to check if
an event is topdown metrics event. perf_pmu__name_from_config() goes
through the defined formats and figures out the config of pre-defined
topdown events.

This avoids to figure out the config of topdown pre-defined events with
hard-coded format strings "event=" and "umask=" and provides more
flexibility.

Suggested-by: default avatarIan Rogers <irogers@google.com>
Signed-off-by: default avatarDapeng Mi <dapeng1.mi@linux.intel.com>
Reviewed-by: default avatarIan Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20241011110207.1032235-2-dapeng1.mi@linux.intel.com


Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
parent b68b5b36
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment