summaryrefslogtreecommitdiff
path: root/tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorLeo Yan <leo.yan@arm.com>2026-02-04 14:26:15 +0000
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-02-06 11:53:10 -0300
commita108a6a4b9e8d81f6be0c0f8b93d3fbd57d2359e (patch)
treebdcdbeeabf817382134106ca680da636eb836e8e /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
parent84cb36da81413c2dff805150b9f4db1524460269 (diff)
perf record: Make logs more readable for event open failures
Since commit ee27476fa3004f83 ("perf record: Skip don't fail for events that don't open"), if a user does not have permission to access a PMU event, perf reports: perf record -e cs_etm// -C 3 -- ls Error: Failure to open event 'cs_etm//u' on PMU 'cs_etm' which will be removed. No fallback found for 'cs_etm//u' for error 13 Error: Failure to open event 'dummy:u' on PMU 'software' which will be removed. No fallback found for 'dummy:u' for error 13 Error: Failure to open any events for recording. The log is not very helpful, as no clear indication of what "error 13" means or how to address the issue. This commit restores evsel__open_strerror() to generate a readable error message and print it out: perf record -e cs_etm// -C 3 -- ls Error: Failure to open event 'cs_etm//' on PMU 'cs_etm' which will be removed. Access to performance monitoring and observability operations is limited. Consider adjusting /proc/sys/kernel/perf_event_paranoid setting to open access to performance monitoring and observability operations for processes without CAP_PERFMON, CAP_SYS_PTRACE or CAP_SYS_ADMIN Linux capability. More information can be found at 'Perf events and tool security' document: https://www.kernel.org/doc/html/latest/admin-guide/perf-security.html perf_event_paranoid setting is 1: -1: Allow use of (almost) all events by all users Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK >= 0: Disallow raw and ftrace function tracepoint access >= 1: Disallow CPU event access >= 2: Disallow kernel profiling To make the adjusted perf_event_paranoid setting permanent preserve it in /etc/sysctl.conf (e.g. kernel.perf_event_paranoid = <setting>) Error: Failure to open event 'dummy:u' on PMU 'software' which will be removed. Access to performance monitoring and observability operations is limited. Consider adjusting /proc/sys/kernel/perf_event_paranoid setting to open access to performance monitoring and observability operations for processes without CAP_PERFMON, CAP_SYS_PTRACE or CAP_SYS_ADMIN Linux capability. More information can be found at 'Perf events and tool security' document: https://www.kernel.org/doc/html/latest/admin-guide/perf-security.html perf_event_paranoid setting is 1: -1: Allow use of (almost) all events by all users Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK >= 0: Disallow raw and ftrace function tracepoint access >= 1: Disallow CPU event access >= 2: Disallow kernel profiling To make the adjusted perf_event_paranoid setting permanent preserve it in /etc/sysctl.conf (e.g. kernel.perf_event_paranoid = <setting>) Error: Failure to open any events for recording. Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Leo Yan <leo.yan@arm.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions