aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2015-05-22 07:53:58 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-05-27 11:21:45 -0400
commit9b5d1c29556989aa9dc1240566e78806ddefd160 (patch)
tree8b73e743e3a0571249c313df8b81b62b8bbd6e90 /tools/perf
parent2f80dd4488c204a4850554746eb31f25f5a84405 (diff)
perf tools: Disallow PMU events intel_pt and intel_bts until there is support
Disallow PMU events intel_pt and intel_bts until the tools support them. By default any PMU is selectable as an event but until the tools have intel_pt and intel_bts support using them would result in no data being recorded without any indication as to why. Before the change: $ perf record -e intel_bts// sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.008 MB perf.data ] $ perf report --stdio Error: The perf.data file has no samples! After the change: $ perf record -e intel_bts// sleep 1 invalid or unsupported event: 'intel_bts//' Run 'perf list' for a list of valid events Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/1432295653-13989-2-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/pmu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 244c66f89891..5d3ab7c8ceaf 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -442,6 +442,10 @@ static struct perf_pmu *pmu_lookup(const char *name)
442 LIST_HEAD(aliases); 442 LIST_HEAD(aliases);
443 __u32 type; 443 __u32 type;
444 444
445 /* No support for intel_bts or intel_pt so disallow them */
446 if (!strcmp(name, "intel_bts") || !strcmp(name, "intel_pt"))
447 return NULL;
448
445 /* 449 /*
446 * The pmu data we store & need consists of the pmu 450 * The pmu data we store & need consists of the pmu
447 * type value and format definitions. Load both right 451 * type value and format definitions. Load both right