aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/builtin-record.c2
-rw-r--r--tools/perf/builtin-top.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 326e8a79cabf..04f335ef9a8c 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -281,7 +281,7 @@ try_again:
281 if (fd[nr_cpu][counter] < 0) { 281 if (fd[nr_cpu][counter] < 0) {
282 int err = errno; 282 int err = errno;
283 283
284 if (err == EPERM) 284 if (err == EPERM || err == EACCES)
285 die("Permission error - are you root?\n"); 285 die("Permission error - are you root?\n");
286 else if (err == ENODEV && profile_cpu != -1) 286 else if (err == ENODEV && profile_cpu != -1)
287 die("No such device - did you specify an out-of-range profile CPU?\n"); 287 die("No such device - did you specify an out-of-range profile CPU?\n");
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 2aea913f7eb7..6613f988a33e 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1031,7 +1031,7 @@ try_again:
1031 if (fd[i][counter] < 0) { 1031 if (fd[i][counter] < 0) {
1032 int err = errno; 1032 int err = errno;
1033 1033
1034 if (err == EPERM) 1034 if (err == EPERM || err == EACCES)
1035 die("No permission - are you root?\n"); 1035 die("No permission - are you root?\n");
1036 /* 1036 /*
1037 * If it's cycles then fall back to hrtimer 1037 * If it's cycles then fall back to hrtimer