mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 10:00:03 -04:00
perf pmu: Recognize default_core as a core PMU in more places
The python metrics code used in places like ilist.py passes a
pmu-filter of "default_core" on non-hybrid x86/ARM/.. systems. As a
PMU like "cpu" isn't a literal name match then no PMU matches
"default_core" and the events fail to parse for the metric. Fix the
name matching and PMU lookup for "default_core" and check that it
fixes ilist.py.
Fixes: 74e2dbe7be ("perf tools: Add --pmu-filter option for filtering PMUs")
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed‑by: Qinxin Xia <xiaqinxin@huawei.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
@@ -2660,8 +2660,12 @@ bool perf_pmu__wildcard_match(const struct perf_pmu *pmu, const char *wildcard_t
|
||||
pmu->name,
|
||||
pmu->alias_name,
|
||||
};
|
||||
bool need_fnmatch = strisglob(wildcard_to_match);
|
||||
bool need_fnmatch;
|
||||
|
||||
if (pmu->is_core && !strcmp(wildcard_to_match, "default_core"))
|
||||
return true;
|
||||
|
||||
need_fnmatch = strisglob(wildcard_to_match);
|
||||
if (!strncmp(wildcard_to_match, "uncore_", 7))
|
||||
wildcard_to_match += 7;
|
||||
|
||||
|
||||
@@ -150,6 +150,8 @@ struct perf_pmu *perf_pmus__find(const char *name)
|
||||
bool core_pmu;
|
||||
unsigned int to_read_pmus = 0;
|
||||
|
||||
if (!strcmp(name, "default_core"))
|
||||
return perf_pmus__find_core_pmu();
|
||||
/*
|
||||
* Once PMU is loaded it stays in the list,
|
||||
* so we keep us from multiple reading/parsing
|
||||
|
||||
Reference in New Issue
Block a user