Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1598100
| From | Andi Kleen <andi@firstfloor.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 06/13] perf, tools: Special case uncore_ prefix |
| Date | 2017-03-10 22:30 +0100 |
| Message-ID | <tjAgP-1eI-29@gated-at.bofh.it> (permalink) |
| References | <tjAgN-1eI-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 20935b17753d..04fd8c9af9f9 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 | Next — Previous in thread | Next in thread | Find similar | Unroll thread
perf: Improve support for uncore JSON event lists Andi Kleen <andi@firstfloor.org> - 2017-03-10 22:30 +0100
[PATCH 02/13] perf, tools, stat: Collapse identically named events Andi Kleen <andi@firstfloor.org> - 2017-03-10 22:30 +0100
[PATCH 06/13] perf, tools: Special case uncore_ prefix Andi Kleen <andi@firstfloor.org> - 2017-03-10 22:30 +0100
[PATCH 13/13] perf, tools, list: Move extra details printing to new option Andi Kleen <andi@firstfloor.org> - 2017-03-10 22:30 +0100
[PATCH 01/13] perf, tools, stat: Factor out callback for collecting event values Andi Kleen <andi@firstfloor.org> - 2017-03-10 22:30 +0100
[PATCH 05/13] perf, tools: Expand PMU events by prefix match Andi Kleen <andi@firstfloor.org> - 2017-03-10 22:30 +0100
[PATCH 03/13] perf, tools, stat: Handle partially bad results with merging Andi Kleen <andi@firstfloor.org> - 2017-03-10 22:30 +0100
[PATCH 04/13] perf, tools: Factor out PMU matching in parser Andi Kleen <andi@firstfloor.org> - 2017-03-10 22:30 +0100
[PATCH 11/13] perf, tools, list: Support printing MetricExpr with --debug Andi Kleen <andi@firstfloor.org> - 2017-03-10 22:30 +0100
[PATCH 07/13] perf, tools: Add a simple expression parser for JSON Andi Kleen <andi@firstfloor.org> - 2017-03-10 22:30 +0100
[PATCH 12/13] perf, tools: Add support for MetricName JSON attribute Andi Kleen <andi@firstfloor.org> - 2017-03-10 22:30 +0100
[PATCH 09/13] perf, tools: Support MetricExpr header in JSON event list Andi Kleen <andi@firstfloor.org> - 2017-03-10 22:30 +0100
[PATCH 10/13] perf, tools, stat: Output JSON MetricExpr metric Andi Kleen <andi@firstfloor.org> - 2017-03-10 22:30 +0100
Re: perf: Improve support for uncore JSON event lists Jiri Olsa <jolsa@redhat.com> - 2017-03-13 15:50 +0100
Re: perf: Improve support for uncore JSON event lists Andi Kleen <andi@firstfloor.org> - 2017-03-13 17:20 +0100
Re: perf: Improve support for uncore JSON event lists Jiri Olsa <jolsa@redhat.com> - 2017-03-13 17:20 +0100
csiph-web