diff options
| author | Dapeng Mi <dapeng1.mi@linux.intel.com> | 2024-10-11 11:02:07 +0000 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2024-10-16 13:36:47 -0700 |
| commit | fbc798316bef1b143e2cd0665cc6079529d6b0db (patch) | |
| tree | bff5c6944865d0218e36f6ce9628561b4954e68f /tools/perf/scripts/python/sctop.py | |
| parent | b68b5b36c790a82522623f9f1fd1c4e1f06aff2d (diff) | |
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: Ian Rogers <irogers@google.com>
Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20241011110207.1032235-2-dapeng1.mi@linux.intel.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions
