From 0ac25fd0a04d8bd52ceac2476e71a4e497489987 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Thu, 29 Aug 2019 15:42:40 -0300 Subject: perf tools: Remove perf.h from source files not needing it With the movement of lots of stuff out of perf.h to other headers we ended up not needing it in lots of places, remove it from those places. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-c718m0sxxwp73lp9d8vpihb4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/debug.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'tools/perf/util/debug.c') diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c index 3780fe42453b..c822c5943340 100644 --- a/tools/perf/util/debug.c +++ b/tools/perf/util/debug.c @@ -1,8 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* For general debugging purposes */ -#include "../perf.h" - #include #include #include -- cgit v1.2.3 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/arch/arm/util/cs-etm.c | 1 + tools/perf/arch/common.c | 2 ++ tools/perf/arch/x86/tests/bp-modify.c | 1 + tools/perf/arch/x86/tests/insn-x86.c | 1 + tools/perf/arch/x86/tests/rdpmc.c | 2 ++ tools/perf/arch/x86/util/perf_regs.c | 1 + tools/perf/builtin-c2c.c | 2 ++ tools/perf/builtin-config.c | 1 + tools/perf/builtin-data.c | 2 ++ tools/perf/builtin-diff.c | 1 + tools/perf/builtin-ftrace.c | 3 ++- tools/perf/builtin-help.c | 4 ++++ tools/perf/builtin-kmem.c | 1 + tools/perf/builtin-list.c | 1 + tools/perf/builtin-probe.c | 1 + tools/perf/builtin-record.c | 1 + tools/perf/builtin-report.c | 2 ++ tools/perf/builtin-top.c | 1 + tools/perf/builtin-trace.c | 1 + tools/perf/perf.c | 2 ++ 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 +++ tools/perf/ui/browsers/scripts.c | 1 + tools/perf/ui/gtk/helpline.c | 1 + tools/perf/ui/gtk/util.c | 1 + tools/perf/ui/tui/helpline.c | 1 + tools/perf/ui/util.c | 2 +- tools/perf/util/bpf-prologue.c | 1 + tools/perf/util/branch.c | 1 + tools/perf/util/callchain.c | 1 + tools/perf/util/cloexec.c | 2 ++ tools/perf/util/data.c | 1 + tools/perf/util/debug.c | 1 + tools/perf/util/debug.h | 6 ++---- tools/perf/util/dwarf-aux.c | 1 + tools/perf/util/dwarf-aux.h | 2 ++ tools/perf/util/env.c | 1 + tools/perf/util/evlist.c | 1 + tools/perf/util/expr.y | 2 ++ tools/perf/util/hist.c | 1 + tools/perf/util/intel-pt.c | 1 + tools/perf/util/llvm-utils.c | 1 + tools/perf/util/lzma.c | 1 + tools/perf/util/machine.c | 1 + tools/perf/util/map.c | 1 + tools/perf/util/ordered-events.c | 1 + tools/perf/util/parse-branch-options.c | 2 ++ tools/perf/util/perf-hooks.c | 1 + tools/perf/util/probe-finder.c | 1 + tools/perf/util/pstack.c | 1 + tools/perf/util/sort.c | 1 + tools/perf/util/strbuf.c | 4 ++++ tools/perf/util/symbol.c | 1 + tools/perf/util/target.c | 3 +++ tools/perf/util/thread-stack.c | 1 + tools/perf/util/util.c | 1 + tools/perf/util/values.c | 1 + tools/perf/util/zlib.c | 1 + 75 files changed, 104 insertions(+), 6 deletions(-) (limited to 'tools/perf/util/debug.c') diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c index b74fd408d496..197041fcba25 100644 --- a/tools/perf/arch/arm/util/cs-etm.c +++ b/tools/perf/arch/arm/util/cs-etm.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c index a769382fb644..59dd875fd5e4 100644 --- a/tools/perf/arch/common.c +++ b/tools/perf/arch/common.c @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 +#include #include #include +#include #include #include "common.h" #include "../util/env.h" diff --git a/tools/perf/arch/x86/tests/bp-modify.c b/tools/perf/arch/x86/tests/bp-modify.c index f53e4406709f..adcacf1b6609 100644 --- a/tools/perf/arch/x86/tests/bp-modify.c +++ b/tools/perf/arch/x86/tests/bp-modify.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/perf/arch/x86/tests/insn-x86.c b/tools/perf/arch/x86/tests/insn-x86.c index c3e5f4ab0d3e..d67bc0ffb70a 100644 --- a/tools/perf/arch/x86/tests/insn-x86.c +++ b/tools/perf/arch/x86/tests/insn-x86.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include "debug.h" #include "tests/tests.h" diff --git a/tools/perf/arch/x86/tests/rdpmc.c b/tools/perf/arch/x86/tests/rdpmc.c index 345a6a0a328b..6e67cee792b1 100644 --- a/tools/perf/arch/x86/tests/rdpmc.c +++ b/tools/perf/arch/x86/tests/rdpmc.c @@ -6,11 +6,13 @@ #include #include #include +#include #include #include "perf-sys.h" #include "debug.h" #include "tests/tests.h" #include "cloexec.h" +#include "event.h" #include "util.h" #include "arch-tests.h" diff --git a/tools/perf/arch/x86/util/perf_regs.c b/tools/perf/arch/x86/util/perf_regs.c index 74a606ea42d3..99ea60211e16 100644 --- a/tools/perf/arch/x86/util/perf_regs.c +++ b/tools/perf/arch/x86/util/perf_regs.c @@ -7,6 +7,7 @@ #include "../../perf-sys.h" #include "../../util/perf_regs.h" #include "../../util/debug.h" +#include "../../util/event.h" const struct sample_reg sample_reg_masks[] = { SMPL_REG(AX, PERF_REG_X86_AX), diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 25a5f186dfde..d1ad694c67a2 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -20,6 +20,7 @@ #include #include "debug.h" #include "builtin.h" +#include #include #include "mem-events.h" #include "session.h" @@ -35,6 +36,7 @@ #include "thread.h" #include "mem2node.h" #include "symbol.h" +#include "ui/ui.h" #include "../perf.h" struct c2c_hists { diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index edfc8f76f1bd..42d8157e047a 100644 --- a/tools/perf/builtin-config.c +++ b/tools/perf/builtin-config.c @@ -13,6 +13,7 @@ #include "util/debug.h" #include "util/config.h" #include +#include #include static bool use_system_config, use_user_config; diff --git a/tools/perf/builtin-data.c b/tools/perf/builtin-data.c index dde25d4ca56d..ca2fb44874e4 100644 --- a/tools/perf/builtin-data.c +++ b/tools/perf/builtin-data.c @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include +#include #include "builtin.h" #include "perf.h" #include "debug.h" diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index ae4a8ebf90d2..827e4800d862 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c @@ -24,6 +24,7 @@ #include "util/annotate.h" #include "util/map.h" #include +#include #include #include diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 7374f86833fd..2f8ea44c00c4 100644 --- a/tools/perf/builtin-ftrace.c +++ b/tools/perf/builtin-ftrace.c @@ -13,8 +13,10 @@ #include #include #include +#include #include "debug.h" +#include #include #include #include "evlist.h" @@ -24,7 +26,6 @@ #include "util/cap.h" #include "util/config.h" - #define DEFAULT_TRACER "function_graph" struct perf_ftrace { diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c index 641d4a3f93c3..3976aebe3677 100644 --- a/tools/perf/builtin-help.c +++ b/tools/perf/builtin-help.c @@ -4,7 +4,9 @@ * * Builtin help command */ +#include "util/cache.h" #include "util/config.h" +#include "util/strbuf.h" #include "builtin.h" #include #include "common-cmds.h" @@ -13,10 +15,12 @@ #include #include "util/debug.h" #include +#include #include #include #include #include +#include #include #include #include diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c index 46f828936120..7eec0da64c46 100644 --- a/tools/perf/builtin-kmem.c +++ b/tools/perf/builtin-kmem.c @@ -14,6 +14,7 @@ #include "util/callchain.h" #include "util/time-utils.h" +#include #include #include "util/trace-event.h" #include "util/data.h" diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c index dca0d33c1343..11afb760616b 100644 --- a/tools/perf/builtin-list.c +++ b/tools/perf/builtin-list.c @@ -16,6 +16,7 @@ #include "util/debug.h" #include "util/metricgroup.h" #include +#include static bool desc_flag = true; static bool details_flag; diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index f45fd7e9723e..8950c05ef8fd 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -26,6 +26,7 @@ #include "util/probe-finder.h" #include "util/probe-event.h" #include "util/probe-file.h" +#include #include #define DEFAULT_VAR_FILTER "!__k???tab_* & !__crc_*" diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 56705d2a6bec..1447004eee8a 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 33c20e26b290..94e7e354cb16 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -45,6 +45,7 @@ #include "util/units.h" #include "util/branch.h" #include "util/util.h" +#include "ui/ui.h" #include #include @@ -53,6 +54,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index c3f95440e99c..5538b5886e35 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -45,6 +45,7 @@ #include "util/intlist.h" #include "util/parse-branch-options.h" #include "arch/common.h" +#include "ui/ui.h" #include "util/debug.h" #include "util/ordered-events.h" diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 105695033ebc..b1ec8ff52740 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -29,6 +29,7 @@ #include "util/event.h" #include "util/evlist.h" #include "util/evswitch.h" +#include #include #include "util/machine.h" #include "util/map.h" diff --git a/tools/perf/perf.c b/tools/perf/perf.c index 237b9b3a1bf1..e0910637a82d 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c @@ -10,6 +10,7 @@ #include "builtin.h" #include "perf.h" +#include "util/cache.h" #include "util/env.h" #include #include "util/config.h" @@ -32,6 +33,7 @@ #include #include #include +#include #include const char perf_usage_string[] = 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" diff --git a/tools/perf/ui/browsers/scripts.c b/tools/perf/ui/browsers/scripts.c index e63f3778d75c..77809c0fad02 100644 --- a/tools/perf/ui/browsers/scripts.c +++ b/tools/perf/ui/browsers/scripts.c @@ -9,6 +9,7 @@ #include "../browser.h" #include "../libslang.h" #include "config.h" +#include #include #define SCRIPT_NAMELEN 128 diff --git a/tools/perf/ui/gtk/helpline.c b/tools/perf/ui/gtk/helpline.c index fbf1ea9ce9a2..e166da9ec767 100644 --- a/tools/perf/ui/gtk/helpline.c +++ b/tools/perf/ui/gtk/helpline.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include #include +#include #include "gtk.h" #include "../ui.h" diff --git a/tools/perf/ui/gtk/util.c b/tools/perf/ui/gtk/util.c index c28bdb7517ac..c2c558958b9c 100644 --- a/tools/perf/ui/gtk/util.c +++ b/tools/perf/ui/gtk/util.c @@ -3,6 +3,7 @@ #include "../../util/debug.h" #include "gtk.h" +#include #include #include diff --git a/tools/perf/ui/tui/helpline.c b/tools/perf/ui/tui/helpline.c index 93d6b7240285..1793c98653a5 100644 --- a/tools/perf/ui/tui/helpline.c +++ b/tools/perf/ui/tui/helpline.c @@ -3,6 +3,7 @@ #include #include #include +#include #include "../../util/debug.h" #include "../helpline.h" diff --git a/tools/perf/ui/util.c b/tools/perf/ui/util.c index 9ed76e88a3e4..689b27c34246 100644 --- a/tools/perf/ui/util.c +++ b/tools/perf/ui/util.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include "util.h" #include "../util/debug.h" - +#include /* * Default error logging functions diff --git a/tools/perf/util/bpf-prologue.c b/tools/perf/util/bpf-prologue.c index 09e6c76e1c3b..b020a8678eb9 100644 --- a/tools/perf/util/bpf-prologue.c +++ b/tools/perf/util/bpf-prologue.c @@ -13,6 +13,7 @@ #include "bpf-prologue.h" #include "probe-finder.h" #include +#include #include #include diff --git a/tools/perf/util/branch.c b/tools/perf/util/branch.c index 02d6d839ff24..30642e1f2b1b 100644 --- a/tools/perf/util/branch.c +++ b/tools/perf/util/branch.c @@ -1,6 +1,7 @@ #include "util/util.h" #include "util/debug.h" #include "util/branch.h" +#include static bool cross_area(u64 addr1, u64 addr2, int size) { diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c index a47d0e8c2434..76bf05b26d3b 100644 --- a/tools/perf/util/callchain.c +++ b/tools/perf/util/callchain.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include "asm/bug.h" diff --git a/tools/perf/util/cloexec.c b/tools/perf/util/cloexec.c index 92d08198e64a..4e904fcb2783 100644 --- a/tools/perf/util/cloexec.c +++ b/tools/perf/util/cloexec.c @@ -4,10 +4,12 @@ #include "util.h" #include "../perf-sys.h" #include "cloexec.h" +#include "event.h" #include "asm/bug.h" #include "debug.h" #include #include +#include static unsigned long flag = PERF_FLAG_FD_CLOEXEC; diff --git a/tools/perf/util/data.c b/tools/perf/util/data.c index 74aafe0df506..e75c3a279fe8 100644 --- a/tools/perf/util/data.c +++ b/tools/perf/util/data.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include #include +#include #include #include #include diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c index c822c5943340..522887ee4c02 100644 --- a/tools/perf/util/debug.c +++ b/tools/perf/util/debug.c @@ -19,6 +19,7 @@ #include "print_binary.h" #include "util.h" #include "target.h" +#include "ui/helpline.h" #include diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h index 77445dfc5c7d..b2deee987ffa 100644 --- a/tools/perf/util/debug.h +++ b/tools/perf/util/debug.h @@ -4,11 +4,7 @@ #define __PERF_DEBUG_H #include -#include #include -#include "event.h" -#include "../ui/helpline.h" -#include "../ui/progress.h" #include "../ui/util.h" extern int verbose; @@ -42,6 +38,8 @@ extern int debug_data_convert; #define STRERR_BUFSIZE 128 /* For the buffer size of str_error_r */ +union perf_event; + int dump_printf(const char *fmt, ...) __printf(1, 2); void trace_event(union perf_event *event); diff --git a/tools/perf/util/dwarf-aux.c b/tools/perf/util/dwarf-aux.c index 03b2de1f5a35..df6cee5c071f 100644 --- a/tools/perf/util/dwarf-aux.c +++ b/tools/perf/util/dwarf-aux.c @@ -9,6 +9,7 @@ #include #include "debug.h" #include "dwarf-aux.h" +#include "strbuf.h" #include "string2.h" /** diff --git a/tools/perf/util/dwarf-aux.h b/tools/perf/util/dwarf-aux.h index 0489b0cf8e2c..f204e5892403 100644 --- a/tools/perf/util/dwarf-aux.h +++ b/tools/perf/util/dwarf-aux.h @@ -10,6 +10,8 @@ #include #include +struct strbuf; + /* Find the realpath of the target file */ const char *cu_find_realpath(Dwarf_Die *cu_die, const char *fname); diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c index 571efb4f0351..3baca06786fb 100644 --- a/tools/perf/util/env.c +++ b/tools/perf/util/env.c @@ -9,6 +9,7 @@ #include #include #include +#include struct perf_env perf_env; diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 71b231c7097f..b5d6d6ec9a9b 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/perf/util/expr.y b/tools/perf/util/expr.y index 432b8560cf51..f9a20a39b64a 100644 --- a/tools/perf/util/expr.y +++ b/tools/perf/util/expr.y @@ -2,9 +2,11 @@ %{ #include "util.h" #include "util/debug.h" +#include // strtod() #define IN_EXPR_Y 1 #include "expr.h" #include "smt.h" +#include #include #define MAXIDLEN 256 diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index adae4134e972..02ea2ee62814 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index 825e3690940d..9b56fb74bedf 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/tools/perf/util/llvm-utils.c b/tools/perf/util/llvm-utils.c index 9f0470ecbca9..55fb4b3b1157 100644 --- a/tools/perf/util/llvm-utils.c +++ b/tools/perf/util/llvm-utils.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include "debug.h" #include "llvm-utils.h" diff --git a/tools/perf/util/lzma.c b/tools/perf/util/lzma.c index b1dd29a9d915..397447066033 100644 --- a/tools/perf/util/lzma.c +++ b/tools/perf/util/lzma.c @@ -9,6 +9,7 @@ #include "compress.h" #include "util.h" #include "debug.h" +#include #include #define BUFSIZE 8192 diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index a1542b4c047b..6e9afe4e55dd 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -30,6 +30,7 @@ #include #include #include +#include #include static void __machine__remove_thread(struct machine *machine, struct thread *th, bool lock); diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index 27b7b102e4a2..c75b20b93820 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -20,6 +20,7 @@ #include "namespaces.h" #include "unwind.h" #include "srccode.h" +#include "ui/ui.h" static void __maps__insert(struct maps *maps, struct map *map); static void __maps__insert_name(struct maps *maps, struct map *map); diff --git a/tools/perf/util/ordered-events.c b/tools/perf/util/ordered-events.c index bb5f34b7ab44..359db2b1fcef 100644 --- a/tools/perf/util/ordered-events.c +++ b/tools/perf/util/ordered-events.c @@ -8,6 +8,7 @@ #include "session.h" #include "asm/bug.h" #include "debug.h" +#include "ui/progress.h" #define pr_N(n, fmt, ...) \ eprintf(n, debug_ordered_events, fmt, ##__VA_ARGS__) diff --git a/tools/perf/util/parse-branch-options.c b/tools/perf/util/parse-branch-options.c index 1430437b9d51..bb4aa88c50a8 100644 --- a/tools/perf/util/parse-branch-options.c +++ b/tools/perf/util/parse-branch-options.c @@ -1,8 +1,10 @@ // SPDX-License-Identifier: GPL-2.0 #include "util/debug.h" +#include "util/event.h" #include #include "util/parse-branch-options.h" #include +#include #define BRANCH_OPT(n, m) \ { .name = n, .mode = (m) } diff --git a/tools/perf/util/perf-hooks.c b/tools/perf/util/perf-hooks.c index 4f3aa8d99ef4..e635c594f773 100644 --- a/tools/perf/util/perf-hooks.c +++ b/tools/perf/util/perf-hooks.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 025fc4491993..505905fc21c5 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -24,6 +24,7 @@ #include "dso.h" #include "debug.h" #include "intlist.h" +#include "strbuf.h" #include "strlist.h" #include "symbol.h" #include "probe-finder.h" diff --git a/tools/perf/util/pstack.c b/tools/perf/util/pstack.c index 28de8a4c2ce8..80ff41fc45be 100644 --- a/tools/perf/util/pstack.c +++ b/tools/perf/util/pstack.c @@ -10,6 +10,7 @@ #include #include #include +#include struct pstack { unsigned short top; diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 23d0ab7c801c..035355a9945e 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c @@ -22,6 +22,7 @@ #include "annotate.h" #include "time-utils.h" #include +#include regex_t parent_regex; const char default_parent_pattern[] = "^sys_|^do_page_fault"; diff --git a/tools/perf/util/strbuf.c b/tools/perf/util/strbuf.c index 0afdbf38a2b2..a64a37628f12 100644 --- a/tools/perf/util/strbuf.c +++ b/tools/perf/util/strbuf.c @@ -1,8 +1,12 @@ // SPDX-License-Identifier: GPL-2.0 +#include "cache.h" #include "debug.h" +#include "strbuf.h" #include +#include #include #include +#include #include #include diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 035f2e75728c..c37cca690864 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c index 3adc65480349..565f7aef7e6c 100644 --- a/tools/perf/util/target.c +++ b/tools/perf/util/target.c @@ -10,8 +10,11 @@ #include "debug.h" #include +#include #include #include +#include +#include enum target_errno target__validate(struct target *target) { diff --git a/tools/perf/util/thread-stack.c b/tools/perf/util/thread-stack.c index 15134ac9b8f1..cd8a948d03ec 100644 --- a/tools/perf/util/thread-stack.c +++ b/tools/perf/util/thread-stack.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "thread.h" #include "event.h" #include "machine.h" diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index 607daec22943..32322a20a68b 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include "util.h" #include "debug.h" +#include "event.h" #include "namespaces.h" #include #include diff --git a/tools/perf/util/values.c b/tools/perf/util/values.c index c59154e2d124..b9823f414f10 100644 --- a/tools/perf/util/values.c +++ b/tools/perf/util/values.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include diff --git a/tools/perf/util/zlib.c b/tools/perf/util/zlib.c index 512ad7c09b13..59d456f716e9 100644 --- a/tools/perf/util/zlib.c +++ b/tools/perf/util/zlib.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include #include +#include #include #include #include -- cgit v1.2.3 From 4cb3c6d546aa5493a960d05eb73bad8e69a58574 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Thu, 29 Aug 2019 17:19:02 -0300 Subject: perf event: Remove needless include directives from event.h bpf.h and build-id.h are not needed at all in event.h, remove them. And fixup the fallout of files that were getting needed stuff from this now pruned include. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-rdm3dgtlrndmmnlc4bafsg3b@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/arch/powerpc/util/unwind-libdw.c | 1 + tools/perf/arch/x86/util/perf_regs.c | 1 + tools/perf/perf.c | 1 + tools/perf/util/bpf-event.h | 1 + tools/perf/util/callchain.h | 1 + tools/perf/util/config.c | 2 ++ tools/perf/util/debug.c | 1 + tools/perf/util/event.h | 18 ++++++++++++------ 8 files changed, 20 insertions(+), 6 deletions(-) (limited to 'tools/perf/util/debug.c') diff --git a/tools/perf/arch/powerpc/util/unwind-libdw.c b/tools/perf/arch/powerpc/util/unwind-libdw.c index 7a1f05ef2fc0..abf2dbc7f829 100644 --- a/tools/perf/arch/powerpc/util/unwind-libdw.c +++ b/tools/perf/arch/powerpc/util/unwind-libdw.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include "../../util/unwind-libdw.h" #include "../../util/perf_regs.h" #include "../../util/event.h" diff --git a/tools/perf/arch/x86/util/perf_regs.c b/tools/perf/arch/x86/util/perf_regs.c index 99ea60211e16..c218b83e063b 100644 --- a/tools/perf/arch/x86/util/perf_regs.c +++ b/tools/perf/arch/x86/util/perf_regs.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include "../../perf-sys.h" diff --git a/tools/perf/perf.c b/tools/perf/perf.c index e0910637a82d..8763b2c0fbfd 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c @@ -10,6 +10,7 @@ #include "builtin.h" #include "perf.h" +#include "util/build-id.h" #include "util/cache.h" #include "util/env.h" #include diff --git a/tools/perf/util/bpf-event.h b/tools/perf/util/bpf-event.h index 417b78835ea0..a01c2fd68c03 100644 --- a/tools/perf/util/bpf-event.h +++ b/tools/perf/util/bpf-event.h @@ -13,6 +13,7 @@ struct machine; union perf_event; struct perf_env; struct perf_sample; +struct perf_session; struct record_opts; struct evlist; struct target; diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h index 45b9ed49e2b1..b042ceef4114 100644 --- a/tools/perf/util/callchain.h +++ b/tools/perf/util/callchain.h @@ -8,6 +8,7 @@ #include "map_symbol.h" #include "branch.h" +struct evsel; struct map; #define HELP_PAD "\t\t\t\t" diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c index eb5308c41ed1..7ebf9e31ae22 100644 --- a/tools/perf/util/config.c +++ b/tools/perf/util/config.c @@ -17,6 +17,8 @@ #include "util/event.h" /* proc_map_timeout */ #include "util/hist.h" /* perf_hist_config */ #include "util/llvm-utils.h" /* perf_llvm_config */ +#include "build-id.h" +#include "debug.h" #include "config.h" #include "debug.h" #include diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c index 522887ee4c02..143d379d4608 100644 --- a/tools/perf/util/debug.c +++ b/tools/perf/util/debug.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #ifdef HAVE_BACKTRACE_SUPPORT #include diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index f56d268f06e3..006aa432be19 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -1,17 +1,23 @@ /* SPDX-License-Identifier: GPL-2.0 */ #ifndef __PERF_RECORD_H #define __PERF_RECORD_H - -#include +/* + * The linux/stddef.h isn't need here, but is needed for __always_inline used + * in files included from uapi/linux/perf_event.h such as + * /usr/include/linux/swab.h and /usr/include/linux/byteorder/little_endian.h, + * detected in at least musl libc, used in Alpine Linux. -acme + */ #include -#include -#include -#include +#include #include +#include -#include "build-id.h" #include "perf_regs.h" +struct dso; +struct machine; +struct perf_event_attr; + #ifdef __LP64__ /* * /usr/include/inttypes.h uses just 'lu' for PRIu64, but we end up defining -- cgit v1.2.3 From fa0d98462fae5d4951f22f3ac1090d48c53396d1 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 30 Aug 2019 12:52:25 -0300 Subject: perf tools: Remove needless evlist.h include directives Remove the last unneeded use of cache.h in a header, we can check where it is really needed, i.e. we can remove it and be sure that it isn't being obtained indirectly. This is an old file, used by now incorrectly in many places, so it was providing includes needed indirectly, fixup this fallout. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-3x3l8gihoaeh7714os861ia7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-buildid-cache.c | 3 ++- tools/perf/builtin-buildid-list.c | 2 +- tools/perf/builtin-kvm.c | 4 +++- tools/perf/builtin-list.c | 2 +- tools/perf/builtin-lock.c | 2 +- tools/perf/builtin-sched.c | 2 +- tools/perf/builtin-script.c | 2 +- tools/perf/builtin-timechart.c | 2 +- tools/perf/perf.c | 2 +- tools/perf/tests/llvm.c | 2 +- tools/perf/ui/browsers/header.c | 1 - tools/perf/ui/gtk/browser.c | 1 - tools/perf/ui/gtk/hists.c | 1 - tools/perf/ui/gtk/setup.c | 1 - tools/perf/ui/helpline.h | 2 -- tools/perf/ui/progress.c | 1 - tools/perf/ui/setup.c | 3 ++- tools/perf/ui/tui/helpline.c | 1 + tools/perf/ui/tui/progress.c | 1 - tools/perf/ui/tui/setup.c | 2 -- tools/perf/ui/tui/util.c | 1 - tools/perf/util/annotate.c | 1 - tools/perf/util/color.c | 3 ++- tools/perf/util/color_config.c | 3 ++- tools/perf/util/debug.c | 2 +- tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 2 +- tools/perf/util/parse-events.c | 2 +- tools/perf/util/path.c | 3 ++- tools/perf/util/path.h | 3 +++ tools/perf/util/pmu.c | 3 ++- tools/perf/util/probe-event.c | 3 ++- tools/perf/util/probe-file.c | 2 +- 32 files changed, 33 insertions(+), 32 deletions(-) (limited to 'tools/perf/util/debug.c') diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c index b035911969b8..1a69eb565dc0 100644 --- a/tools/perf/builtin-buildid-cache.c +++ b/tools/perf/builtin-buildid-cache.c @@ -15,9 +15,9 @@ #include #include "builtin.h" #include "namespaces.h" -#include "util/cache.h" #include "util/debug.h" #include "util/header.h" +#include #include #include "util/strlist.h" #include "util/build-id.h" @@ -27,6 +27,7 @@ #include "util/time-utils.h" #include "util/util.h" #include "util/probe-file.h" +#include static int build_id_cache__kcore_buildid(const char *proc_dir, char *sbuildid) { diff --git a/tools/perf/builtin-buildid-list.c b/tools/perf/builtin-buildid-list.c index 38b2ec61c021..5a0d8b378cb5 100644 --- a/tools/perf/builtin-buildid-list.c +++ b/tools/perf/builtin-buildid-list.c @@ -10,9 +10,9 @@ #include "builtin.h" #include "perf.h" #include "util/build-id.h" -#include "util/cache.h" #include "util/debug.h" #include "util/dso.h" +#include #include #include "util/session.h" #include "util/symbol.h" diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 474c4799d29d..0a4fcbe32bf6 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c @@ -6,12 +6,12 @@ #include "util/evsel.h" #include "util/evlist.h" #include "util/term.h" -#include "util/cache.h" #include "util/symbol.h" #include "util/thread.h" #include "util/header.h" #include "util/session.h" #include "util/intlist.h" +#include #include #include "util/trace-event.h" #include "util/debug.h" @@ -20,6 +20,7 @@ #include "util/top.h" #include "util/data.h" #include "util/ordered-events.h" +#include "ui/ui.h" #include #ifdef HAVE_TIMERFD_SUPPORT @@ -31,6 +32,7 @@ #include #include +#include #include #include #include diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c index 11afb760616b..e290f6b348d8 100644 --- a/tools/perf/builtin-list.c +++ b/tools/perf/builtin-list.c @@ -11,10 +11,10 @@ #include "builtin.h" #include "util/parse-events.h" -#include "util/cache.h" #include "util/pmu.h" #include "util/debug.h" #include "util/metricgroup.h" +#include #include #include diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c index b0ff952be9db..4c2b7f437cdf 100644 --- a/tools/perf/builtin-lock.c +++ b/tools/perf/builtin-lock.c @@ -6,11 +6,11 @@ #include "util/evlist.h" // for struct evsel_str_handler #include "util/evsel.h" -#include "util/cache.h" #include "util/symbol.h" #include "util/thread.h" #include "util/header.h" +#include #include #include "util/trace-event.h" diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 91d0a9b10581..ec96d64aec69 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c @@ -4,7 +4,6 @@ #include "perf-sys.h" #include "util/evlist.h" -#include "util/cache.h" #include "util/evsel.h" #include "util/symbol.h" #include "util/thread.h" @@ -19,6 +18,7 @@ #include "util/callchain.h" #include "util/time-utils.h" +#include #include #include "util/trace-event.h" diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 1ff04b00a561..e079b34201f2 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include "builtin.h" -#include "util/cache.h" #include "util/counts.h" #include "util/debug.h" #include "util/dso.h" @@ -30,6 +29,7 @@ #include "util/thread-stack.h" #include "util/time-utils.h" #include "util/path.h" +#include "ui/ui.h" #include "print_binary.h" #include "archinsn.h" #include diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 65560a86f643..e0e822695a29 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c @@ -14,7 +14,6 @@ #include "builtin.h" #include "util/color.h" #include -#include "util/cache.h" #include "util/evlist.h" // for struct evsel_str_handler #include "util/evsel.h" #include @@ -27,6 +26,7 @@ #include "perf.h" #include "util/header.h" +#include #include #include "util/parse-events.h" #include "util/event.h" diff --git a/tools/perf/perf.c b/tools/perf/perf.c index 8763b2c0fbfd..1193b923e801 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c @@ -1,4 +1,3 @@ -// SPDX-License-Identifier: GPL-2.0 /* * perf.c * @@ -22,6 +21,7 @@ #include "util/debug.h" #include "util/event.h" #include "util/util.h" +#include "ui/ui.h" #include "perf-sys.h" #include #include diff --git a/tools/perf/tests/llvm.c b/tools/perf/tests/llvm.c index ca5a5f94ce79..022e4c9cf092 100644 --- a/tools/perf/tests/llvm.c +++ b/tools/perf/tests/llvm.c @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0 #include #include +#include #include #include -#include #include "llvm.h" #include "tests.h" #include "debug.h" diff --git a/tools/perf/ui/browsers/header.c b/tools/perf/ui/browsers/header.c index 5aeb663dd184..0f59a7001479 100644 --- a/tools/perf/ui/browsers/header.c +++ b/tools/perf/ui/browsers/header.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#include "util/cache.h" #include "util/debug.h" #include "ui/browser.h" #include "ui/keysyms.h" diff --git a/tools/perf/ui/gtk/browser.c b/tools/perf/ui/gtk/browser.c index 06a6a1ebaef0..8f3e43d148a8 100644 --- a/tools/perf/ui/gtk/browser.c +++ b/tools/perf/ui/gtk/browser.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#include "../cache.h" #include "../evsel.h" #include "../sort.h" #include "../hist.h" diff --git a/tools/perf/ui/gtk/hists.c b/tools/perf/ui/gtk/hists.c index 0efdb226d1a7..6c2efc10bf5c 100644 --- a/tools/perf/ui/gtk/hists.c +++ b/tools/perf/ui/gtk/hists.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 #include "../evlist.h" -#include "../cache.h" #include "../callchain.h" #include "../evsel.h" #include "../sort.h" diff --git a/tools/perf/ui/gtk/setup.c b/tools/perf/ui/gtk/setup.c index 506e73b3834c..1a2616b97b5c 100644 --- a/tools/perf/ui/gtk/setup.c +++ b/tools/perf/ui/gtk/setup.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 #include "gtk.h" -#include "../../util/cache.h" #include "../../util/debug.h" extern struct perf_error_ops perf_gtk_eops; diff --git a/tools/perf/ui/helpline.h b/tools/perf/ui/helpline.h index 8f775a053ca3..2165a098dee8 100644 --- a/tools/perf/ui/helpline.h +++ b/tools/perf/ui/helpline.h @@ -5,8 +5,6 @@ #include #include -#include "../util/cache.h" - struct ui_helpline { void (*pop)(void); void (*push)(const char *msg); diff --git a/tools/perf/ui/progress.c b/tools/perf/ui/progress.c index 8cd3b64c6893..99d60223c74b 100644 --- a/tools/perf/ui/progress.c +++ b/tools/perf/ui/progress.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 #include -#include "../util/cache.h" #include "progress.h" static void null_progress__update(struct ui_progress *p __maybe_unused) diff --git a/tools/perf/ui/setup.c b/tools/perf/ui/setup.c index 3bc7c9a6fae9..c7a86b4be9f5 100644 --- a/tools/perf/ui/setup.c +++ b/tools/perf/ui/setup.c @@ -2,10 +2,11 @@ #include #include -#include "../util/cache.h" +#include #include "../util/debug.h" #include "../util/hist.h" #include "../util/util.h" +#include "ui.h" pthread_mutex_t ui__lock = PTHREAD_MUTEX_INITIALIZER; void *perf_gtk_handle; diff --git a/tools/perf/ui/tui/helpline.c b/tools/perf/ui/tui/helpline.c index 1793c98653a5..5f188f678c55 100644 --- a/tools/perf/ui/tui/helpline.c +++ b/tools/perf/ui/tui/helpline.c @@ -4,6 +4,7 @@ #include #include #include +#include #include "../../util/debug.h" #include "../helpline.h" diff --git a/tools/perf/ui/tui/progress.c b/tools/perf/ui/tui/progress.c index 5a24dd3ce4db..3d74af5a7ece 100644 --- a/tools/perf/ui/tui/progress.c +++ b/tools/perf/ui/tui/progress.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 #include -#include "../../util/cache.h" #include "../progress.h" #include "../libslang.h" #include "../ui.h" diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c index 2881982b483c..56651a4f5aa0 100644 --- a/tools/perf/ui/tui/setup.c +++ b/tools/perf/ui/tui/setup.c @@ -1,4 +1,3 @@ -// SPDX-License-Identifier: GPL-2.0 #include #include #include @@ -8,7 +7,6 @@ #include #endif -#include "../../util/cache.h" #include "../../util/debug.h" #include "../../util/util.h" #include "../../perf.h" diff --git a/tools/perf/ui/tui/util.c b/tools/perf/ui/tui/util.c index 1163df8b6f06..087d9ab054c8 100644 --- a/tools/perf/ui/tui/util.c +++ b/tools/perf/ui/tui/util.c @@ -5,7 +5,6 @@ #include #include -#include "../../util/cache.h" #include "../../util/debug.h" #include "../browser.h" #include "../keysyms.h" diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 67a7513077d0..eb3c50de831d 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -19,7 +19,6 @@ #include "build-id.h" #include "color.h" #include "config.h" -#include "cache.h" #include "dso.h" #include "map.h" #include "symbol.h" diff --git a/tools/perf/util/color.c b/tools/perf/util/color.c index 39b8c4ec4e2e..bffbdd216a6a 100644 --- a/tools/perf/util/color.c +++ b/tools/perf/util/color.c @@ -1,8 +1,9 @@ // SPDX-License-Identifier: GPL-2.0 #include -#include "cache.h" +#include #include #include +#include #include "color.h" #include #include diff --git a/tools/perf/util/color_config.c b/tools/perf/util/color_config.c index 817dc56e7e95..dc09ba7cb31e 100644 --- a/tools/perf/util/color_config.c +++ b/tools/perf/util/color_config.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include -#include "cache.h" +#include +#include #include "config.h" #include #include diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c index 143d379d4608..a1b59bd35519 100644 --- a/tools/perf/util/debug.c +++ b/tools/perf/util/debug.c @@ -13,7 +13,6 @@ #ifdef HAVE_BACKTRACE_SUPPORT #include #endif -#include "cache.h" #include "color.h" #include "event.h" #include "debug.h" @@ -21,6 +20,7 @@ #include "util.h" #include "target.h" #include "ui/helpline.h" +#include "ui/ui.h" #include diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c index 3bfdf2b7a96a..f8ccfd6be0ee 100644 --- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c +++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c @@ -14,9 +14,9 @@ #include #include #include +#include #include -#include "../cache.h" #include "../auxtrace.h" #include "intel-pt-insn-decoder.h" diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 523af1bd82e6..5ec21d21113c 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -13,13 +13,13 @@ #include "build-id.h" #include "evlist.h" #include "evsel.h" +#include #include #include "parse-events.h" #include #include "string2.h" #include "strlist.h" #include "symbol.h" -#include "cache.h" #include "header.h" #include "bpf-loader.h" #include "debug.h" diff --git a/tools/perf/util/path.c b/tools/perf/util/path.c index ca56ba2dd3da..caed0336429f 100644 --- a/tools/perf/util/path.c +++ b/tools/perf/util/path.c @@ -11,11 +11,12 @@ * * which is what it's designed for. */ -#include "cache.h" #include "path.h" +#include "cache.h" #include #include #include +#include #include #include #include diff --git a/tools/perf/util/path.h b/tools/perf/util/path.h index f014f905df50..083429b7efa3 100644 --- a/tools/perf/util/path.h +++ b/tools/perf/util/path.h @@ -2,6 +2,9 @@ #ifndef _PERF_PATH_H #define _PERF_PATH_H +#include +#include + struct dirent; int path__join(char *bf, size_t size, const char *path1, const char *path2); diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 9807be6f09bb..6b3448f6eb94 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -22,8 +23,8 @@ #include "cpumap.h" #include "header.h" #include "pmu-events/pmu-events.h" -#include "cache.h" #include "string2.h" +#include "strbuf.h" struct perf_pmu_format { char *name; diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index e90faa6bb5aa..b8e0967c5c21 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -26,7 +26,6 @@ #include "strfilter.h" #include "debug.h" #include "dso.h" -#include "cache.h" #include "color.h" #include "map.h" #include "map_groups.h" @@ -38,7 +37,9 @@ #include "probe-file.h" #include "session.h" #include "string2.h" +#include "strbuf.h" +#include #include #include diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c index adc949e8314f..d13db55a2feb 100644 --- a/tools/perf/util/probe-file.c +++ b/tools/perf/util/probe-file.c @@ -17,9 +17,9 @@ #include "strfilter.h" #include "debug.h" #include "dso.h" -#include "cache.h" #include "color.h" #include "symbol.h" +#include "strbuf.h" #include #include "probe-event.h" #include "probe-file.h" -- cgit v1.2.3