aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util
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
parent9f644c4ba86b76159d36747fda7da496f72a1872 (diff)
parentca6a42586fae639ff9e5285d9bdc550fcb1b8d41 (diff)
downloadkernel_samsung_aries-652d78fd7a9ebd881290d6bbbc85925c06b907b4.zip
kernel_samsung_aries-652d78fd7a9ebd881290d6bbbc85925c06b907b4.tar.gz
kernel_samsung_aries-652d78fd7a9ebd881290d6bbbc85925c06b907b4.tar.bz2
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')
-rw-r--r--tools/perf/util/debug.c10
-rw-r--r--tools/perf/util/debug.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c
index d4536a9..155749d 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;
diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h
index 93516cf4..fd53db4 100644
--- a/tools/perf/util/debug.h
+++ b/tools/perf/util/debug.h
@@ -36,5 +36,6 @@ int ui_helpline__show_help(const char *format, va_list ap);
#endif
void ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2)));
+void ui__warning_paranoid(void);
#endif /* __PERF_DEBUG_H */