diff options
author | Masami Hiramatsu <[email protected]> | 2021-06-07 00:49:28 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2021-06-08 14:12:14 -0300 |
commit | 0808b3d5b7514dc856178dbc509929329bbf301d (patch) | |
tree | 4585e98f376ab1df14058464c83d398a73297350 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | bde1e7d934565c353626c39353b0cdae9274180f (diff) |
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 <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: Aneesh Kumar K.V <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ravi Bangoria <[email protected]>
Link: http://lore.kernel.org/lkml/162299456839.503471.13863002017089255222.stgit@devnote2
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions