[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170301064924.32172-6-andi@firstfloor.org>
Date: Tue, 28 Feb 2017 22:49:19 -0800
From: Andi Kleen <andi@...stfloor.org>
To: acme@...nel.org
Cc: jolsa@...nel.org, linux-kernel@...r.kernel.org,
Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH 05/10] perf, tools: Special case uncore_ prefix
From: Andi Kleen <ak@...ux.intel.com>
Special case uncore_ prefix in PMU match, to allow for shorter event
uncore specifications.
Before
perf stat -a -e uncore_cbox/event=0x35,umask=0x1,filter_opc=0x19C/ sleep 1
After
perf stat -a -e cbox/event=0x35,umask=0x1,filter_opc=0x19C/ sleep 1
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
tools/perf/util/parse-events.y | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index 3209f18cd5d8..eed371b971a8 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -239,6 +239,9 @@ PE_NAME opt_event_config
while ((pmu = perf_pmu__scan(pmu)) != NULL) {
char *name = pmu->name;
+ if (!strncmp(name, "uncore_", 7) &&
+ strncmp($1, "uncore_", 7))
+ name += 7;
if (!strncmp($1, name, strlen($1))) {
if (parse_events_copy_term_list(orig_terms, &terms))
YYABORT;
--
2.9.3
Powered by blists - more mailing lists