From 8520a98dbab61e9e340cdfb72dd17ccc8a98961e Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Thu, 29 Aug 2019 16:18:59 -0300 Subject: perf debug: Remove needless include directives from debug.h All we need there is a forward declaration for 'union perf_event', so remove it from there and add missing header directives in places using things from this indirect include. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-7ftk0ztstqub1tirjj8o8xbl@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/attr.c | 1 + tools/perf/tests/backward-ring-buffer.c | 1 + tools/perf/tests/bp_account.c | 1 + tools/perf/tests/bp_signal.c | 1 + tools/perf/tests/bp_signal_overflow.c | 1 + tools/perf/tests/bpf.c | 1 + tools/perf/tests/event-times.c | 1 + tools/perf/tests/expr.c | 1 + tools/perf/tests/kmod-path.c | 2 ++ tools/perf/tests/mmap-basic.c | 1 + tools/perf/tests/openat-syscall-all-cpus.c | 1 + tools/perf/tests/openat-syscall-tp-fields.c | 1 + tools/perf/tests/openat-syscall.c | 1 + tools/perf/tests/perf-record.c | 1 + tools/perf/tests/sample-parsing.c | 1 + tools/perf/tests/task-exit.c | 1 + tools/perf/tests/thread-map.c | 7 +++++++ tools/perf/tests/unit_number__scnprintf.c | 1 + tools/perf/tests/wp.c | 3 +++ 19 files changed, 28 insertions(+) (limited to 'tools/perf/tests') diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c index 87dc3e1174af..a9599ab8c471 100644 --- a/tools/perf/tests/attr.c +++ b/tools/perf/tests/attr.c @@ -32,6 +32,7 @@ #include #include "../perf-sys.h" #include +#include "event.h" #include "tests.h" #define ENV "PERF_TEST_ATTR" diff --git a/tools/perf/tests/backward-ring-buffer.c b/tools/perf/tests/backward-ring-buffer.c index b6f27ef9fb02..512288e9f547 100644 --- a/tools/perf/tests/backward-ring-buffer.c +++ b/tools/perf/tests/backward-ring-buffer.c @@ -10,6 +10,7 @@ #include "tests.h" #include "debug.h" #include +#include #define NR_ITERS 111 diff --git a/tools/perf/tests/bp_account.c b/tools/perf/tests/bp_account.c index c4a30318d7e0..016bba2c142d 100644 --- a/tools/perf/tests/bp_account.c +++ b/tools/perf/tests/bp_account.c @@ -19,6 +19,7 @@ #include "tests.h" #include "debug.h" +#include "event.h" #include "../perf-sys.h" #include "cloexec.h" diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c index 2d292f8fb3dd..c1c2c13de254 100644 --- a/tools/perf/tests/bp_signal.c +++ b/tools/perf/tests/bp_signal.c @@ -25,6 +25,7 @@ #include "tests.h" #include "debug.h" +#include "event.h" #include "perf-sys.h" #include "cloexec.h" diff --git a/tools/perf/tests/bp_signal_overflow.c b/tools/perf/tests/bp_signal_overflow.c index 101315a3b34f..eb4dbbddf4ff 100644 --- a/tools/perf/tests/bp_signal_overflow.c +++ b/tools/perf/tests/bp_signal_overflow.c @@ -24,6 +24,7 @@ #include "tests.h" #include "debug.h" +#include "event.h" #include "../perf-sys.h" #include "cloexec.h" diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c index 98642961fc63..9fc163b2acbb 100644 --- a/tools/perf/tests/bpf.c +++ b/tools/perf/tests/bpf.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include "tests.h" diff --git a/tools/perf/tests/event-times.c b/tools/perf/tests/event-times.c index 714e3611352c..228d1618cf7d 100644 --- a/tools/perf/tests/event-times.c +++ b/tools/perf/tests/event-times.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include #include #include diff --git a/tools/perf/tests/expr.c b/tools/perf/tests/expr.c index ee1d88650e69..87843af4c118 100644 --- a/tools/perf/tests/expr.c +++ b/tools/perf/tests/expr.c @@ -3,6 +3,7 @@ #include "util/expr.h" #include "tests.h" #include +#include #include static int test(struct parse_ctx *ctx, const char *e, double val2) diff --git a/tools/perf/tests/kmod-path.c b/tools/perf/tests/kmod-path.c index 0579a70bbbff..e483210b176b 100644 --- a/tools/perf/tests/kmod-path.c +++ b/tools/perf/tests/kmod-path.c @@ -1,9 +1,11 @@ // SPDX-License-Identifier: GPL-2.0 #include #include +#include #include "tests.h" #include "dso.h" #include "debug.h" +#include "event.h" static int test(const char *path, bool alloc_name, bool kmod, int comp, const char *name) diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c index fe91350fd5ab..bdf77bfe1b80 100644 --- a/tools/perf/tests/mmap-basic.c +++ b/tools/perf/tests/mmap-basic.c @@ -13,6 +13,7 @@ #include "tests.h" #include #include +#include #include /* diff --git a/tools/perf/tests/openat-syscall-all-cpus.c b/tools/perf/tests/openat-syscall-all-cpus.c index 4ae4dea07466..9171f77cd9cd 100644 --- a/tools/perf/tests/openat-syscall-all-cpus.c +++ b/tools/perf/tests/openat-syscall-all-cpus.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include "evsel.h" #include "tests.h" diff --git a/tools/perf/tests/openat-syscall-tp-fields.c b/tools/perf/tests/openat-syscall-tp-fields.c index 62492106fb5e..b71167b43dda 100644 --- a/tools/perf/tests/openat-syscall-tp-fields.c +++ b/tools/perf/tests/openat-syscall-tp-fields.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include #include +#include #include #include #include diff --git a/tools/perf/tests/openat-syscall.c b/tools/perf/tests/openat-syscall.c index 58df4bda5e12..5ebffae18605 100644 --- a/tools/perf/tests/openat-syscall.c +++ b/tools/perf/tests/openat-syscall.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/perf/tests/perf-record.c b/tools/perf/tests/perf-record.c index 3a205f6f9363..e1b42292cf7f 100644 --- a/tools/perf/tests/perf-record.c +++ b/tools/perf/tests/perf-record.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include #include +#include /* For the CLR_() macros */ #include diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c index a8ca29fe172b..0c09dc15a059 100644 --- a/tools/perf/tests/sample-parsing.c +++ b/tools/perf/tests/sample-parsing.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c index 0e0e0627184e..f610e8c0a083 100644 --- a/tools/perf/tests/task-exit.c +++ b/tools/perf/tests/task-exit.c @@ -9,6 +9,7 @@ #include #include +#include #include static int exited; diff --git a/tools/perf/tests/thread-map.c b/tools/perf/tests/thread-map.c index c19ec8849e77..39168c57943b 100644 --- a/tools/perf/tests/thread-map.c +++ b/tools/perf/tests/thread-map.c @@ -1,12 +1,19 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include #include #include #include "tests.h" #include "thread_map.h" #include "debug.h" +#include "event.h" #include +#include + +struct perf_sample; +struct perf_tool; +struct machine; #define NAME (const char *) "perf" #define NAMEUL (unsigned long) NAME diff --git a/tools/perf/tests/unit_number__scnprintf.c b/tools/perf/tests/unit_number__scnprintf.c index 2bb8cb0039c1..3721757435da 100644 --- a/tools/perf/tests/unit_number__scnprintf.c +++ b/tools/perf/tests/unit_number__scnprintf.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "tests.h" #include "units.h" #include "debug.h" diff --git a/tools/perf/tests/wp.c b/tools/perf/tests/wp.c index 982ac55d69ea..d262d6639829 100644 --- a/tools/perf/tests/wp.c +++ b/tools/perf/tests/wp.c @@ -1,10 +1,13 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include #include #include +#include #include "tests.h" #include "debug.h" +#include "event.h" #include "cloexec.h" #include "../perf-sys.h" -- cgit v1.2.3