diff options
-rw-r--r-- | tools/lib/api/Makefile | 2 | ||||
-rw-r--r-- | tools/lib/api/fs/fs.c (renamed from tools/perf/util/fs.c) | 11 | ||||
-rw-r--r-- | tools/lib/api/fs/fs.h (renamed from tools/perf/util/include/linux/magic.h) | 12 | ||||
-rw-r--r-- | tools/perf/Makefile.perf | 3 | ||||
-rw-r--r-- | tools/perf/tests/parse-events.c | 2 | ||||
-rw-r--r-- | tools/perf/util/cpumap.c | 2 | ||||
-rw-r--r-- | tools/perf/util/fs.h | 7 | ||||
-rw-r--r-- | tools/perf/util/pmu.c | 2 | ||||
-rw-r--r-- | tools/perf/util/python-ext-sources | 2 | ||||
-rw-r--r-- | tools/perf/util/record.c | 2 | ||||
-rw-r--r-- | tools/perf/util/util.c | 2 |
11 files changed, 21 insertions, 26 deletions
diff --git a/tools/lib/api/Makefile b/tools/lib/api/Makefile index ed2f51e11b80..ce00f7ee6455 100644 --- a/tools/lib/api/Makefile +++ b/tools/lib/api/Makefile | |||
@@ -9,8 +9,10 @@ LIB_H= | |||
9 | LIB_OBJS= | 9 | LIB_OBJS= |
10 | 10 | ||
11 | LIB_H += fs/debugfs.h | 11 | LIB_H += fs/debugfs.h |
12 | LIB_H += fs/fs.h | ||
12 | 13 | ||
13 | LIB_OBJS += $(OUTPUT)fs/debugfs.o | 14 | LIB_OBJS += $(OUTPUT)fs/debugfs.o |
15 | LIB_OBJS += $(OUTPUT)fs/fs.o | ||
14 | 16 | ||
15 | LIBFILE = libapikfs.a | 17 | LIBFILE = libapikfs.a |
16 | 18 | ||
diff --git a/tools/perf/util/fs.c b/tools/lib/api/fs/fs.c index f5be1f26e724..5b5eb788996e 100644 --- a/tools/perf/util/fs.c +++ b/tools/lib/api/fs/fs.c | |||
@@ -1,8 +1,13 @@ | |||
1 | /* TODO merge/factor in debugfs.c here */ | ||
1 | 2 | ||
2 | /* TODO merge/factor into tools/lib/lk/debugfs.c */ | 3 | #include <errno.h> |
4 | #include <stdbool.h> | ||
5 | #include <stdio.h> | ||
6 | #include <string.h> | ||
7 | #include <sys/vfs.h> | ||
3 | 8 | ||
4 | #include "util.h" | 9 | #include "debugfs.h" |
5 | #include "util/fs.h" | 10 | #include "fs.h" |
6 | 11 | ||
7 | static const char * const sysfs__fs_known_mountpoints[] = { | 12 | static const char * const sysfs__fs_known_mountpoints[] = { |
8 | "/sys", | 13 | "/sys", |
diff --git a/tools/perf/util/include/linux/magic.h b/tools/lib/api/fs/fs.h index 07d63cf3e0f6..cb7049551f33 100644 --- a/tools/perf/util/include/linux/magic.h +++ b/tools/lib/api/fs/fs.h | |||
@@ -1,9 +1,5 @@ | |||
1 | #ifndef _PERF_LINUX_MAGIC_H_ | 1 | #ifndef __API_FS__ |
2 | #define _PERF_LINUX_MAGIC_H_ | 2 | #define __API_FS__ |
3 | |||
4 | #ifndef DEBUGFS_MAGIC | ||
5 | #define DEBUGFS_MAGIC 0x64626720 | ||
6 | #endif | ||
7 | 3 | ||
8 | #ifndef SYSFS_MAGIC | 4 | #ifndef SYSFS_MAGIC |
9 | #define SYSFS_MAGIC 0x62656572 | 5 | #define SYSFS_MAGIC 0x62656572 |
@@ -13,4 +9,6 @@ | |||
13 | #define PROC_SUPER_MAGIC 0x9fa0 | 9 | #define PROC_SUPER_MAGIC 0x9fa0 |
14 | #endif | 10 | #endif |
15 | 11 | ||
16 | #endif | 12 | const char *sysfs__mountpoint(void); |
13 | const char *procfs__mountpoint(void); | ||
14 | #endif /* __API_FS__ */ | ||
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index f99a392d20be..869b34a51c8c 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf | |||
@@ -218,7 +218,6 @@ LIB_H += util/include/linux/ctype.h | |||
218 | LIB_H += util/include/linux/kernel.h | 218 | LIB_H += util/include/linux/kernel.h |
219 | LIB_H += util/include/linux/list.h | 219 | LIB_H += util/include/linux/list.h |
220 | LIB_H += util/include/linux/export.h | 220 | LIB_H += util/include/linux/export.h |
221 | LIB_H += util/include/linux/magic.h | ||
222 | LIB_H += util/include/linux/poison.h | 221 | LIB_H += util/include/linux/poison.h |
223 | LIB_H += util/include/linux/prefetch.h | 222 | LIB_H += util/include/linux/prefetch.h |
224 | LIB_H += util/include/linux/rbtree.h | 223 | LIB_H += util/include/linux/rbtree.h |
@@ -244,7 +243,6 @@ LIB_H += util/cache.h | |||
244 | LIB_H += util/callchain.h | 243 | LIB_H += util/callchain.h |
245 | LIB_H += util/build-id.h | 244 | LIB_H += util/build-id.h |
246 | LIB_H += util/debug.h | 245 | LIB_H += util/debug.h |
247 | LIB_H += util/fs.h | ||
248 | LIB_H += util/pmu.h | 246 | LIB_H += util/pmu.h |
249 | LIB_H += util/event.h | 247 | LIB_H += util/event.h |
250 | LIB_H += util/evsel.h | 248 | LIB_H += util/evsel.h |
@@ -306,7 +304,6 @@ LIB_OBJS += $(OUTPUT)util/annotate.o | |||
306 | LIB_OBJS += $(OUTPUT)util/build-id.o | 304 | LIB_OBJS += $(OUTPUT)util/build-id.o |
307 | LIB_OBJS += $(OUTPUT)util/config.o | 305 | LIB_OBJS += $(OUTPUT)util/config.o |
308 | LIB_OBJS += $(OUTPUT)util/ctype.o | 306 | LIB_OBJS += $(OUTPUT)util/ctype.o |
309 | LIB_OBJS += $(OUTPUT)util/fs.o | ||
310 | LIB_OBJS += $(OUTPUT)util/pmu.o | 307 | LIB_OBJS += $(OUTPUT)util/pmu.o |
311 | LIB_OBJS += $(OUTPUT)util/environment.o | 308 | LIB_OBJS += $(OUTPUT)util/environment.o |
312 | LIB_OBJS += $(OUTPUT)util/event.o | 309 | LIB_OBJS += $(OUTPUT)util/event.o |
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c index 4db0ae617d70..8605ff5572ae 100644 --- a/tools/perf/tests/parse-events.c +++ b/tools/perf/tests/parse-events.c | |||
@@ -2,7 +2,7 @@ | |||
2 | #include "parse-events.h" | 2 | #include "parse-events.h" |
3 | #include "evsel.h" | 3 | #include "evsel.h" |
4 | #include "evlist.h" | 4 | #include "evlist.h" |
5 | #include "fs.h" | 5 | #include <api/fs/fs.h> |
6 | #include <api/fs/debugfs.h> | 6 | #include <api/fs/debugfs.h> |
7 | #include "tests.h" | 7 | #include "tests.h" |
8 | #include <linux/hw_breakpoint.h> | 8 | #include <linux/hw_breakpoint.h> |
diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c index a9b48c42e81e..7fe4994eeb63 100644 --- a/tools/perf/util/cpumap.c +++ b/tools/perf/util/cpumap.c | |||
@@ -1,5 +1,5 @@ | |||
1 | #include "util.h" | 1 | #include "util.h" |
2 | #include "fs.h" | 2 | #include <api/fs/fs.h> |
3 | #include "../perf.h" | 3 | #include "../perf.h" |
4 | #include "cpumap.h" | 4 | #include "cpumap.h" |
5 | #include <assert.h> | 5 | #include <assert.h> |
diff --git a/tools/perf/util/fs.h b/tools/perf/util/fs.h deleted file mode 100644 index 5e09ce1bab0e..000000000000 --- a/tools/perf/util/fs.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef __PERF_FS | ||
2 | #define __PERF_FS | ||
3 | |||
4 | const char *sysfs__mountpoint(void); | ||
5 | const char *procfs__mountpoint(void); | ||
6 | |||
7 | #endif /* __PERF_FS */ | ||
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index b752ecb40d86..00a7dcb2f55c 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c | |||
@@ -3,7 +3,7 @@ | |||
3 | #include <unistd.h> | 3 | #include <unistd.h> |
4 | #include <stdio.h> | 4 | #include <stdio.h> |
5 | #include <dirent.h> | 5 | #include <dirent.h> |
6 | #include "fs.h" | 6 | #include <api/fs/fs.h> |
7 | #include <locale.h> | 7 | #include <locale.h> |
8 | #include "util.h" | 8 | #include "util.h" |
9 | #include "pmu.h" | 9 | #include "pmu.h" |
diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources index 595bfc73d2ed..16a475a7d492 100644 --- a/tools/perf/util/python-ext-sources +++ b/tools/perf/util/python-ext-sources | |||
@@ -17,6 +17,6 @@ util/xyarray.c | |||
17 | util/cgroup.c | 17 | util/cgroup.c |
18 | util/rblist.c | 18 | util/rblist.c |
19 | util/strlist.c | 19 | util/strlist.c |
20 | util/fs.c | 20 | ../lib/api/fs/fs.c |
21 | util/trace-event.c | 21 | util/trace-event.c |
22 | ../../lib/rbtree.c | 22 | ../../lib/rbtree.c |
diff --git a/tools/perf/util/record.c b/tools/perf/util/record.c index 373762501dad..049e0a09ccd3 100644 --- a/tools/perf/util/record.c +++ b/tools/perf/util/record.c | |||
@@ -2,7 +2,7 @@ | |||
2 | #include "evsel.h" | 2 | #include "evsel.h" |
3 | #include "cpumap.h" | 3 | #include "cpumap.h" |
4 | #include "parse-events.h" | 4 | #include "parse-events.h" |
5 | #include "fs.h" | 5 | #include <api/fs/fs.h> |
6 | #include "util.h" | 6 | #include "util.h" |
7 | 7 | ||
8 | typedef void (*setup_probe_fn_t)(struct perf_evsel *evsel); | 8 | typedef void (*setup_probe_fn_t)(struct perf_evsel *evsel); |
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index 42ad667bb317..9f66549562bd 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "../perf.h" | 1 | #include "../perf.h" |
2 | #include "util.h" | 2 | #include "util.h" |
3 | #include "fs.h" | 3 | #include <api/fs/fs.h> |
4 | #include <sys/mman.h> | 4 | #include <sys/mman.h> |
5 | #ifdef HAVE_BACKTRACE_SUPPORT | 5 | #ifdef HAVE_BACKTRACE_SUPPORT |
6 | #include <execinfo.h> | 6 | #include <execinfo.h> |