Skip to contentSkip to conversation

perf parse-events: Ignore case in topdown.slots check

PATCH Applied Ian Rogers 2 participants 2 messages Mar 17, 2022 – Mar 18, 2022 perf events

lore
Share & tools
lore

Ian Rogers

author reviewer
#0 lore raw

PATCH 1/1 perf parse-events: Ignore case in topdown.slots check

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 94dbfd6781a0 ("perf parse-events: Architecture specific leader override")
---
 tools/perf/arch/x86/util/evlist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/arch/x86/util/evlist.c +1 -1
index f924246eff78..8d9b55959256 100644
@@ -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;
Signature · 1 line
2.35.1.894.gb6a874cedc-goog
maintainer Applied
#1 lore raw

Em Thu, Mar 17, 2022 at 03:43:09PM -0700, Ian Rogers escreveu:

Quoted 3 lines

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.

Thanks, applied.

- Arnaldo

Quoted 22 lines
Fixes 94dbfd6781a0 ("perf parse-events: Architecture specific leader override")
---
 tools/perf/arch/x86/util/evlist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/arch/x86/util/evlist.c +1 -1
index f924246eff78..8d9b55959256 100644
@@ -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;
Signature · 1 line
2.35.1.894.gb6a874cedc-goog
Signature · 1 line
- Arnaldo