From: tip-bot for Andi Kleen <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, hpa@zytor.com, acme@redhat.com,
ak@linux.intel.com, tglx@linutronix.de, jolsa@kernel.org,
linux-kernel@vger.kernel.org
Subject: [tip:perf/core] perf pmu: Special case uncore_ prefix
Date: Fri, 24 Mar 2017 11:49:43 -0700 [thread overview]
Message-ID: <tip-a820e33547aee9fd0460106c1fc577a125c23975@git.kernel.org> (raw)
In-Reply-To: <20170320201711.14142-7-andi@firstfloor.org>
Commit-ID: a820e33547aee9fd0460106c1fc577a125c23975
Gitweb: http://git.kernel.org/tip/a820e33547aee9fd0460106c1fc577a125c23975
Author: Andi Kleen <ak@linux.intel.com>
AuthorDate: Mon, 20 Mar 2017 13:17:04 -0700
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 21 Mar 2017 16:10:59 -0300
perf pmu: Special case uncore_ prefix
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
Committer tests:
# perf list uncore
List of pre-defined events (to be used in -e):
uncore_cbox_0/clockticks/ [Kernel PMU event]
uncore_cbox_1/clockticks/ [Kernel PMU event]
uncore_imc/data_reads/ [Kernel PMU event]
uncore_imc/data_writes/ [Kernel PMU event]
# perf stat -a -e cbox_0/clockticks/ sleep 1
Performance counter stats for 'system wide':
281,474,976,653,084 cbox_0/clockticks/
1.000870129 seconds time elapsed
#
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: http://lkml.kernel.org/r/20170320201711.14142-7-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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 20935b17..04fd8c9 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;
next prev parent reply other threads:[~2017-03-24 18:50 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-20 20:16 perf: Improve support for uncore JSON event lists Andi Kleen
2017-03-20 20:16 ` [PATCH 01/13] perf, tools, stat: Factor out callback for collecting event values Andi Kleen
2017-03-24 18:46 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-03-20 20:17 ` [PATCH 02/13] perf, tools, stat: Collapse identically named events Andi Kleen
2017-03-24 18:47 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-03-20 20:17 ` [PATCH 03/13] perf, tools, stat: Handle partially bad results with merging Andi Kleen
2017-03-24 18:48 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-03-20 20:17 ` [PATCH 04/13] perf, tools: Factor out PMU matching in parser Andi Kleen
2017-03-24 18:48 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-03-20 20:17 ` [PATCH 05/13] perf, tools: Expand PMU events by prefix match Andi Kleen
2017-03-24 18:49 ` [tip:perf/core] perf pmu: " tip-bot for Andi Kleen
2017-03-20 20:17 ` [PATCH 06/13] perf, tools: Special case uncore_ prefix Andi Kleen
2017-03-24 18:49 ` tip-bot for Andi Kleen [this message]
2017-03-20 20:17 ` [PATCH 07/13] perf, tools: Add a simple expression parser for JSON Andi Kleen
2017-03-21 19:14 ` Arnaldo Carvalho de Melo
2017-03-21 19:15 ` Arnaldo Carvalho de Melo
2017-03-21 22:08 ` Build errors, was " Arnaldo Carvalho de Melo
2017-03-24 18:50 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-03-20 20:17 ` [PATCH 08/13] perf, tools: Update Intel uncore JSON event files Andi Kleen
2017-03-24 18:50 ` [tip:perf/core] perf vendor events intel: " tip-bot for Andi Kleen
2017-03-20 20:17 ` [PATCH 09/13] perf, tools: Support MetricExpr header in JSON event list Andi Kleen
2017-03-24 18:51 ` [tip:perf/core] perf pmu: " tip-bot for Andi Kleen
2017-03-20 20:17 ` [PATCH 10/13] perf, tools, stat: Output JSON MetricExpr metric Andi Kleen
2017-03-21 14:48 ` Jiri Olsa
2017-03-21 15:45 ` Andi Kleen
2017-03-21 19:42 ` Arnaldo Carvalho de Melo
2017-03-21 19:49 ` Andi Kleen
2017-03-24 18:51 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-03-20 20:17 ` [PATCH 11/13] perf, tools, list: Support printing MetricExpr with --debug Andi Kleen
2017-03-24 18:52 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-03-20 20:17 ` [PATCH 12/13] perf, tools: Add support for MetricName JSON attribute Andi Kleen
2017-03-24 18:53 ` [tip:perf/core] perf pmu: " tip-bot for Andi Kleen
2017-03-20 20:17 ` [PATCH 13/13] perf, tools, list: Move extra details printing to new option Andi Kleen
2017-03-24 18:53 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-03-21 14:48 ` perf: Improve support for uncore JSON event lists Jiri Olsa
2017-03-21 19:53 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-a820e33547aee9fd0460106c1fc577a125c23975@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.