[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220928072204.1613330-3-irogers@google.com>
Date: Wed, 28 Sep 2022 00:21:44 -0700
From: Ian Rogers <irogers@...gle.com>
To: Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
Kan Liang <kan.liang@...ux.intel.com>,
Andi Kleen <ak@...ux.intel.com>, perry.taylor@...el.com,
caleb.biggers@...el.com, kshipra.bopardikar@...el.com,
samantha.alt@...el.com, ahmad.yasin@...el.com,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
John Garry <john.garry@...wei.com>,
James Clark <james.clark@....com>,
Kajol Jain <kjain@...ux.ibm.com>,
Thomas Richter <tmricht@...ux.ibm.com>,
Miaoqian Lin <linmq006@...il.com>,
Florian Fischer <florian.fischer@...q.space>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Stephane Eranian <eranian@...gle.com>,
Ian Rogers <irogers@...gle.com>
Subject: [PATCH v1 02/22] perf expr: Remove jevents case workaround
jevents.py no longer lowercases metrics and altering the case can cause
hashmap lookups to fail, so remove.
Signed-off-by: Ian Rogers <irogers@...gle.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
Powered by blists - more mailing lists