Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Nov 2009 19:29:34 +0000 (11:29 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Nov 2009 19:29:34 +0000 (11:29 -0800)
* '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

init/Kconfig
tools/perf/builtin-record.c
tools/perf/builtin-top.c

index f51586406d622a03728152cd4f5c272433b748f5..9e03ef8b311ec303b7fd1f70cc21021620100171 100644 (file)
@@ -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.
index 3eeef339c787bdb414a0faba3e31d02a6efa2a02..a4be453fc8a92e3059fabb1a680ac008fe5569b9 100644 (file)
@@ -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");
index a1b1d10912dceae2fcab280d41e03f28a60b3a82..e23bc74e734fbf210312b04e776234f19920cced 100644 (file)
@@ -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