From 052da5eadeda7fd72ddeedb813fca6a5361ec20e Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Sun, 8 Nov 2009 18:01:06 +0200 Subject: [PATCH] --- yaml --- r: 168434 b: refs/heads/master c: c10edee2e1716f8cf217cf52ed01ae4742fcdf3c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/tools/perf/builtin-record.c | 2 +- trunk/tools/perf/builtin-top.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 061ebba67d4c..51c0983b6148 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dd77038d233d106f297b907bf51459dfb1099eb1 +refs/heads/master: c10edee2e1716f8cf217cf52ed01ae4742fcdf3c diff --git a/trunk/tools/perf/builtin-record.c b/trunk/tools/perf/builtin-record.c index 3eeef339c787..a4be453fc8a9 100644 --- a/trunk/tools/perf/builtin-record.c +++ b/trunk/tools/perf/builtin-record.c @@ -426,7 +426,7 @@ static void create_counter(int counter, int cpu, pid_t pid) if (fd[nr_cpu][counter] < 0) { int err = errno; - if (err == EPERM) + if (err == EPERM || err == EACCES) die("Permission error - are you root?\n"); else if (err == ENODEV && profile_cpu != -1) die("No such device - did you specify an out-of-range profile CPU?\n"); diff --git a/trunk/tools/perf/builtin-top.c b/trunk/tools/perf/builtin-top.c index a1b1d10912dc..e23bc74e734f 100644 --- a/trunk/tools/perf/builtin-top.c +++ b/trunk/tools/perf/builtin-top.c @@ -1027,7 +1027,7 @@ static void start_counter(int i, int counter) if (fd[i][counter] < 0) { int err = errno; - if (err == EPERM) + if (err == EPERM || err == EACCES) die("No permission - are you root?\n"); /* * If it's cycles then fall back to hrtimer