Browse Source

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
Linus Torvalds 15 years ago
parent
commit
26a9ba160f
3 changed files with 4 additions and 4 deletions
  1. 2 2
      init/Kconfig
  2. 1 1
      tools/perf/builtin-record.c
  3. 1 1
      tools/perf/builtin-top.c

+ 2 - 2
init/Kconfig

@@ -937,7 +937,7 @@ config PERF_EVENTS
 	  Enable kernel support for various performance events provided
 	  Enable kernel support for various performance events provided
 	  by software and hardware.
 	  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.
 	  use of generic tracepoints.
 
 
 	  Most modern CPUs support performance events via performance
 	  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.
 	  used to profile the code that runs on that CPU.
 
 
 	  The Linux Performance Event subsystem provides an abstraction of
 	  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
 	  system call and used by the "perf" utility in tools/perf/. It
 	  provides per task and per CPU counters, and it provides event
 	  provides per task and per CPU counters, and it provides event
 	  capabilities on top of those.
 	  capabilities on top of those.

+ 1 - 1
tools/perf/builtin-record.c

@@ -426,7 +426,7 @@ try_again:
 	if (fd[nr_cpu][counter] < 0) {
 	if (fd[nr_cpu][counter] < 0) {
 		int err = errno;
 		int err = errno;
 
 
-		if (err == EPERM)
+		if (err == EPERM || err == EACCES)
 			die("Permission error - are you root?\n");
 			die("Permission error - are you root?\n");
 		else if (err ==  ENODEV && profile_cpu != -1)
 		else if (err ==  ENODEV && profile_cpu != -1)
 			die("No such device - did you specify an out-of-range profile CPU?\n");
 			die("No such device - did you specify an out-of-range profile CPU?\n");

+ 1 - 1
tools/perf/builtin-top.c

@@ -1027,7 +1027,7 @@ try_again:
 	if (fd[i][counter] < 0) {
 	if (fd[i][counter] < 0) {
 		int err = errno;
 		int err = errno;
 
 
-		if (err == EPERM)
+		if (err == EPERM || err == EACCES)
 			die("No permission - are you root?\n");
 			die("No permission - are you root?\n");
 		/*
 		/*
 		 * If it's cycles then fall back to hrtimer
 		 * If it's cycles then fall back to hrtimer