aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/debugfs.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-11-16 11:03:07 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-11-28 07:11:28 -0500
commitebf294bf4f147aff29df5a16bfb0f8ebca15feaa (patch)
tree37464624abf9243100eab47fdc663def4be121fe /tools/perf/util/debugfs.h
parentc168fbfb93a1c4044287858c6784f0bd1f6cfe33 (diff)
perf tools: Simplify debugfs mountpoint handling code
We don't need to have two PATH_MAX char sized arrays holding it, just one in util/debugfs.c will do. Also rename debugfs_path to tracing_events_path, as it is not the path to debugfs, that is debugfs_mountpoint. Both are now accessible. This will allow accessing this code in the perf python binding without having to drag in perf.c and util/parse-events.c. The defaults for these variables are the canonical "/sys/kernel/debug" and "/sys/kernel/debug/tracing/events/", removing the need for simple tools to call debugfs_mount(NULL). Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-ug9jvtjrsqbluuhqqxpvg30f@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/debugfs.h')
-rw-r--r--tools/perf/util/debugfs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/debugfs.h b/tools/perf/util/debugfs.h
index 8cd3fa0af88..4a878f735eb 100644
--- a/tools/perf/util/debugfs.h
+++ b/tools/perf/util/debugfs.h
@@ -6,9 +6,13 @@ int debugfs_valid_mountpoint(const char *debugfs);
6int debugfs_valid_entry(const char *path); 6int debugfs_valid_entry(const char *path);
7char *debugfs_mount(const char *mountpoint); 7char *debugfs_mount(const char *mountpoint);
8int debugfs_umount(void); 8int debugfs_umount(void);
9void debugfs_set_path(const char *mountpoint);
9int debugfs_write(const char *entry, const char *value); 10int debugfs_write(const char *entry, const char *value);
10int debugfs_read(const char *entry, char *buffer, size_t size); 11int debugfs_read(const char *entry, char *buffer, size_t size);
11void debugfs_force_cleanup(void); 12void debugfs_force_cleanup(void);
12int debugfs_make_path(const char *element, char *buffer, int size); 13int debugfs_make_path(const char *element, char *buffer, int size);
13 14
15extern char debugfs_mountpoint[];
16extern char tracing_events_path[];
17
14#endif /* __DEBUGFS_H__ */ 18#endif /* __DEBUGFS_H__ */