diff options
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 6febcc168a8c..623695e18254 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -275,11 +275,10 @@ try_again: | |||
275 | !no_inherit) < 0) { | 275 | !no_inherit) < 0) { |
276 | int err = errno; | 276 | int err = errno; |
277 | 277 | ||
278 | if (err == EPERM || err == EACCES) | 278 | if (err == EPERM || err == EACCES) { |
279 | die("Permission error - are you root?\n" | 279 | ui__warning_paranoid(); |
280 | "\t Consider tweaking" | 280 | exit(EXIT_FAILURE); |
281 | " /proc/sys/kernel/perf_event_paranoid.\n"); | 281 | } else if (err == ENODEV && cpu_list) { |
282 | else if (err == ENODEV && cpu_list) { | ||
283 | die("No such device - did you specify" | 282 | die("No such device - did you specify" |
284 | " an out-of-range profile CPU?\n"); | 283 | " an out-of-range profile CPU?\n"); |
285 | } else if (err == EINVAL && sample_id_all_avail) { | 284 | } else if (err == EINVAL && sample_id_all_avail) { |