Re: [PATCH] perf list: Skip the invalid hybrid pmu

From: Jin, Yao
Date: Wed Jul 07 2021 - 03:24:39 EST


Hi Jiri,

On 7/7/2021 3:58 AM, Jiri Olsa wrote:
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 88c8ecdc60b0..281670e9c4bd 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -1604,6 +1604,9 @@ void print_pmu_events(const char *event_glob, bool name_only, bool quiet_flag,
pmu = NULL;
j = 0;
while ((pmu = perf_pmu__scan(pmu)) != NULL) {
+ if (perf_pmu__is_invalid_hybrid(pmu->name))
+ continue;
hum why not detect it in pmu_lookup early on
and not add that pmu at all?

thanks,
jirka


Yes, it's a good idea that detects it in pmu_lookup, thanks!

Thanks
Jin Yao