perf parse-events: Ignore case in topdown.slots check
authorIan Rogers <irogers@google.com>
Thu, 17 Mar 2022 22:43:09 +0000 (15:43 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 18 Mar 2022 21:39:09 +0000 (18:39 -0300)
An issue with icelakex metrics:

  https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/perf/pmu-events/arch/x86/icelakex/icx-metrics.json?h=perf/core&id=65eab2bc7dab326ee892ec5a4c749470b368b51a#n48

That causes the slots not to be first.

Fixes: 94dbfd6781a0e87b ("perf parse-events: Architecture specific leader override")
Reported-by: Caleb Biggers <caleb.biggers@intel.com>
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.garry@huawei.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Zhengjun Xing <zhengjun.xing@linux.intel.com>
Link: https://lore.kernel.org/r/20220317224309.543736-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/x86/util/evlist.c

index f924246..8d9b559 100644 (file)
@@ -29,7 +29,7 @@ struct evsel *arch_evlist__leader(struct list_head *list)
 
        __evlist__for_each_entry(list, evsel) {
                if (evsel->pmu_name && !strcmp(evsel->pmu_name, "cpu") &&
-                       evsel->name && strstr(evsel->name, "slots"))
+                       evsel->name && strcasestr(evsel->name, "slots"))
                        return evsel;
        }
        return first;