1
0
Fork 0
alistair23-linux/tools/lib/api/fs
Jiri Olsa c458a6206d 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: http://lkml.kernel.org/n/tip-yiwkzexq9fk1ey1xg3gnjlw4@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Fixes: 23773ca18b ("perf tools: Make perf aware of tracefs")
Link: http://lkml.kernel.org/r/20181016114818.3595-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-10-16 12:27:46 -03:00
..
Build tools lib api fs: Remove debugfs, tracefs and findfs objects 2015-09-14 12:50:15 -03:00
fs.c docs: Fix some broken references 2018-06-15 18:10:01 -03:00
fs.h tools lib api fs: Add sysfs__read_xll function 2018-02-16 10:09:23 -03:00
tracing_path.c perf tools: Fix tracing_path_mount proper path 2018-10-16 12:27:46 -03:00
tracing_path.h tools lib api fs tracing_path: Make tracing_events_path private 2018-05-17 14:51:23 -03:00