aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/debug.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-03-30 09:08:20 +0200
committerIngo Molnar <mingo@elte.hu>2011-03-30 09:08:39 +0200
commit652d78fd7a9ebd881290d6bbbc85925c06b907b4 (patch)
tree5ddef0bcae62e7b95fb8702e4e946d4b5d4e9dc6 /tools/perf/util/debug.c
parent9f644c4ba86b76159d36747fda7da496f72a1872 (diff)
parentca6a42586fae639ff9e5285d9bdc550fcb1b8d41 (diff)
Merge commits 'ca6a42586fae' and 'c286c419c784' into perf/urgent
Pick up these two commits from Arnaldo's perf/core tree: ca6a42586fae: perf tools: Emit clearer message for sys_perf_event_open ENOENT return c286c419c784: perf tools: Fixup exit path when not able to open events As they are really fixes we want to have sooner than laer. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/debug.c')
-rw-r--r--tools/perf/util/debug.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c
index d4536a9e0d8..155749d7435 100644
--- a/tools/perf/util/debug.c
+++ b/tools/perf/util/debug.c
@@ -57,6 +57,16 @@ void ui__warning(const char *format, ...)
}
#endif
+void ui__warning_paranoid(void)
+{
+ ui__warning("Permission error - are you root?\n"
+ "Consider tweaking /proc/sys/kernel/perf_event_paranoid:\n"
+ " -1 - Not paranoid at all\n"
+ " 0 - Disallow raw tracepoint access for unpriv\n"
+ " 1 - Disallow cpu events for unpriv\n"
+ " 2 - Disallow kernel profiling for unpriv\n");
+}
+
void trace_event(union perf_event *event)
{
unsigned char *raw_event = (void *)event;