diff options
-rw-r--r-- | tools/Makefile | 16 | ||||
-rw-r--r-- | tools/lib/lk/Makefile | 35 | ||||
-rw-r--r-- | tools/lib/lk/debugfs.c (renamed from tools/perf/util/debugfs.c) | 21 | ||||
-rw-r--r-- | tools/lib/lk/debugfs.h | 31 | ||||
-rw-r--r-- | tools/perf/MANIFEST | 1 | ||||
-rw-r--r-- | tools/perf/Makefile | 34 | ||||
-rw-r--r-- | tools/perf/builtin-kvm.c | 2 | ||||
-rw-r--r-- | tools/perf/builtin-probe.c | 2 | ||||
-rw-r--r-- | tools/perf/perf.c | 2 | ||||
-rw-r--r-- | tools/perf/tests/parse-events.c | 2 | ||||
-rw-r--r-- | tools/perf/util/debugfs.h | 12 | ||||
-rw-r--r-- | tools/perf/util/evlist.c | 2 | ||||
-rw-r--r-- | tools/perf/util/evsel.c | 2 | ||||
-rw-r--r-- | tools/perf/util/parse-events.c | 2 | ||||
-rw-r--r-- | tools/perf/util/probe-event.c | 2 | ||||
-rw-r--r-- | tools/perf/util/python-ext-sources | 1 | ||||
-rw-r--r-- | tools/perf/util/setup.py | 3 | ||||
-rw-r--r-- | tools/perf/util/trace-event-info.c | 2 |
18 files changed, 132 insertions, 40 deletions
diff --git a/tools/Makefile b/tools/Makefile index 798fa0ef048e..623b1cd86cb3 100644 --- a/tools/Makefile +++ b/tools/Makefile | |||
@@ -33,7 +33,13 @@ help: | |||
33 | cpupower: FORCE | 33 | cpupower: FORCE |
34 | $(call descend,power/$@) | 34 | $(call descend,power/$@) |
35 | 35 | ||
36 | firewire lguest perf usb virtio vm: FORCE | 36 | firewire guest usb virtio vm: FORCE |
37 | $(call descend,$@) | ||
38 | |||
39 | liblk: FORCE | ||
40 | $(call descend,lib/lk) | ||
41 | |||
42 | perf: liblk FORCE | ||
37 | $(call descend,$@) | 43 | $(call descend,$@) |
38 | 44 | ||
39 | selftests: FORCE | 45 | selftests: FORCE |
@@ -61,7 +67,13 @@ install: cpupower_install firewire_install lguest_install perf_install \ | |||
61 | cpupower_clean: | 67 | cpupower_clean: |
62 | $(call descend,power/cpupower,clean) | 68 | $(call descend,power/cpupower,clean) |
63 | 69 | ||
64 | firewire_clean lguest_clean perf_clean usb_clean virtio_clean vm_clean: | 70 | firewire_clean lguest_clean usb_clean virtio_clean vm_clean: |
71 | $(call descend,$(@:_clean=),clean) | ||
72 | |||
73 | liblk_clean: | ||
74 | $(call descend,lib/lk,clean) | ||
75 | |||
76 | perf_clean: liblk_clean | ||
65 | $(call descend,$(@:_clean=),clean) | 77 | $(call descend,$(@:_clean=),clean) |
66 | 78 | ||
67 | selftests_clean: | 79 | selftests_clean: |
diff --git a/tools/lib/lk/Makefile b/tools/lib/lk/Makefile new file mode 100644 index 000000000000..8cf576f1a003 --- /dev/null +++ b/tools/lib/lk/Makefile | |||
@@ -0,0 +1,35 @@ | |||
1 | include ../../scripts/Makefile.include | ||
2 | |||
3 | # guard against environment variables | ||
4 | LIB_H= | ||
5 | LIB_OBJS= | ||
6 | |||
7 | LIB_H += debugfs.h | ||
8 | |||
9 | LIB_OBJS += $(OUTPUT)debugfs.o | ||
10 | |||
11 | LIBFILE = liblk.a | ||
12 | |||
13 | CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) -fPIC | ||
14 | EXTLIBS = -lpthread -lrt -lelf -lm | ||
15 | ALL_CFLAGS = $(CFLAGS) $(BASIC_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 | ||
16 | ALL_LDFLAGS = $(LDFLAGS) | ||
17 | |||
18 | RM = rm -f | ||
19 | |||
20 | $(LIBFILE): $(LIB_OBJS) | ||
21 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $(OUTPUT)$@ $(LIB_OBJS) | ||
22 | |||
23 | $(LIB_OBJS): $(LIB_H) | ||
24 | |||
25 | $(OUTPUT)%.o: %.c | ||
26 | $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $< | ||
27 | $(OUTPUT)%.s: %.c | ||
28 | $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $< | ||
29 | $(OUTPUT)%.o: %.S | ||
30 | $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $< | ||
31 | |||
32 | clean: | ||
33 | $(RM) $(LIB_OBJS) $(LIBFILE) | ||
34 | |||
35 | .PHONY: clean | ||
diff --git a/tools/perf/util/debugfs.c b/tools/lib/lk/debugfs.c index e55495c7823a..9cda7a6f5917 100644 --- a/tools/perf/util/debugfs.c +++ b/tools/lib/lk/debugfs.c | |||
@@ -1,14 +1,19 @@ | |||
1 | #include "util.h" | 1 | #include <errno.h> |
2 | #include "debugfs.h" | 2 | #include <stdio.h> |
3 | #include "cache.h" | 3 | #include <stdlib.h> |
4 | 4 | #include <string.h> | |
5 | #include <linux/kernel.h> | 5 | #include <stdbool.h> |
6 | #include <sys/vfs.h> | ||
6 | #include <sys/mount.h> | 7 | #include <sys/mount.h> |
8 | #include <linux/magic.h> | ||
9 | #include <linux/kernel.h> | ||
10 | |||
11 | #include "debugfs.h" | ||
7 | 12 | ||
8 | char debugfs_mountpoint[PATH_MAX + 1] = "/sys/kernel/debug"; | 13 | char debugfs_mountpoint[PATH_MAX + 1] = "/sys/kernel/debug"; |
9 | char tracing_events_path[PATH_MAX + 1] = "/sys/kernel/debug/tracing/events"; | 14 | char tracing_events_path[PATH_MAX + 1] = "/sys/kernel/debug/tracing/events"; |
10 | 15 | ||
11 | static const char *debugfs_known_mountpoints[] = { | 16 | static const char * const debugfs_known_mountpoints[] = { |
12 | "/sys/kernel/debug/", | 17 | "/sys/kernel/debug/", |
13 | "/debug/", | 18 | "/debug/", |
14 | 0, | 19 | 0, |
@@ -19,12 +24,12 @@ static bool debugfs_found; | |||
19 | /* find the path to the mounted debugfs */ | 24 | /* find the path to the mounted debugfs */ |
20 | const char *debugfs_find_mountpoint(void) | 25 | const char *debugfs_find_mountpoint(void) |
21 | { | 26 | { |
22 | const char **ptr; | 27 | const char * const *ptr; |
23 | char type[100]; | 28 | char type[100]; |
24 | FILE *fp; | 29 | FILE *fp; |
25 | 30 | ||
26 | if (debugfs_found) | 31 | if (debugfs_found) |
27 | return (const char *) debugfs_mountpoint; | 32 | return (const char *)debugfs_mountpoint; |
28 | 33 | ||
29 | ptr = debugfs_known_mountpoints; | 34 | ptr = debugfs_known_mountpoints; |
30 | while (*ptr) { | 35 | while (*ptr) { |
diff --git a/tools/lib/lk/debugfs.h b/tools/lib/lk/debugfs.h new file mode 100644 index 000000000000..bc5ad2df7c0a --- /dev/null +++ b/tools/lib/lk/debugfs.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef __LK_DEBUGFS_H__ | ||
2 | #define __LK_DEBUGFS_H__ | ||
3 | |||
4 | #define _STR(x) #x | ||
5 | #define STR(x) _STR(x) | ||
6 | |||
7 | /* | ||
8 | * On most systems <limits.h> would have given us this, but not on some systems | ||
9 | * (e.g. GNU/Hurd). | ||
10 | */ | ||
11 | #ifndef PATH_MAX | ||
12 | #define PATH_MAX 4096 | ||
13 | #endif | ||
14 | |||
15 | #ifndef DEBUGFS_MAGIC | ||
16 | #define DEBUGFS_MAGIC 0x64626720 | ||
17 | #endif | ||
18 | |||
19 | #ifndef PERF_DEBUGFS_ENVIRONMENT | ||
20 | #define PERF_DEBUGFS_ENVIRONMENT "PERF_DEBUGFS_DIR" | ||
21 | #endif | ||
22 | |||
23 | const char *debugfs_find_mountpoint(void); | ||
24 | int debugfs_valid_mountpoint(const char *debugfs); | ||
25 | char *debugfs_mount(const char *mountpoint); | ||
26 | void debugfs_set_path(const char *mountpoint); | ||
27 | |||
28 | extern char debugfs_mountpoint[]; | ||
29 | extern char tracing_events_path[]; | ||
30 | |||
31 | #endif /* __LK_DEBUGFS_H__ */ | ||
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST index 39d41068484f..025de796067c 100644 --- a/tools/perf/MANIFEST +++ b/tools/perf/MANIFEST | |||
@@ -1,6 +1,7 @@ | |||
1 | tools/perf | 1 | tools/perf |
2 | tools/scripts | 2 | tools/scripts |
3 | tools/lib/traceevent | 3 | tools/lib/traceevent |
4 | tools/lib/lk | ||
4 | include/linux/const.h | 5 | include/linux/const.h |
5 | include/linux/perf_event.h | 6 | include/linux/perf_event.h |
6 | include/linux/rbtree.h | 7 | include/linux/rbtree.h |
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index bb74c79cd16e..3dcd6273a90b 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -215,6 +215,7 @@ BASIC_CFLAGS = \ | |||
215 | -Iutil \ | 215 | -Iutil \ |
216 | -I. \ | 216 | -I. \ |
217 | -I$(TRACE_EVENT_DIR) \ | 217 | -I$(TRACE_EVENT_DIR) \ |
218 | -I../lib/ \ | ||
218 | -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE | 219 | -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE |
219 | 220 | ||
220 | BASIC_LDFLAGS = | 221 | BASIC_LDFLAGS = |
@@ -240,19 +241,28 @@ SCRIPT_SH += perf-archive.sh | |||
240 | grep-libs = $(filter -l%,$(1)) | 241 | grep-libs = $(filter -l%,$(1)) |
241 | strip-libs = $(filter-out -l%,$(1)) | 242 | strip-libs = $(filter-out -l%,$(1)) |
242 | 243 | ||
244 | LK_DIR = ../lib/lk/ | ||
243 | TRACE_EVENT_DIR = ../lib/traceevent/ | 245 | TRACE_EVENT_DIR = ../lib/traceevent/ |
244 | 246 | ||
247 | LK_PATH=$(LK_DIR) | ||
248 | |||
245 | ifneq ($(OUTPUT),) | 249 | ifneq ($(OUTPUT),) |
246 | TE_PATH=$(OUTPUT) | 250 | TE_PATH=$(OUTPUT) |
251 | ifneq ($(subdir),) | ||
252 | LK_PATH=$(OUTPUT)$(LK_DIR) | ||
253 | else | ||
254 | LK_PATH=$(OUTPUT) | ||
255 | endif | ||
247 | else | 256 | else |
248 | TE_PATH=$(TRACE_EVENT_DIR) | 257 | TE_PATH=$(TRACE_EVENT_DIR) |
249 | endif | 258 | endif |
250 | 259 | ||
251 | LIBTRACEEVENT = $(TE_PATH)libtraceevent.a | 260 | LIBTRACEEVENT = $(TE_PATH)libtraceevent.a |
252 | TE_LIB := -L$(TE_PATH) -ltraceevent | ||
253 | |||
254 | export LIBTRACEEVENT | 261 | export LIBTRACEEVENT |
255 | 262 | ||
263 | LIBLK = $(LK_PATH)liblk.a | ||
264 | export LIBLK | ||
265 | |||
256 | # python extension build directories | 266 | # python extension build directories |
257 | PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/ | 267 | PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/ |
258 | PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/ | 268 | PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/ |
@@ -355,7 +365,6 @@ LIB_H += util/cache.h | |||
355 | LIB_H += util/callchain.h | 365 | LIB_H += util/callchain.h |
356 | LIB_H += util/build-id.h | 366 | LIB_H += util/build-id.h |
357 | LIB_H += util/debug.h | 367 | LIB_H += util/debug.h |
358 | LIB_H += util/debugfs.h | ||
359 | LIB_H += util/sysfs.h | 368 | LIB_H += util/sysfs.h |
360 | LIB_H += util/pmu.h | 369 | LIB_H += util/pmu.h |
361 | LIB_H += util/event.h | 370 | LIB_H += util/event.h |
@@ -416,7 +425,6 @@ LIB_OBJS += $(OUTPUT)util/annotate.o | |||
416 | LIB_OBJS += $(OUTPUT)util/build-id.o | 425 | LIB_OBJS += $(OUTPUT)util/build-id.o |
417 | LIB_OBJS += $(OUTPUT)util/config.o | 426 | LIB_OBJS += $(OUTPUT)util/config.o |
418 | LIB_OBJS += $(OUTPUT)util/ctype.o | 427 | LIB_OBJS += $(OUTPUT)util/ctype.o |
419 | LIB_OBJS += $(OUTPUT)util/debugfs.o | ||
420 | LIB_OBJS += $(OUTPUT)util/sysfs.o | 428 | LIB_OBJS += $(OUTPUT)util/sysfs.o |
421 | LIB_OBJS += $(OUTPUT)util/pmu.o | 429 | LIB_OBJS += $(OUTPUT)util/pmu.o |
422 | LIB_OBJS += $(OUTPUT)util/environment.o | 430 | LIB_OBJS += $(OUTPUT)util/environment.o |
@@ -536,7 +544,7 @@ BUILTIN_OBJS += $(OUTPUT)builtin-kvm.o | |||
536 | BUILTIN_OBJS += $(OUTPUT)builtin-inject.o | 544 | BUILTIN_OBJS += $(OUTPUT)builtin-inject.o |
537 | BUILTIN_OBJS += $(OUTPUT)tests/builtin-test.o | 545 | BUILTIN_OBJS += $(OUTPUT)tests/builtin-test.o |
538 | 546 | ||
539 | PERFLIBS = $(LIB_FILE) $(LIBTRACEEVENT) | 547 | PERFLIBS = $(LIB_FILE) $(LIBLK) $(LIBTRACEEVENT) |
540 | 548 | ||
541 | # | 549 | # |
542 | # Platform specific tweaks | 550 | # Platform specific tweaks |
@@ -1051,6 +1059,18 @@ $(LIBTRACEEVENT): | |||
1051 | $(LIBTRACEEVENT)-clean: | 1059 | $(LIBTRACEEVENT)-clean: |
1052 | $(QUIET_SUBDIR0)$(TRACE_EVENT_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) clean | 1060 | $(QUIET_SUBDIR0)$(TRACE_EVENT_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) clean |
1053 | 1061 | ||
1062 | # if subdir is set, we've been called from above so target has been built | ||
1063 | # already | ||
1064 | $(LIBLK): | ||
1065 | ifeq ($(subdir),) | ||
1066 | $(QUIET_SUBDIR0)$(LK_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) liblk.a | ||
1067 | endif | ||
1068 | |||
1069 | $(LIBLK)-clean: | ||
1070 | ifeq ($(subdir),) | ||
1071 | $(QUIET_SUBDIR0)$(LK_DIR) $(QUIET_SUBDIR1) O=$(OUTPUT) clean | ||
1072 | endif | ||
1073 | |||
1054 | help: | 1074 | help: |
1055 | @echo 'Perf make targets:' | 1075 | @echo 'Perf make targets:' |
1056 | @echo ' doc - make *all* documentation (see below)' | 1076 | @echo ' doc - make *all* documentation (see below)' |
@@ -1171,7 +1191,7 @@ $(INSTALL_DOC_TARGETS): | |||
1171 | 1191 | ||
1172 | ### Cleaning rules | 1192 | ### Cleaning rules |
1173 | 1193 | ||
1174 | clean: $(LIBTRACEEVENT)-clean | 1194 | clean: $(LIBTRACEEVENT)-clean $(LIBLK)-clean |
1175 | $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf.o $(LANG_BINDINGS) | 1195 | $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf.o $(LANG_BINDINGS) |
1176 | $(RM) $(ALL_PROGRAMS) perf | 1196 | $(RM) $(ALL_PROGRAMS) perf |
1177 | $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* | 1197 | $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* |
@@ -1181,6 +1201,6 @@ clean: $(LIBTRACEEVENT)-clean | |||
1181 | $(RM) $(OUTPUT)util/*-flex* | 1201 | $(RM) $(OUTPUT)util/*-flex* |
1182 | $(python-clean) | 1202 | $(python-clean) |
1183 | 1203 | ||
1184 | .PHONY: all install clean strip $(LIBTRACEEVENT) | 1204 | .PHONY: all install clean strip $(LIBTRACEEVENT) $(LIBLK) |
1185 | .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell | 1205 | .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell |
1186 | .PHONY: .FORCE-PERF-VERSION-FILE TAGS tags cscope .FORCE-PERF-CFLAGS | 1206 | .PHONY: .FORCE-PERF-VERSION-FILE TAGS tags cscope .FORCE-PERF-CFLAGS |
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 37a769d7f9fe..533501e2b07c 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include "util/parse-options.h" | 12 | #include "util/parse-options.h" |
13 | #include "util/trace-event.h" | 13 | #include "util/trace-event.h" |
14 | #include "util/debug.h" | 14 | #include "util/debug.h" |
15 | #include "util/debugfs.h" | 15 | #include <lk/debugfs.h> |
16 | #include "util/tool.h" | 16 | #include "util/tool.h" |
17 | #include "util/stat.h" | 17 | #include "util/stat.h" |
18 | 18 | ||
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index de38a034b129..e8a66f9a6715 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include "util/strfilter.h" | 37 | #include "util/strfilter.h" |
38 | #include "util/symbol.h" | 38 | #include "util/symbol.h" |
39 | #include "util/debug.h" | 39 | #include "util/debug.h" |
40 | #include "util/debugfs.h" | 40 | #include <lk/debugfs.h> |
41 | #include "util/parse-options.h" | 41 | #include "util/parse-options.h" |
42 | #include "util/probe-finder.h" | 42 | #include "util/probe-finder.h" |
43 | #include "util/probe-event.h" | 43 | #include "util/probe-event.h" |
diff --git a/tools/perf/perf.c b/tools/perf/perf.c index 095b88207cd3..f53b735e2822 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "util/quote.h" | 13 | #include "util/quote.h" |
14 | #include "util/run-command.h" | 14 | #include "util/run-command.h" |
15 | #include "util/parse-events.h" | 15 | #include "util/parse-events.h" |
16 | #include "util/debugfs.h" | 16 | #include <lk/debugfs.h> |
17 | #include <pthread.h> | 17 | #include <pthread.h> |
18 | 18 | ||
19 | const char perf_usage_string[] = | 19 | const char perf_usage_string[] = |
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c index c5636f36fe31..0d3d0c59f924 100644 --- a/tools/perf/tests/parse-events.c +++ b/tools/perf/tests/parse-events.c | |||
@@ -3,7 +3,7 @@ | |||
3 | #include "evsel.h" | 3 | #include "evsel.h" |
4 | #include "evlist.h" | 4 | #include "evlist.h" |
5 | #include "sysfs.h" | 5 | #include "sysfs.h" |
6 | #include "debugfs.h" | 6 | #include <lk/debugfs.h> |
7 | #include "tests.h" | 7 | #include "tests.h" |
8 | #include <linux/hw_breakpoint.h> | 8 | #include <linux/hw_breakpoint.h> |
9 | 9 | ||
diff --git a/tools/perf/util/debugfs.h b/tools/perf/util/debugfs.h deleted file mode 100644 index 68f3e87ec57f..000000000000 --- a/tools/perf/util/debugfs.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef __DEBUGFS_H__ | ||
2 | #define __DEBUGFS_H__ | ||
3 | |||
4 | const char *debugfs_find_mountpoint(void); | ||
5 | int debugfs_valid_mountpoint(const char *debugfs); | ||
6 | char *debugfs_mount(const char *mountpoint); | ||
7 | void debugfs_set_path(const char *mountpoint); | ||
8 | |||
9 | extern char debugfs_mountpoint[]; | ||
10 | extern char tracing_events_path[]; | ||
11 | |||
12 | #endif /* __DEBUGFS_H__ */ | ||
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index bc4ad7977438..7626bb49508d 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Released under the GPL v2. (and only v2, not any later version) | 7 | * Released under the GPL v2. (and only v2, not any later version) |
8 | */ | 8 | */ |
9 | #include "util.h" | 9 | #include "util.h" |
10 | #include "debugfs.h" | 10 | #include <lk/debugfs.h> |
11 | #include <poll.h> | 11 | #include <poll.h> |
12 | #include "cpumap.h" | 12 | #include "cpumap.h" |
13 | #include "thread_map.h" | 13 | #include "thread_map.h" |
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 9c82f98f26de..dc16231f7a5d 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <byteswap.h> | 10 | #include <byteswap.h> |
11 | #include <linux/bitops.h> | 11 | #include <linux/bitops.h> |
12 | #include "asm/bug.h" | 12 | #include "asm/bug.h" |
13 | #include "debugfs.h" | 13 | #include <lk/debugfs.h> |
14 | #include "event-parse.h" | 14 | #include "event-parse.h" |
15 | #include "evsel.h" | 15 | #include "evsel.h" |
16 | #include "evlist.h" | 16 | #include "evlist.h" |
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index c84f48cf9678..6c8bb0fb189b 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c | |||
@@ -10,7 +10,7 @@ | |||
10 | #include "symbol.h" | 10 | #include "symbol.h" |
11 | #include "cache.h" | 11 | #include "cache.h" |
12 | #include "header.h" | 12 | #include "header.h" |
13 | #include "debugfs.h" | 13 | #include <lk/debugfs.h> |
14 | #include "parse-events-bison.h" | 14 | #include "parse-events-bison.h" |
15 | #define YY_EXTRA_TYPE int | 15 | #define YY_EXTRA_TYPE int |
16 | #include "parse-events-flex.h" | 16 | #include "parse-events-flex.h" |
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 49a256e6e0a2..aa04bf9c9ad7 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include "color.h" | 40 | #include "color.h" |
41 | #include "symbol.h" | 41 | #include "symbol.h" |
42 | #include "thread.h" | 42 | #include "thread.h" |
43 | #include "debugfs.h" | 43 | #include <lk/debugfs.h> |
44 | #include "trace-event.h" /* For __maybe_unused */ | 44 | #include "trace-event.h" /* For __maybe_unused */ |
45 | #include "probe-event.h" | 45 | #include "probe-event.h" |
46 | #include "probe-finder.h" | 46 | #include "probe-finder.h" |
diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources index 64536a993f4a..f75ae1b9900c 100644 --- a/tools/perf/util/python-ext-sources +++ b/tools/perf/util/python-ext-sources | |||
@@ -15,7 +15,6 @@ util/thread_map.c | |||
15 | util/util.c | 15 | util/util.c |
16 | util/xyarray.c | 16 | util/xyarray.c |
17 | util/cgroup.c | 17 | util/cgroup.c |
18 | util/debugfs.c | ||
19 | util/rblist.c | 18 | util/rblist.c |
20 | util/strlist.c | 19 | util/strlist.c |
21 | util/sysfs.c | 20 | util/sysfs.c |
diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py index 73d510269784..6b0ed322907e 100644 --- a/tools/perf/util/setup.py +++ b/tools/perf/util/setup.py | |||
@@ -24,6 +24,7 @@ cflags += getenv('CFLAGS', '').split() | |||
24 | build_lib = getenv('PYTHON_EXTBUILD_LIB') | 24 | build_lib = getenv('PYTHON_EXTBUILD_LIB') |
25 | build_tmp = getenv('PYTHON_EXTBUILD_TMP') | 25 | build_tmp = getenv('PYTHON_EXTBUILD_TMP') |
26 | libtraceevent = getenv('LIBTRACEEVENT') | 26 | libtraceevent = getenv('LIBTRACEEVENT') |
27 | liblk = getenv('LIBLK') | ||
27 | 28 | ||
28 | ext_sources = [f.strip() for f in file('util/python-ext-sources') | 29 | ext_sources = [f.strip() for f in file('util/python-ext-sources') |
29 | if len(f.strip()) > 0 and f[0] != '#'] | 30 | if len(f.strip()) > 0 and f[0] != '#'] |
@@ -32,7 +33,7 @@ perf = Extension('perf', | |||
32 | sources = ext_sources, | 33 | sources = ext_sources, |
33 | include_dirs = ['util/include'], | 34 | include_dirs = ['util/include'], |
34 | extra_compile_args = cflags, | 35 | extra_compile_args = cflags, |
35 | extra_objects = [libtraceevent], | 36 | extra_objects = [libtraceevent, liblk], |
36 | ) | 37 | ) |
37 | 38 | ||
38 | setup(name='perf', | 39 | setup(name='perf', |
diff --git a/tools/perf/util/trace-event-info.c b/tools/perf/util/trace-event-info.c index a8d81c35ef66..36b9b49d0177 100644 --- a/tools/perf/util/trace-event-info.c +++ b/tools/perf/util/trace-event-info.c | |||
@@ -38,7 +38,7 @@ | |||
38 | 38 | ||
39 | #include "../perf.h" | 39 | #include "../perf.h" |
40 | #include "trace-event.h" | 40 | #include "trace-event.h" |
41 | #include "debugfs.h" | 41 | #include <lk/debugfs.h> |
42 | #include "evsel.h" | 42 | #include "evsel.h" |
43 | 43 | ||
44 | #define VERSION "0.5" | 44 | #define VERSION "0.5" |