diff options
author | Andi Kleen <ak@linux.intel.com> | 2016-09-16 00:24:53 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-10-04 02:51:48 +0200 |
commit | e312bcf13053970c0f07ec2c02d7d9be1a036ce0 (patch) | |
tree | a1b43d75a4f9858d65eaacc93472d8c302bac5ef /tools | |
parent | perf tools: Allow period= in perf stat CPU event descriptions. (diff) | |
download | linux-e312bcf13053970c0f07ec2c02d7d9be1a036ce0.tar.xz linux-e312bcf13053970c0f07ec2c02d7d9be1a036ce0.zip |
perf tools: Make alias matching case-insensitive
Make alias matching the events parser case-insensitive. This is useful
with the JSON events. perf uses lower case events, but the CPU manuals
generally use upper case event names. The JSON files use lower case by
default too. But if we search case insensitively then users can
cut-n-paste the upper case event names.
So the following works:
% perf stat -e BR_INST_EXEC.TAKEN_INDIRECT_NEAR_CALL true
Performance counter stats for 'true':
305 BR_INST_EXEC.TAKEN_INDIRECT_NEAR_CALL
0.000492799 seconds time elapsed
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/1473978296-20712-17-git-send-email-sukadev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/parse-events.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index d445b1144c87..4e778eae1510 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -1459,7 +1459,7 @@ comp_pmu(const void *p1, const void *p2) struct perf_pmu_event_symbol *pmu1 = (struct perf_pmu_event_symbol *) p1; struct perf_pmu_event_symbol *pmu2 = (struct perf_pmu_event_symbol *) p2; - return strcmp(pmu1->symbol, pmu2->symbol); + return strcasecmp(pmu1->symbol, pmu2->symbol); } static void perf_pmu__parse_cleanup(void) |