aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/debugfs.h
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2009-11-08 10:01:37 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-08 12:01:34 -0500
commitafe61f677866ffc484e69c4ecca2d316d564d78b (patch)
tree1eddb3be74799743b9de6b2a8eb4a3c26c02069c /tools/perf/util/debugfs.h
parent8d06367fa79c053a4a56a2ce0bb9e840f5da1236 (diff)
perf tools: Add debugfs utility routines for perf
Add routines to locate the debugfs mount point and to manage the mounting and unmounting of the debugfs. Signed-off-by: Clark Williams <williams@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> LKML-Reference: <20091101155621.2b3503ee@torg> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/debugfs.h')
-rw-r--r--tools/perf/util/debugfs.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/perf/util/debugfs.h b/tools/perf/util/debugfs.h
new file mode 100644
index 000000000000..3cd14f9ae784
--- /dev/null
+++ b/tools/perf/util/debugfs.h
@@ -0,0 +1,25 @@
1#ifndef __DEBUGFS_H__
2#define __DEBUGFS_H__
3
4#include <sys/mount.h>
5
6#ifndef MAX_PATH
7# define MAX_PATH 256
8#endif
9
10#ifndef STR
11# define _STR(x) #x
12# define STR(x) _STR(x)
13#endif
14
15extern const char *debugfs_find_mountpoint(void);
16extern int debugfs_valid_mountpoint(const char *debugfs);
17extern int debugfs_valid_entry(const char *path);
18extern int debugfs_mount(const char *mountpoint);
19extern int debugfs_umount(void);
20extern int debugfs_write(const char *entry, const char *value);
21extern int debugfs_read(const char *entry, char *buffer, size_t size);
22extern void debugfs_force_cleanup(void);
23extern int debugfs_make_path(const char *element, char *buffer, int size);
24
25#endif /* __DEBUGFS_H__ */