trace-cmd: Add support for using tracefs filesystem

The tracing files are now under the tracefs filesystem, which may be
mounted instead of the debugfs file system. For backward compatibility,
the debugfs filesystem will still have the tracing directory with all
the tracing files, but if a system admin mounts just the tracing directory
and not the debugfs file system, trace-cmd still needs to be aware of
this.

This also fixes an old bug where if the filesystem needs to be mounted
by trace-cmd, the path returned from tracecmd_find_tracing_dir() is not
updated correctly, and returns garbage.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 file changed