mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Andi Kleen <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: jolsa@kernel.org, tglx@linutronix.de, acme@redhat.com,
	linux-kernel@vger.kernel.org, ak@linux.intel.com,
	mingo@kernel.org, hpa@zytor.com
Subject: [tip:perf/core] perf list: Support matching by topic
Date: Fri, 28 Oct 2016 10:47:13 -0700	[thread overview]
Message-ID: <tip-67bdc35fb48c97502dd4b9eeac561e4bcc18684b@git.kernel.org> (raw)
In-Reply-To: <1476902724-9586-2-git-send-email-andi@firstfloor.org>

Commit-ID:  67bdc35fb48c97502dd4b9eeac561e4bcc18684b
Gitweb:     http://git.kernel.org/tip/67bdc35fb48c97502dd4b9eeac561e4bcc18684b
Author:     Andi Kleen <ak@linux.intel.com>
AuthorDate: Wed, 19 Oct 2016 11:45:23 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 28 Oct 2016 11:29:42 -0200

perf list: Support matching by topic

Add support in perf list topic to only show events belonging to a
specific vendor events topic. For example the following works now:

  % perf list frontend
  List of pre-defined events (to be used in -e):

    stalled-cycles-frontend OR idle-cycles-frontend    [Hardware event]

    stalled-cycles-frontend OR cpu/stalled-cycles-frontend/ [Kernel PMU event]

  frontend:
    dsb2mite_switches.count
         [Decode Stream Buffer (DSB)-to-MITE switches]
    dsb2mite_switches.penalty_cycles
         [Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles]
    dsb_fill.exceed_dsb_lines
         [Cycles when Decode Stream Buffer (DSB) fill encounter more than 3 Decode Stream Buffer (DSB)
          lines]
    icache.hit
         [Number of Instruction Cache, Streaming Buffer and Victim Cache Reads. both cacheable and
          noncacheable, including UC fetches]
  ...

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/1476902724-9586-2-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/pmu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 31b845e..dc6ccaa 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -1141,7 +1141,9 @@ void print_pmu_events(const char *event_glob, bool name_only, bool quiet_flag,
 			if (event_glob != NULL &&
 			    !(strglobmatch_nocase(name, event_glob) ||
 			      (!is_cpu && strglobmatch_nocase(alias->name,
-						       event_glob))))
+						       event_glob)) ||
+			      (alias->topic &&
+			       strglobmatch_nocase(alias->topic, event_glob))))
 				continue;
 
 			if (is_cpu && !name_only && !alias->desc)

  reply	other threads:[~2016-10-28 17:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19 18:45 [PATCH 1/3] perf, tools, list: Make vendor event matching case insensitive Andi Kleen
2016-10-19 18:45 ` [PATCH 2/3] perf, tools, list: Support matching by topic Andi Kleen
2016-10-28 17:47   ` tip-bot for Andi Kleen [this message]
2016-10-19 18:45 ` [PATCH 3/3] perf, tools, list: Support perf list cache for topics Andi Kleen

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-67bdc35fb48c97502dd4b9eeac561e4bcc18684b@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome