summaryrefslogtreecommitdiff
path: root/tools/perf/arch/x86/util/evlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/arch/x86/util/evlist.c')
-rw-r--r--tools/perf/arch/x86/util/evlist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/arch/x86/util/evlist.c b/tools/perf/arch/x86/util/evlist.c
index 3a4bf13b1759..044bc59482c8 100644
--- a/tools/perf/arch/x86/util/evlist.c
+++ b/tools/perf/arch/x86/util/evlist.c
@@ -10,14 +10,14 @@ int arch_evlist__cmp(const struct evsel *lhs, const struct evsel *rhs)
if (topdown_sys_has_perf_metrics() &&
(arch_evsel__must_be_in_group(lhs) || arch_evsel__must_be_in_group(rhs))) {
/* Ensure the topdown slots comes first. */
- if (strcasestr(lhs->name, "slots") && !strcasestr(lhs->name, "uops_retired.slots"))
+ if (arch_is_topdown_slots(lhs))
return -1;
- if (strcasestr(rhs->name, "slots") && !strcasestr(rhs->name, "uops_retired.slots"))
+ if (arch_is_topdown_slots(rhs))
return 1;
/* Followed by topdown events. */
- if (strcasestr(lhs->name, "topdown") && !strcasestr(rhs->name, "topdown"))
+ if (arch_is_topdown_metrics(lhs) && !arch_is_topdown_metrics(rhs))
return -1;
- if (!strcasestr(lhs->name, "topdown") && strcasestr(rhs->name, "topdown"))
+ if (!arch_is_topdown_metrics(lhs) && arch_is_topdown_metrics(rhs))
return 1;
}