Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1590050

[PATCH 05/10] perf, tools: Special case uncore_ prefix

From Andi Kleen <andi@firstfloor.org>
Newsgroups linux.kernel
Subject [PATCH 05/10] perf, tools: Special case uncore_ prefix
Date 2017-03-01 08:00 +0100
Message-ID <tg6oW-7DX-17@gated-at.bofh.it> (permalink)
References <tg6oV-7DX-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Andi Kleen <ak@linux.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@linux.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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

perf: Improve support for uncore JSON event lists Andi Kleen <andi@firstfloor.org> - 2017-03-01 08:00 +0100
  [PATCH 05/10] perf, tools: Special case uncore_ prefix Andi Kleen <andi@firstfloor.org> - 2017-03-01 08:00 +0100
  [PATCH 06/10] perf, tools: Add a simple expression parser for JSON Andi Kleen <andi@firstfloor.org> - 2017-03-01 09:30 +0100
  [PATCH 02/10] perf, tools, stat: Collapse identically named events Andi Kleen <andi@firstfloor.org> - 2017-03-01 09:50 +0100
    Re: [PATCH 02/10] perf, tools, stat: Collapse identically named  events Jiri Olsa <jolsa@redhat.com> - 2017-03-05 19:00 +0100
    Re: [PATCH 02/10] perf, tools, stat: Collapse identically named  events Jiri Olsa <jolsa@redhat.com> - 2017-03-07 11:10 +0100
  [PATCH 08/10] perf, tools, stat: Output JSON MetricExpr metric Andi Kleen <andi@firstfloor.org> - 2017-03-01 12:30 +0100
    Re: [PATCH 08/10] perf, tools, stat: Output JSON MetricExpr metric Jiri Olsa <jolsa@redhat.com> - 2017-03-07 11:10 +0100
  Re: perf: Improve support for uncore JSON event lists Jiri Olsa <jolsa@redhat.com> - 2017-03-07 11:10 +0100

csiph-web