Commit c458a620 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

perf tools: Fix tracing_path_mount proper path

If there's no tracefs (RHEL7) support the tracing_path_mount
returns debugfs path which results in following fail:

  # perf probe sys_write
  kprobe_events file does not exist - please rebuild kernel with CONFIG_KPROBE_EVENTS.
  Error: Failed to add events.

In tracing_path_debugfs_mount function we need to return the
'tracing' path instead of just the mount to make it work:

  # perf probe sys_write
  Added new event:
    probe:sys_write      (on sys_write)

  You can now use it in all perf tools, such as:

          perf record -e probe:sys_write -aR sleep 1

Adding the 'return tracing_path;' also to tracing_path_tracefs_mount
function just for consistency with tracing_path_debugfs_mount.

Upstream keeps working, because it has the tracefs support.

Link: 's avatarJiri Olsa <>
Cc: Alexander Shishkin <>
Cc: Michael Petlan <>
Cc: Namhyung Kim <>
Cc: Peter Zijlstra <>
Cc: Steven Rostedt <>
Fixes: 23773ca1 ("perf tools: Make perf aware of tracefs")
Link: 's avatarArnaldo Carvalho de Melo <>
parent 36b8d462
......@@ -36,7 +36,7 @@ static const char *tracing_path_tracefs_mount(void)
__tracing_path_set("", mnt);
return mnt;
return tracing_path;
static const char *tracing_path_debugfs_mount(void)
......@@ -49,7 +49,7 @@ static const char *tracing_path_debugfs_mount(void)
__tracing_path_set("tracing/", mnt);
return mnt;
return tracing_path;
const char *tracing_path_mount(void)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment