perf expr: Remove jevents case workaround
authorIan Rogers <irogers@google.com>
Tue, 4 Oct 2022 02:15:52 +0000 (19:15 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 6 Oct 2022 11:03:52 +0000 (08:03 -0300)
jevents.py no longer lowercases metrics and altering the case can cause
hashmap lookups to fail, so remove.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Ahmad Yasin <ahmad.yasin@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Caleb Biggers <caleb.biggers@intel.com>
Cc: Florian Fischer <florian.fischer@muhq.space>
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: Kajol Jain <kjain@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Miaoqian Lin <linmq006@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Perry Taylor <perry.taylor@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Samantha Alt <samantha.alt@intel.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
Link: https://lore.kernel.org/r/20221004021612.325521-4-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/expr.c

index c682790..aaacf51 100644 (file)
@@ -182,7 +182,7 @@ int expr__add_ref(struct expr_parse_ctx *ctx, struct metric_ref *ref)
 {
        struct expr_id_data *data_ptr = NULL, *old_data = NULL;
        char *old_key = NULL;
-       char *name, *p;
+       char *name;
        int ret;
 
        data_ptr = zalloc(sizeof(*data_ptr));
@@ -196,15 +196,6 @@ int expr__add_ref(struct expr_parse_ctx *ctx, struct metric_ref *ref)
        }
 
        /*
-        * The jevents tool converts all metric expressions
-        * to lowercase, including metric references, hence
-        * we need to add lowercase name for metric, so it's
-        * properly found.
-        */
-       for (p = name; *p; p++)
-               *p = tolower(*p);
-
-       /*
         * Intentionally passing just const char pointers,
         * originally from 'struct pmu_event' object.
         * We don't need to change them, so there's no