aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-11-11 11:29:34 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-11-11 11:29:34 -0800
commit26a9ba160f50115ece48198608002600914932a7 (patch)
treebcbc9be816e0282c0e33822b897489ca74a3e54f
parentMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip (diff)
parentperf tools: Fix permission checks (diff)
downloadlinux-dev-26a9ba160f50115ece48198608002600914932a7.tar.xz
linux-dev-26a9ba160f50115ece48198608002600914932a7.zip
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf tools: Fix permission checks perf_events: Fix some typo in the perf events config description
-rw-r--r--init/Kconfig4
-rw-r--r--tools/perf/builtin-record.c2
-rw-r--r--tools/perf/builtin-top.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/init/Kconfig b/init/Kconfig
index f51586406d62..9e03ef8b311e 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -937,7 +937,7 @@ config PERF_EVENTS
Enable kernel support for various performance events provided
by software and hardware.
- Software events are supported either build-in or via the
+ Software events are supported either built-in or via the
use of generic tracepoints.
Most modern CPUs support performance events via performance
@@ -949,7 +949,7 @@ config PERF_EVENTS
used to profile the code that runs on that CPU.
The Linux Performance Event subsystem provides an abstraction of
- these software and hardware cevent apabilities, available via a
+ these software and hardware event capabilities, available via a
system call and used by the "perf" utility in tools/perf/. It
provides per task and per CPU counters, and it provides event
capabilities on top of those.
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 3eeef339c787..a4be453fc8a9 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -426,7 +426,7 @@ try_again:
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/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index a1b1d10912dc..e23bc74e734f 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1027,7 +1027,7 @@ try_again:
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