* [tip:perf/core] perf list: Honour 'event_glob' whem printing selectable PMUs
@ 2015-10-03 7:50 tip-bot for Arnaldo Carvalho de Melo
0 siblings, 0 replies; only message in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2015-10-03 7:50 UTC (permalink / raw)
To: linux-tip-commits
Cc: eranian, hpa, linux-kernel, mingo, fweisbec, dsahern, bp,
namhyung, acme, jolsa, adrian.hunter, tglx
Commit-ID: fa52ceabc2a3e70431a82bca2bc547a15eaf19df
Gitweb: http://git.kernel.org/tip/fa52ceabc2a3e70431a82bca2bc547a15eaf19df
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Fri, 2 Oct 2015 15:28:16 -0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 2 Oct 2015 15:28:16 -0300
perf list: Honour 'event_glob' whem printing selectable PMUs
Some PMUs, like the 'intel_bts' one can be used as an event name, i.e.:
$ perf record -e intel_bts:// usleep 1
Is a valid event name.
But the code printing such PMUs was not honouring the 'event_glob'
parameter, so the following line was always appearing:
$ intel_bts// [Kernel PMU event]
Fix it:
$ [acme@felicio linux]$ perf list data
List of pre-defined events (to be used in -e):
uncore_imc/data_reads/ [Kernel PMU event]
uncore_imc/data_writes/ [Kernel PMU event]
$
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-ajb71858n7q7ao77b8pyy74w@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/pmu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 41a356b..e4b173d 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -1008,7 +1008,8 @@ void print_pmu_events(const char *event_glob, bool name_only)
goto out_enomem;
j++;
}
- if (pmu->selectable) {
+ if (pmu->selectable &&
+ (event_glob == NULL || strglobmatch(pmu->name, event_glob))) {
char *s;
if (asprintf(&s, "%s//", pmu->name) < 0)
goto out_enomem;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-03 7:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-03 7:50 [tip:perf/core] perf list: Honour 'event_glob' whem printing selectable PMUs tip-bot for Arnaldo Carvalho de Melo
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.