summaryrefslogtreecommitdiff
path: root/tools/perf/util/evsel.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2021-06-07 00:49:28 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-06-08 14:12:14 -0300
commit0808b3d5b7514dc856178dbc509929329bbf301d (patch)
tree4585e98f376ab1df14058464c83d398a73297350 /tools/perf/util/evsel.c
parentbde1e7d934565c353626c39353b0cdae9274180f (diff)
downloadlwn-0808b3d5b7514dc856178dbc509929329bbf301d.tar.gz
lwn-0808b3d5b7514dc856178dbc509929329bbf301d.zip
perf probe: Provide clearer message permission error for tracefs access
Report permission error for the tracefs open and rewrite whole the error message code around it. You'll see a hint according to what you want to do with perf probe as below. $ perf probe -l No permission to read tracefs. Please try 'sudo mount -o remount,mode=755 /sys/kernel/tracing/' Error: Failed to show event list. $ perf probe -d \* No permission to write tracefs. Please run this command again with sudo. Error: Failed to delete events. This also fixes -ENOTSUP checking for mounting tracefs/debugfs. Actually open returns -ENOENT in that case and we have to check it with current mount point list. If we unmount debugfs and tracefs perf probe shows correct message as below. $ perf probe -l Debugfs or tracefs is not mounted Please try 'sudo mount -t tracefs nodev /sys/kernel/tracing/' Error: Failed to show event list. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Link: http://lore.kernel.org/lkml/162299456839.503471.13863002017089255222.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel.c')
0 files changed, 0 insertions, 0 deletions