diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2015-02-02 19:35:04 (GMT) |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-02-07 12:55:20 (GMT) |
commit | 4ef92c2ecd96ebad171e554020c83ce9fdb343ae (patch) | |
tree | c88cb43e8d79b89bebd8389c816770e932c28a22 /tools/lib/api/fs/tracefs.h | |
parent | cde164aee9e0343831467035eb96dd5506742648 (diff) | |
download | linux-4ef92c2ecd96ebad171e554020c83ce9fdb343ae.tar.xz |
tools lib api fs: Add tracefs mount helper functions
Since tracefs will now hold the event directory for perf, and even
though by default, debugfs still mounts tracefs on the debugfs/tracing
directory, the system admin may now choose to not mount debugfs and
instead just mount tracefs instead.
Having tracefs helper functions will facilitate having perf look for
tracefs first, and then try debugfs as a fallback.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20150202193552.898934751@goodmis.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/api/fs/tracefs.h')
-rw-r--r-- | tools/lib/api/fs/tracefs.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/lib/api/fs/tracefs.h b/tools/lib/api/fs/tracefs.h new file mode 100644 index 0000000..e6f7f51 --- /dev/null +++ b/tools/lib/api/fs/tracefs.h @@ -0,0 +1,20 @@ +#ifndef __API_TRACEFS_H__ +#define __API_TRACEFS_H__ + +#include "findfs.h" + +#ifndef TRACEFS_MAGIC +#define TRACEFS_MAGIC 0x74726163 +#endif + +#ifndef PERF_TRACEFS_ENVIRONMENT +#define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR" +#endif + +const char *tracefs_find_mountpoint(void); +int tracefs_valid_mountpoint(const char *debugfs); +char *tracefs_mount(const char *mountpoint); + +extern char tracefs_mountpoint[]; + +#endif /* __API_DEBUGFS_H__ */ |