aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2019-09-20 12:14:00 -0400
committerIngo Molnar <mingo@kernel.org>2019-09-20 12:16:42 -0400
commit351a1f5c8afa13ea5cfcdae543f6596ef8ebdbd9 (patch)
tree6d039ac0d47666bd6de701911a283c51bea7105e /tools/perf/tests
parent7f2444d38f6bbfa12bc15e2533d8f9daa85ca02b (diff)
parent2bff2b828502b5e5d5ea5a52643d3542053df03f (diff)
Merge tag 'perf-core-for-mingo-5.4-20190920-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf stat: Srikar Dronamraju: - Fix a segmentation fault when using repeat forever. - Reset previous counts on repeat with interval. aarch64: James Clark: - Add PMU event JSON files for Cortex-A76 and Neoverse N1. PowerPC: Anju T Sudhakar: - Make 'trace_cycles' the default event for 'perf kvm record' in PowerPC. S/390: - Link libjvmti to tools/lib/string.o to have a weak strlcpy() implementation, providing previously unresolved symbol on s/390. perf test: Jiri Olsa: - Add libperf automated tests to 'make -C tools/perf build-test'. Colin Ian King: - Fix spelling mistake. Tree wide: Arnaldo Carvalho de Melo: - Some more header file sanitization. libperf: Jiri Olsa: - Add dependency on libperf for python.so binding. libtraceevent: Sakari Ailus: - Convert remaining %p[fF] users to %p[sS]. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/tests')
-rw-r--r--tools/perf/tests/bitmap.c2
-rw-r--r--tools/perf/tests/clang.c2
-rw-r--r--tools/perf/tests/code-reading.c2
-rw-r--r--tools/perf/tests/cpumap.c1
-rw-r--r--tools/perf/tests/dso-data.c1
-rw-r--r--tools/perf/tests/dwarf-unwind.c1
-rw-r--r--tools/perf/tests/event-times.c1
-rw-r--r--tools/perf/tests/event_update.c4
-rw-r--r--tools/perf/tests/hists_common.c2
-rw-r--r--tools/perf/tests/keep-tracking.c3
-rw-r--r--tools/perf/tests/llvm.c1
-rw-r--r--tools/perf/tests/make6
-rw-r--r--tools/perf/tests/mem2node.c2
-rw-r--r--tools/perf/tests/mmap-basic.c3
-rw-r--r--tools/perf/tests/mmap-thread-lookup.c4
-rw-r--r--tools/perf/tests/openat-syscall-all-cpus.c5
-rw-r--r--tools/perf/tests/parse-events.c1
-rw-r--r--tools/perf/tests/parse-no-sample-id-all.c2
-rw-r--r--tools/perf/tests/perf-hooks.c1
-rw-r--r--tools/perf/tests/pmu.c1
-rw-r--r--tools/perf/tests/sample-parsing.c2
-rw-r--r--tools/perf/tests/stat.c1
-rw-r--r--tools/perf/tests/switch-tracking.c1
-rw-r--r--tools/perf/tests/task-exit.c2
-rw-r--r--tools/perf/tests/thread-map.c1
-rw-r--r--tools/perf/tests/topology.c2
-rw-r--r--tools/perf/tests/vmlinux-kallsyms.c2
27 files changed, 29 insertions, 27 deletions
diff --git a/tools/perf/tests/bitmap.c b/tools/perf/tests/bitmap.c
index db2aadff3708..96c137360918 100644
--- a/tools/perf/tests/bitmap.c
+++ b/tools/perf/tests/bitmap.c
@@ -2,8 +2,8 @@
2#include <linux/compiler.h> 2#include <linux/compiler.h>
3#include <linux/bitmap.h> 3#include <linux/bitmap.h>
4#include <perf/cpumap.h> 4#include <perf/cpumap.h>
5#include <internal/cpumap.h>
5#include "tests.h" 6#include "tests.h"
6#include "cpumap.h"
7#include "debug.h" 7#include "debug.h"
8 8
9#define NBITS 100 9#define NBITS 100
diff --git a/tools/perf/tests/clang.c b/tools/perf/tests/clang.c
index f45fe11dcf50..2577d3ed1531 100644
--- a/tools/perf/tests/clang.c
+++ b/tools/perf/tests/clang.c
@@ -1,7 +1,5 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include "tests.h" 2#include "tests.h"
3#include "debug.h"
4#include "util.h"
5#include "c++/clang-c.h" 3#include "c++/clang-c.h"
6#include <linux/kernel.h> 4#include <linux/kernel.h>
7 5
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index c1c29e08e7fb..fd02c1f1d976 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -19,12 +19,12 @@
19#include "evlist.h" 19#include "evlist.h"
20#include "evsel.h" 20#include "evsel.h"
21#include "thread_map.h" 21#include "thread_map.h"
22#include "cpumap.h"
23#include "machine.h" 22#include "machine.h"
24#include "map.h" 23#include "map.h"
25#include "symbol.h" 24#include "symbol.h"
26#include "event.h" 25#include "event.h"
27#include "record.h" 26#include "record.h"
27#include "util/synthetic-events.h"
28#include "thread.h" 28#include "thread.h"
29 29
30#include "tests.h" 30#include "tests.h"
diff --git a/tools/perf/tests/cpumap.c b/tools/perf/tests/cpumap.c
index 39493de50117..8a0d236202b0 100644
--- a/tools/perf/tests/cpumap.c
+++ b/tools/perf/tests/cpumap.c
@@ -3,6 +3,7 @@
3#include <stdio.h> 3#include <stdio.h>
4#include "cpumap.h" 4#include "cpumap.h"
5#include "event.h" 5#include "event.h"
6#include "util/synthetic-events.h"
6#include <string.h> 7#include <string.h>
7#include <linux/bitops.h> 8#include <linux/bitops.h>
8#include <perf/cpumap.h> 9#include <perf/cpumap.h>
diff --git a/tools/perf/tests/dso-data.c b/tools/perf/tests/dso-data.c
index a4874d4ce7ef..627c1aaf1c9e 100644
--- a/tools/perf/tests/dso-data.c
+++ b/tools/perf/tests/dso-data.c
@@ -10,7 +10,6 @@
10#include <sys/resource.h> 10#include <sys/resource.h>
11#include <api/fs/fs.h> 11#include <api/fs/fs.h>
12#include "dso.h" 12#include "dso.h"
13#include "util.h"
14#include "machine.h" 13#include "machine.h"
15#include "symbol.h" 14#include "symbol.h"
16#include "tests.h" 15#include "tests.h"
diff --git a/tools/perf/tests/dwarf-unwind.c b/tools/perf/tests/dwarf-unwind.c
index 4125255ff637..4f4ecbcbe87e 100644
--- a/tools/perf/tests/dwarf-unwind.c
+++ b/tools/perf/tests/dwarf-unwind.c
@@ -15,6 +15,7 @@
15#include "symbol.h" 15#include "symbol.h"
16#include "thread.h" 16#include "thread.h"
17#include "callchain.h" 17#include "callchain.h"
18#include "util/synthetic-events.h"
18 19
19#if defined (__x86_64__) || defined (__i386__) || defined (__powerpc__) 20#if defined (__x86_64__) || defined (__i386__) || defined (__powerpc__)
20#include "arch-tests.h" 21#include "arch-tests.h"
diff --git a/tools/perf/tests/event-times.c b/tools/perf/tests/event-times.c
index d824a726906c..0228ba435a2a 100644
--- a/tools/perf/tests/event-times.c
+++ b/tools/perf/tests/event-times.c
@@ -9,7 +9,6 @@
9#include "tests.h" 9#include "tests.h"
10#include "evlist.h" 10#include "evlist.h"
11#include "evsel.h" 11#include "evsel.h"
12#include "util.h"
13#include "debug.h" 12#include "debug.h"
14#include "parse-events.h" 13#include "parse-events.h"
15#include "thread_map.h" 14#include "thread_map.h"
diff --git a/tools/perf/tests/event_update.c b/tools/perf/tests/event_update.c
index cac4290e233a..0497d900ced2 100644
--- a/tools/perf/tests/event_update.c
+++ b/tools/perf/tests/event_update.c
@@ -2,10 +2,12 @@
2#include <linux/compiler.h> 2#include <linux/compiler.h>
3#include <perf/cpumap.h> 3#include <perf/cpumap.h>
4#include <string.h> 4#include <string.h>
5#include "cpumap.h"
5#include "evlist.h" 6#include "evlist.h"
6#include "evsel.h" 7#include "evsel.h"
7#include "header.h" 8#include "header.h"
8#include "machine.h" 9#include "machine.h"
10#include "util/synthetic-events.h"
9#include "tool.h" 11#include "tool.h"
10#include "tests.h" 12#include "tests.h"
11#include "debug.h" 13#include "debug.h"
@@ -92,7 +94,7 @@ int test__event_update(struct test *test __maybe_unused, int subtest __maybe_unu
92 94
93 evsel = perf_evlist__first(evlist); 95 evsel = perf_evlist__first(evlist);
94 96
95 TEST_ASSERT_VAL("failed to allos ids", 97 TEST_ASSERT_VAL("failed to allocate ids",
96 !perf_evsel__alloc_id(evsel, 1, 1)); 98 !perf_evsel__alloc_id(evsel, 1, 1));
97 99
98 perf_evlist__id_add(evlist, evsel, 0, 0, 123); 100 perf_evlist__id_add(evlist, evsel, 0, 0, 123);
diff --git a/tools/perf/tests/hists_common.c b/tools/perf/tests/hists_common.c
index de110d8f169b..6f34d08b84e5 100644
--- a/tools/perf/tests/hists_common.c
+++ b/tools/perf/tests/hists_common.c
@@ -2,6 +2,7 @@
2#include <inttypes.h> 2#include <inttypes.h>
3#include "util/debug.h" 3#include "util/debug.h"
4#include "util/dso.h" 4#include "util/dso.h"
5#include "util/event.h" // struct perf_sample
5#include "util/map.h" 6#include "util/map.h"
6#include "util/symbol.h" 7#include "util/symbol.h"
7#include "util/sort.h" 8#include "util/sort.h"
@@ -10,6 +11,7 @@
10#include "util/thread.h" 11#include "util/thread.h"
11#include "tests/hists_common.h" 12#include "tests/hists_common.h"
12#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/perf_event.h>
13 15
14static struct { 16static struct {
15 u32 pid; 17 u32 pid;
diff --git a/tools/perf/tests/keep-tracking.c b/tools/perf/tests/keep-tracking.c
index 9f0762d987fa..df0fd5a44e04 100644
--- a/tools/perf/tests/keep-tracking.c
+++ b/tools/perf/tests/keep-tracking.c
@@ -12,7 +12,6 @@
12#include "evsel.h" 12#include "evsel.h"
13#include "record.h" 13#include "record.h"
14#include "thread_map.h" 14#include "thread_map.h"
15#include "cpumap.h"
16#include "tests.h" 15#include "tests.h"
17 16
18#define CHECK__(x) { \ 17#define CHECK__(x) { \
@@ -143,7 +142,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
143 142
144 found = find_comm(evlist, comm); 143 found = find_comm(evlist, comm);
145 if (found != 1) { 144 if (found != 1) {
146 pr_debug("Seconf time, failed to find tracking event.\n"); 145 pr_debug("Second time, failed to find tracking event.\n");
147 goto out_err; 146 goto out_err;
148 } 147 }
149 148
diff --git a/tools/perf/tests/llvm.c b/tools/perf/tests/llvm.c
index 022e4c9cf092..ae6cda81c209 100644
--- a/tools/perf/tests/llvm.c
+++ b/tools/perf/tests/llvm.c
@@ -7,7 +7,6 @@
7#include "llvm.h" 7#include "llvm.h"
8#include "tests.h" 8#include "tests.h"
9#include "debug.h" 9#include "debug.h"
10#include "util.h"
11 10
12#ifdef HAVE_LIBBPF_SUPPORT 11#ifdef HAVE_LIBBPF_SUPPORT
13static int test__bpf_parsing(void *obj_buf, size_t obj_buf_sz) 12static int test__bpf_parsing(void *obj_buf, size_t obj_buf_sz)
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 70c48475896d..6b3afed5d910 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -327,6 +327,10 @@ make_kernelsrc_tools:
327 (make -C ../../tools $(PARALLEL_OPT) $(K_O_OPT) perf) > $@ 2>&1 && \ 327 (make -C ../../tools $(PARALLEL_OPT) $(K_O_OPT) perf) > $@ 2>&1 && \
328 test -x $(KERNEL_O)/tools/perf/perf && rm -f $@ || (cat $@ ; false) 328 test -x $(KERNEL_O)/tools/perf/perf && rm -f $@ || (cat $@ ; false)
329 329
330make_libperf:
331 @echo "- make -C lib";
332 make -C lib clean >$@ 2>&1; make -C lib >>$@ 2>&1 && rm $@
333
330FEATURES_DUMP_FILE := $(FULL_O)/BUILD_TEST_FEATURE_DUMP 334FEATURES_DUMP_FILE := $(FULL_O)/BUILD_TEST_FEATURE_DUMP
331FEATURES_DUMP_FILE_STATIC := $(FULL_O)/BUILD_TEST_FEATURE_DUMP_STATIC 335FEATURES_DUMP_FILE_STATIC := $(FULL_O)/BUILD_TEST_FEATURE_DUMP_STATIC
332 336
@@ -365,5 +369,5 @@ $(foreach t,$(run),$(if $(findstring make_static,$(t)),\
365 $(eval $(t) := $($(t)) FEATURES_DUMP=$(FEATURES_DUMP_FILE)))) 369 $(eval $(t) := $($(t)) FEATURES_DUMP=$(FEATURES_DUMP_FILE))))
366endif 370endif
367 371
368.PHONY: all $(run) $(run_O) tarpkg clean make_kernelsrc make_kernelsrc_tools 372.PHONY: all $(run) $(run_O) tarpkg clean make_kernelsrc make_kernelsrc_tools make_libperf
369endif # ifndef MK 373endif # ifndef MK
diff --git a/tools/perf/tests/mem2node.c b/tools/perf/tests/mem2node.c
index 7672ade70f20..a258bd51f1a4 100644
--- a/tools/perf/tests/mem2node.c
+++ b/tools/perf/tests/mem2node.c
@@ -4,7 +4,7 @@
4#include <linux/kernel.h> 4#include <linux/kernel.h>
5#include <linux/zalloc.h> 5#include <linux/zalloc.h>
6#include <perf/cpumap.h> 6#include <perf/cpumap.h>
7#include "cpumap.h" 7#include <internal/cpumap.h>
8#include "debug.h" 8#include "debug.h"
9#include "env.h" 9#include "env.h"
10#include "mem2node.h" 10#include "mem2node.h"
diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c
index 85e1d7337dc0..042757629e90 100644
--- a/tools/perf/tests/mmap-basic.c
+++ b/tools/perf/tests/mmap-basic.c
@@ -10,7 +10,6 @@
10#include "evlist.h" 10#include "evlist.h"
11#include "evsel.h" 11#include "evsel.h"
12#include "thread_map.h" 12#include "thread_map.h"
13#include "cpumap.h"
14#include "tests.h" 13#include "tests.h"
15#include <linux/err.h> 14#include <linux/err.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
@@ -53,7 +52,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
53 52
54 cpus = perf_cpu_map__new(NULL); 53 cpus = perf_cpu_map__new(NULL);
55 if (cpus == NULL) { 54 if (cpus == NULL) {
56 pr_debug("cpu_map__new\n"); 55 pr_debug("perf_cpu_map__new\n");
57 goto out_free_threads; 56 goto out_free_threads;
58 } 57 }
59 58
diff --git a/tools/perf/tests/mmap-thread-lookup.c b/tools/perf/tests/mmap-thread-lookup.c
index 360d70deb855..33b496d194f4 100644
--- a/tools/perf/tests/mmap-thread-lookup.c
+++ b/tools/perf/tests/mmap-thread-lookup.c
@@ -8,13 +8,15 @@
8#include <stdlib.h> 8#include <stdlib.h>
9#include <stdio.h> 9#include <stdio.h>
10#include "debug.h" 10#include "debug.h"
11#include "event.h"
11#include "tests.h" 12#include "tests.h"
12#include "machine.h" 13#include "machine.h"
13#include "thread_map.h" 14#include "thread_map.h"
14#include "map.h" 15#include "map.h"
15#include "symbol.h" 16#include "symbol.h"
17#include "util/synthetic-events.h"
16#include "thread.h" 18#include "thread.h"
17#include "util.h" 19#include "util.h" // page_size
18 20
19#define THREADS 4 21#define THREADS 4
20 22
diff --git a/tools/perf/tests/openat-syscall-all-cpus.c b/tools/perf/tests/openat-syscall-all-cpus.c
index 9171f77cd9cd..93c176523e38 100644
--- a/tools/perf/tests/openat-syscall-all-cpus.c
+++ b/tools/perf/tests/openat-syscall-all-cpus.c
@@ -14,7 +14,8 @@
14#include "evsel.h" 14#include "evsel.h"
15#include "tests.h" 15#include "tests.h"
16#include "thread_map.h" 16#include "thread_map.h"
17#include "cpumap.h" 17#include <perf/cpumap.h>
18#include <internal/cpumap.h>
18#include "debug.h" 19#include "debug.h"
19#include "stat.h" 20#include "stat.h"
20#include "util/counts.h" 21#include "util/counts.h"
@@ -37,7 +38,7 @@ int test__openat_syscall_event_on_all_cpus(struct test *test __maybe_unused, int
37 38
38 cpus = perf_cpu_map__new(NULL); 39 cpus = perf_cpu_map__new(NULL);
39 if (cpus == NULL) { 40 if (cpus == NULL) {
40 pr_debug("cpu_map__new\n"); 41 pr_debug("perf_cpu_map__new\n");
41 goto out_thread_map_delete; 42 goto out_thread_map_delete;
42 } 43 }
43 44
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index 02ba696fb87f..c25c8e7b41e5 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -6,7 +6,6 @@
6#include "tests.h" 6#include "tests.h"
7#include "debug.h" 7#include "debug.h"
8#include "pmu.h" 8#include "pmu.h"
9#include "util.h"
10#include <dirent.h> 9#include <dirent.h>
11#include <errno.h> 10#include <errno.h>
12#include <sys/types.h> 11#include <sys/types.h>
diff --git a/tools/perf/tests/parse-no-sample-id-all.c b/tools/perf/tests/parse-no-sample-id-all.c
index 8284752a60c8..adf3c9c4a416 100644
--- a/tools/perf/tests/parse-no-sample-id-all.c
+++ b/tools/perf/tests/parse-no-sample-id-all.c
@@ -1,4 +1,3 @@
1// SPDX-License-Identifier: GPL-2.0
2#include <linux/kernel.h> 1#include <linux/kernel.h>
3#include <linux/types.h> 2#include <linux/types.h>
4#include <stddef.h> 3#include <stddef.h>
@@ -8,7 +7,6 @@
8#include "event.h" 7#include "event.h"
9#include "evlist.h" 8#include "evlist.h"
10#include "header.h" 9#include "header.h"
11#include "util.h"
12#include "debug.h" 10#include "debug.h"
13 11
14static int process_event(struct evlist **pevlist, union perf_event *event) 12static int process_event(struct evlist **pevlist, union perf_event *event)
diff --git a/tools/perf/tests/perf-hooks.c b/tools/perf/tests/perf-hooks.c
index a693bcf017ea..dbc27199c65e 100644
--- a/tools/perf/tests/perf-hooks.c
+++ b/tools/perf/tests/perf-hooks.c
@@ -4,7 +4,6 @@
4 4
5#include "tests.h" 5#include "tests.h"
6#include "debug.h" 6#include "debug.h"
7#include "util.h"
8#include "perf-hooks.h" 7#include "perf-hooks.h"
9 8
10static void sigsegv_handler(int sig __maybe_unused) 9static void sigsegv_handler(int sig __maybe_unused)
diff --git a/tools/perf/tests/pmu.c b/tools/perf/tests/pmu.c
index 14a78898d79e..74379ff1f7fa 100644
--- a/tools/perf/tests/pmu.c
+++ b/tools/perf/tests/pmu.c
@@ -1,7 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include "parse-events.h" 2#include "parse-events.h"
3#include "pmu.h" 3#include "pmu.h"
4#include "util.h"
5#include "tests.h" 4#include "tests.h"
6#include <errno.h> 5#include <errno.h>
7#include <stdio.h> 6#include <stdio.h>
diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c
index 5fcc06817076..3a02426db9a6 100644
--- a/tools/perf/tests/sample-parsing.c
+++ b/tools/perf/tests/sample-parsing.c
@@ -9,10 +9,10 @@
9 9
10#include "map_symbol.h" 10#include "map_symbol.h"
11#include "branch.h" 11#include "branch.h"
12#include "util.h"
13#include "event.h" 12#include "event.h"
14#include "evsel.h" 13#include "evsel.h"
15#include "debug.h" 14#include "debug.h"
15#include "util/synthetic-events.h"
16 16
17#include "tests.h" 17#include "tests.h"
18 18
diff --git a/tools/perf/tests/stat.c b/tools/perf/tests/stat.c
index cc10b4116c9f..c1911501c39c 100644
--- a/tools/perf/tests/stat.c
+++ b/tools/perf/tests/stat.c
@@ -5,6 +5,7 @@
5#include "stat.h" 5#include "stat.h"
6#include "counts.h" 6#include "counts.h"
7#include "debug.h" 7#include "debug.h"
8#include "util/synthetic-events.h"
8 9
9static bool has_term(struct perf_record_stat_config *config, 10static bool has_term(struct perf_record_stat_config *config,
10 u64 tag, u64 val) 11 u64 tag, u64 val)
diff --git a/tools/perf/tests/switch-tracking.c b/tools/perf/tests/switch-tracking.c
index 1a60fa1219f5..3fb1ff7b8a2f 100644
--- a/tools/perf/tests/switch-tracking.c
+++ b/tools/perf/tests/switch-tracking.c
@@ -14,7 +14,6 @@
14#include "evlist.h" 14#include "evlist.h"
15#include "evsel.h" 15#include "evsel.h"
16#include "thread_map.h" 16#include "thread_map.h"
17#include "cpumap.h"
18#include "record.h" 17#include "record.h"
19#include "tests.h" 18#include "tests.h"
20 19
diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c
index f610e8c0a083..088c7708b03a 100644
--- a/tools/perf/tests/task-exit.c
+++ b/tools/perf/tests/task-exit.c
@@ -4,12 +4,12 @@
4#include "evsel.h" 4#include "evsel.h"
5#include "target.h" 5#include "target.h"
6#include "thread_map.h" 6#include "thread_map.h"
7#include "cpumap.h"
8#include "tests.h" 7#include "tests.h"
9 8
10#include <errno.h> 9#include <errno.h>
11#include <signal.h> 10#include <signal.h>
12#include <linux/string.h> 11#include <linux/string.h>
12#include <perf/cpumap.h>
13#include <perf/evlist.h> 13#include <perf/evlist.h>
14 14
15static int exited; 15static int exited;
diff --git a/tools/perf/tests/thread-map.c b/tools/perf/tests/thread-map.c
index 39168c57943b..28f51c4bd373 100644
--- a/tools/perf/tests/thread-map.c
+++ b/tools/perf/tests/thread-map.c
@@ -8,6 +8,7 @@
8#include "thread_map.h" 8#include "thread_map.h"
9#include "debug.h" 9#include "debug.h"
10#include "event.h" 10#include "event.h"
11#include "util/synthetic-events.h"
11#include <linux/zalloc.h> 12#include <linux/zalloc.h>
12#include <perf/event.h> 13#include <perf/event.h>
13 14
diff --git a/tools/perf/tests/topology.c b/tools/perf/tests/topology.c
index a4f9f5182b47..7d845d913d7d 100644
--- a/tools/perf/tests/topology.c
+++ b/tools/perf/tests/topology.c
@@ -3,8 +3,8 @@
3#include <stdlib.h> 3#include <stdlib.h>
4#include <stdio.h> 4#include <stdio.h>
5#include <perf/cpumap.h> 5#include <perf/cpumap.h>
6#include "cpumap.h"
6#include "tests.h" 7#include "tests.h"
7#include "util.h"
8#include "session.h" 8#include "session.h"
9#include "evlist.h" 9#include "evlist.h"
10#include "debug.h" 10#include "debug.h"
diff --git a/tools/perf/tests/vmlinux-kallsyms.c b/tools/perf/tests/vmlinux-kallsyms.c
index 01f434c067c6..7f28775875c2 100644
--- a/tools/perf/tests/vmlinux-kallsyms.c
+++ b/tools/perf/tests/vmlinux-kallsyms.c
@@ -7,7 +7,7 @@
7#include "dso.h" 7#include "dso.h"
8#include "map.h" 8#include "map.h"
9#include "symbol.h" 9#include "symbol.h"
10#include "util.h" 10#include "util.h" // page_size
11#include "tests.h" 11#include "tests.h"
12#include "debug.h" 12#include "debug.h"
13#include "machine.h" 13#include "machine.h"