diff options
author | Borislav Petkov <bp@suse.de> | 2013-02-20 10:32:30 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-03-15 12:06:00 -0400 |
commit | 85c66be101e1847f0eb46dcb48d5738572129694 (patch) | |
tree | 96900665b0edb1466da7b82bd7ca619858f4ba4d /tools/perf | |
parent | 9687b89d21999301ed386855c04b60d00ed1ec02 (diff) |
perf tools: Introduce tools/lib/lk library
This introduces the tools/lib/lk library, that will gradually have the
routines that now are used in tools/perf/ and other tools and that can
be shared.
Start by carving out debugfs routines for general use.
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1361374353-30385-5-git-send-email-bp@alien8.de
[ committer note: Add tools/lib/lk/ to perf's MANIFEST so that its tarballs continue to build ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-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.c | 111 | ||||
-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 |
15 files changed, 39 insertions, 141 deletions
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.c b/tools/perf/util/debugfs.c deleted file mode 100644 index e55495c7823a..000000000000 --- a/tools/perf/util/debugfs.c +++ /dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | #include "util.h" | ||
2 | #include "debugfs.h" | ||
3 | #include "cache.h" | ||
4 | |||
5 | #include <linux/kernel.h> | ||
6 | #include <sys/mount.h> | ||
7 | |||
8 | char debugfs_mountpoint[PATH_MAX + 1] = "/sys/kernel/debug"; | ||
9 | char tracing_events_path[PATH_MAX + 1] = "/sys/kernel/debug/tracing/events"; | ||
10 | |||
11 | static const char *debugfs_known_mountpoints[] = { | ||
12 | "/sys/kernel/debug/", | ||
13 | "/debug/", | ||
14 | 0, | ||
15 | }; | ||
16 | |||
17 | static bool debugfs_found; | ||
18 | |||
19 | /* find the path to the mounted debugfs */ | ||
20 | const char *debugfs_find_mountpoint(void) | ||
21 | { | ||
22 | const char **ptr; | ||
23 | char type[100]; | ||
24 | FILE *fp; | ||
25 | |||
26 | if (debugfs_found) | ||
27 | return (const char *) debugfs_mountpoint; | ||
28 | |||
29 | ptr = debugfs_known_mountpoints; | ||
30 | while (*ptr) { | ||
31 | if (debugfs_valid_mountpoint(*ptr) == 0) { | ||
32 | debugfs_found = true; | ||
33 | strcpy(debugfs_mountpoint, *ptr); | ||
34 | return debugfs_mountpoint; | ||
35 | } | ||
36 | ptr++; | ||
37 | } | ||
38 | |||
39 | /* give up and parse /proc/mounts */ | ||
40 | fp = fopen("/proc/mounts", "r"); | ||
41 | if (fp == NULL) | ||
42 | return NULL; | ||
43 | |||
44 | while (fscanf(fp, "%*s %" STR(PATH_MAX) "s %99s %*s %*d %*d\n", | ||
45 | debugfs_mountpoint, type) == 2) { | ||
46 | if (strcmp(type, "debugfs") == 0) | ||
47 | break; | ||
48 | } | ||
49 | fclose(fp); | ||
50 | |||
51 | if (strcmp(type, "debugfs") != 0) | ||
52 | return NULL; | ||
53 | |||
54 | debugfs_found = true; | ||
55 | |||
56 | return debugfs_mountpoint; | ||
57 | } | ||
58 | |||
59 | /* verify that a mountpoint is actually a debugfs instance */ | ||
60 | |||
61 | int debugfs_valid_mountpoint(const char *debugfs) | ||
62 | { | ||
63 | struct statfs st_fs; | ||
64 | |||
65 | if (statfs(debugfs, &st_fs) < 0) | ||
66 | return -ENOENT; | ||
67 | else if (st_fs.f_type != (long) DEBUGFS_MAGIC) | ||
68 | return -ENOENT; | ||
69 | |||
70 | return 0; | ||
71 | } | ||
72 | |||
73 | static void debugfs_set_tracing_events_path(const char *mountpoint) | ||
74 | { | ||
75 | snprintf(tracing_events_path, sizeof(tracing_events_path), "%s/%s", | ||
76 | mountpoint, "tracing/events"); | ||
77 | } | ||
78 | |||
79 | /* mount the debugfs somewhere if it's not mounted */ | ||
80 | |||
81 | char *debugfs_mount(const char *mountpoint) | ||
82 | { | ||
83 | /* see if it's already mounted */ | ||
84 | if (debugfs_find_mountpoint()) | ||
85 | goto out; | ||
86 | |||
87 | /* if not mounted and no argument */ | ||
88 | if (mountpoint == NULL) { | ||
89 | /* see if environment variable set */ | ||
90 | mountpoint = getenv(PERF_DEBUGFS_ENVIRONMENT); | ||
91 | /* if no environment variable, use default */ | ||
92 | if (mountpoint == NULL) | ||
93 | mountpoint = "/sys/kernel/debug"; | ||
94 | } | ||
95 | |||
96 | if (mount(NULL, mountpoint, "debugfs", 0, NULL) < 0) | ||
97 | return NULL; | ||
98 | |||
99 | /* save the mountpoint */ | ||
100 | debugfs_found = true; | ||
101 | strncpy(debugfs_mountpoint, mountpoint, sizeof(debugfs_mountpoint)); | ||
102 | out: | ||
103 | debugfs_set_tracing_events_path(debugfs_mountpoint); | ||
104 | return debugfs_mountpoint; | ||
105 | } | ||
106 | |||
107 | void debugfs_set_path(const char *mountpoint) | ||
108 | { | ||
109 | snprintf(debugfs_mountpoint, sizeof(debugfs_mountpoint), "%s", mountpoint); | ||
110 | debugfs_set_tracing_events_path(mountpoint); | ||
111 | } | ||
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" |