[PATCH v3 03/23] perf expr: Remove jevents case workaround
From: Ian Rogers
Date: Mon Oct 03 2022 - 22:16:43 EST
jevents.py no longer lowercases metrics and altering the case can cause
hashmap lookups to fail, so remove.
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/perf/util/expr.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/tools/perf/util/expr.c b/tools/perf/util/expr.c
index c6827900f8d3..aaacf514dc09 100644
--- a/tools/perf/util/expr.c
+++ b/tools/perf/util/expr.c
@@ -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));
@@ -195,15 +195,6 @@ int expr__add_ref(struct expr_parse_ctx *ctx, struct metric_ref *ref)
return -ENOMEM;
}
- /*
- * 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.
--
2.38.0.rc1.362.ged0d419d3c-goog