aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Hunter <[email protected]>2013-11-01 13:51:29 +0000
committerArnaldo Carvalho de Melo <[email protected]>2013-11-04 15:18:17 +0000
commitf852fd621ca19f557f2e3d05900366be7c7afb83 (patch)
tree23da3a0b5e20b418a2f549e9c0d7da1ea8481a6f
parentperf tools: Get current comm instead of last one (diff)
downloadkernel-f852fd621ca19f557f2e3d05900366be7c7afb83.tar.gz
kernel-f852fd621ca19f557f2e3d05900366be7c7afb83.zip
perf evsel: Add a debug print if perf_event_open fails
There is a debug print (at verbose level 2) for each call to perf_event_open. Add another debug print if the call fails, and print the error number. Signed-off-by: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/util/evsel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 3a334f001997..f0e65dec66a5 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1051,6 +1051,8 @@ retry_open:
group_fd, flags);
if (FD(evsel, cpu, thread) < 0) {
err = -errno;
+ pr_debug2("perf_event_open failed, error %d\n",
+ err);
goto try_fallback;
}
set_rlimit = NO_CHANGE;