Commit 26a9ba160f50115ece48198608002600914932a7

Authored by Linus Torvalds

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

Showing 3 changed files Side-by-side Diff

... ... @@ -937,7 +937,7 @@
937 937 Enable kernel support for various performance events provided
938 938 by software and hardware.
939 939  
940   - Software events are supported either build-in or via the
  940 + Software events are supported either built-in or via the
941 941 use of generic tracepoints.
942 942  
943 943 Most modern CPUs support performance events via performance
... ... @@ -949,7 +949,7 @@
949 949 used to profile the code that runs on that CPU.
950 950  
951 951 The Linux Performance Event subsystem provides an abstraction of
952   - these software and hardware cevent apabilities, available via a
  952 + these software and hardware event capabilities, available via a
953 953 system call and used by the "perf" utility in tools/perf/. It
954 954 provides per task and per CPU counters, and it provides event
955 955 capabilities on top of those.
tools/perf/builtin-record.c
... ... @@ -426,7 +426,7 @@
426 426 if (fd[nr_cpu][counter] < 0) {
427 427 int err = errno;
428 428  
429   - if (err == EPERM)
  429 + if (err == EPERM || err == EACCES)
430 430 die("Permission error - are you root?\n");
431 431 else if (err == ENODEV && profile_cpu != -1)
432 432 die("No such device - did you specify an out-of-range profile CPU?\n");
tools/perf/builtin-top.c
... ... @@ -1027,7 +1027,7 @@
1027 1027 if (fd[i][counter] < 0) {
1028 1028 int err = errno;
1029 1029  
1030   - if (err == EPERM)
  1030 + if (err == EPERM || err == EACCES)
1031 1031 die("No permission - are you root?\n");
1032 1032 /*
1033 1033 * If it's cycles then fall back to hrtimer