Messages in this thread Patch in this message | | | Date | Wed, 28 Sep 2022 00:21:44 -0700 | Subject | [PATCH v1 02/22] perf expr: Remove jevents case workaround | From | Ian Rogers <> |
| |
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> --- 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.37.3.998.g577e59143f-goog
| |