aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/lib/api/Makefile2
-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.perf3
-rw-r--r--tools/perf/tests/parse-events.c2
-rw-r--r--tools/perf/util/cpumap.c2
-rw-r--r--tools/perf/util/fs.h7
-rw-r--r--tools/perf/util/pmu.c2
-rw-r--r--tools/perf/util/python-ext-sources2
-rw-r--r--tools/perf/util/record.c2
-rw-r--r--tools/perf/util/util.c2
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=
9LIB_OBJS= 9LIB_OBJS=
10 10
11LIB_H += fs/debugfs.h 11LIB_H += fs/debugfs.h
12LIB_H += fs/fs.h
12 13
13LIB_OBJS += $(OUTPUT)fs/debugfs.o 14LIB_OBJS += $(OUTPUT)fs/debugfs.o
15LIB_OBJS += $(OUTPUT)fs/fs.o
14 16
15LIBFILE = libapikfs.a 17LIBFILE = 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
7static const char * const sysfs__fs_known_mountpoints[] = { 12static 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 12const char *sysfs__mountpoint(void);
13const 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
218LIB_H += util/include/linux/kernel.h 218LIB_H += util/include/linux/kernel.h
219LIB_H += util/include/linux/list.h 219LIB_H += util/include/linux/list.h
220LIB_H += util/include/linux/export.h 220LIB_H += util/include/linux/export.h
221LIB_H += util/include/linux/magic.h
222LIB_H += util/include/linux/poison.h 221LIB_H += util/include/linux/poison.h
223LIB_H += util/include/linux/prefetch.h 222LIB_H += util/include/linux/prefetch.h
224LIB_H += util/include/linux/rbtree.h 223LIB_H += util/include/linux/rbtree.h
@@ -244,7 +243,6 @@ LIB_H += util/cache.h
244LIB_H += util/callchain.h 243LIB_H += util/callchain.h
245LIB_H += util/build-id.h 244LIB_H += util/build-id.h
246LIB_H += util/debug.h 245LIB_H += util/debug.h
247LIB_H += util/fs.h
248LIB_H += util/pmu.h 246LIB_H += util/pmu.h
249LIB_H += util/event.h 247LIB_H += util/event.h
250LIB_H += util/evsel.h 248LIB_H += util/evsel.h
@@ -306,7 +304,6 @@ LIB_OBJS += $(OUTPUT)util/annotate.o
306LIB_OBJS += $(OUTPUT)util/build-id.o 304LIB_OBJS += $(OUTPUT)util/build-id.o
307LIB_OBJS += $(OUTPUT)util/config.o 305LIB_OBJS += $(OUTPUT)util/config.o
308LIB_OBJS += $(OUTPUT)util/ctype.o 306LIB_OBJS += $(OUTPUT)util/ctype.o
309LIB_OBJS += $(OUTPUT)util/fs.o
310LIB_OBJS += $(OUTPUT)util/pmu.o 307LIB_OBJS += $(OUTPUT)util/pmu.o
311LIB_OBJS += $(OUTPUT)util/environment.o 308LIB_OBJS += $(OUTPUT)util/environment.o
312LIB_OBJS += $(OUTPUT)util/event.o 309LIB_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
4const char *sysfs__mountpoint(void);
5const 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
17util/cgroup.c 17util/cgroup.c
18util/rblist.c 18util/rblist.c
19util/strlist.c 19util/strlist.c
20util/fs.c 20../lib/api/fs/fs.c
21util/trace-event.c 21util/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
8typedef void (*setup_probe_fn_t)(struct perf_evsel *evsel); 8typedef 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>