perf debug: Remove needless include directives from debug.h
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 29 Aug 2019 19:18:59 +0000 (16:18 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 31 Aug 2019 22:10:19 +0000 (19:10 -0300)
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 <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-7ftk0ztstqub1tirjj8o8xbl@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
75 files changed:
tools/perf/arch/arm/util/cs-etm.c
tools/perf/arch/common.c
tools/perf/arch/x86/tests/bp-modify.c
tools/perf/arch/x86/tests/insn-x86.c
tools/perf/arch/x86/tests/rdpmc.c
tools/perf/arch/x86/util/perf_regs.c
tools/perf/builtin-c2c.c
tools/perf/builtin-config.c
tools/perf/builtin-data.c
tools/perf/builtin-diff.c
tools/perf/builtin-ftrace.c
tools/perf/builtin-help.c
tools/perf/builtin-kmem.c
tools/perf/builtin-list.c
tools/perf/builtin-probe.c
tools/perf/builtin-record.c
tools/perf/builtin-report.c
tools/perf/builtin-top.c
tools/perf/builtin-trace.c
tools/perf/perf.c
tools/perf/tests/attr.c
tools/perf/tests/backward-ring-buffer.c
tools/perf/tests/bp_account.c
tools/perf/tests/bp_signal.c
tools/perf/tests/bp_signal_overflow.c
tools/perf/tests/bpf.c
tools/perf/tests/event-times.c
tools/perf/tests/expr.c
tools/perf/tests/kmod-path.c
tools/perf/tests/mmap-basic.c
tools/perf/tests/openat-syscall-all-cpus.c
tools/perf/tests/openat-syscall-tp-fields.c
tools/perf/tests/openat-syscall.c
tools/perf/tests/perf-record.c
tools/perf/tests/sample-parsing.c
tools/perf/tests/task-exit.c
tools/perf/tests/thread-map.c
tools/perf/tests/unit_number__scnprintf.c
tools/perf/tests/wp.c
tools/perf/ui/browsers/scripts.c
tools/perf/ui/gtk/helpline.c
tools/perf/ui/gtk/util.c
tools/perf/ui/tui/helpline.c
tools/perf/ui/util.c
tools/perf/util/bpf-prologue.c
tools/perf/util/branch.c
tools/perf/util/callchain.c
tools/perf/util/cloexec.c
tools/perf/util/data.c
tools/perf/util/debug.c
tools/perf/util/debug.h
tools/perf/util/dwarf-aux.c
tools/perf/util/dwarf-aux.h
tools/perf/util/env.c
tools/perf/util/evlist.c
tools/perf/util/expr.y
tools/perf/util/hist.c
tools/perf/util/intel-pt.c
tools/perf/util/llvm-utils.c
tools/perf/util/lzma.c
tools/perf/util/machine.c
tools/perf/util/map.c
tools/perf/util/ordered-events.c
tools/perf/util/parse-branch-options.c
tools/perf/util/perf-hooks.c
tools/perf/util/probe-finder.c
tools/perf/util/pstack.c
tools/perf/util/sort.c
tools/perf/util/strbuf.c
tools/perf/util/symbol.c
tools/perf/util/target.c
tools/perf/util/thread-stack.c
tools/perf/util/util.c
tools/perf/util/values.c
tools/perf/util/zlib.c

index b74fd408d496265251727bdeb5e6eba29f6959f1..197041fcba25ec1e0f8d0f06613ffea6ae5e05a5 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/coresight-pmu.h>
 #include <linux/kernel.h>
 #include <linux/log2.h>
+#include <linux/string.h>
 #include <linux/types.h>
 #include <linux/zalloc.h>
 
index a769382fb6449225822574e497da8efbc2962191..59dd875fd5e4e9711554ebcce9b04d21b000a09e 100644 (file)
@@ -1,6 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 #include "common.h"
 #include "../util/env.h"
index f53e4406709f89f6fc0f347d427af9eae8db0fe9..adcacf1b6609e68a9e8024b827d06c706b779f5b 100644 (file)
@@ -7,6 +7,7 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <sys/ptrace.h>
 #include <asm/ptrace.h>
 #include <errno.h>
index c3e5f4ab0d3e693c3253623ce1f9b9807afb9f52..d67bc0ffb70a2113bbb977117037d7ad188c1513 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <linux/types.h>
+#include <string.h>
 
 #include "debug.h"
 #include "tests/tests.h"
index 345a6a0a328b1174d29ce6df28c137a67c589dcc..6e67cee792b1052344b2d7cd205e015de323fd1b 100644 (file)
@@ -6,11 +6,13 @@
 #include <sys/mman.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#include <linux/string.h>
 #include <linux/types.h>
 #include "perf-sys.h"
 #include "debug.h"
 #include "tests/tests.h"
 #include "cloexec.h"
+#include "event.h"
 #include "util.h"
 #include "arch-tests.h"
 
index 74a606ea42d37b7f135e49aa8ee54d1a37f13243..99ea60211e16687a822146cceeed7c38eed5cfb1 100644 (file)
@@ -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),
index 25a5f186dfdee33b3201a97a951211d14a04c108..d1ad694c67a2fd66959b53ca9f3fad9cab93bdac 100644 (file)
@@ -20,6 +20,7 @@
 #include <sys/param.h>
 #include "debug.h"
 #include "builtin.h"
+#include <subcmd/pager.h>
 #include <subcmd/parse-options.h>
 #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 {
index edfc8f76f1bd1214177a0106f1ec499e5e92c795..42d8157e047ab72632a8dc7d166e5cc98479fd0c 100644 (file)
@@ -13,6 +13,7 @@
 #include "util/debug.h"
 #include "util/config.h"
 #include <linux/string.h>
+#include <stdio.h>
 #include <stdlib.h>
 
 static bool use_system_config, use_user_config;
index dde25d4ca56d62ed9a6cf806bf9ae39e11f3809c..ca2fb44874e4b1503140af6edc8a744a142eed39 100644 (file)
@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
+#include <stdio.h>
+#include <string.h>
 #include "builtin.h"
 #include "perf.h"
 #include "debug.h"
index ae4a8ebf90d27520cd37873fe8d0e5a0bdeb84fb..827e4800d8624a5f496a9c2aa2df1e1a52f4be2c 100644 (file)
@@ -24,6 +24,7 @@
 #include "util/annotate.h"
 #include "util/map.h"
 #include <linux/zalloc.h>
+#include <subcmd/pager.h>
 #include <subcmd/parse-options.h>
 
 #include <errno.h>
index 7374f86833fd4934bbd6c9348b3c1d3ebc8ffa8d..2f8ea44c00c464632eb5f2347abc829692f63ed0 100644 (file)
 #include <fcntl.h>
 #include <poll.h>
 #include <linux/capability.h>
+#include <linux/string.h>
 
 #include "debug.h"
+#include <subcmd/pager.h>
 #include <subcmd/parse-options.h>
 #include <api/fs/tracing_path.h>
 #include "evlist.h"
@@ -24,7 +26,6 @@
 #include "util/cap.h"
 #include "util/config.h"
 
-
 #define DEFAULT_TRACER  "function_graph"
 
 struct perf_ftrace {
index 641d4a3f93c395b4db4748dd7703a21c75c906ff..3976aebe36778a6741835382790e364041ac6edd 100644 (file)
@@ -4,7 +4,9 @@
  *
  * Builtin help command
  */
+#include "util/cache.h"
 #include "util/config.h"
+#include "util/strbuf.h"
 #include "builtin.h"
 #include <subcmd/exec-cmd.h>
 #include "common-cmds.h"
 #include <subcmd/help.h>
 #include "util/debug.h"
 #include <linux/kernel.h>
+#include <linux/string.h>
 #include <linux/zalloc.h>
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
index 46f8289361205a2776322b6f61c0332b702f62e2..7eec0da64c46f79996ae71b0e2ef843ab56fd70b 100644 (file)
@@ -14,6 +14,7 @@
 #include "util/callchain.h"
 #include "util/time-utils.h"
 
+#include <subcmd/pager.h>
 #include <subcmd/parse-options.h>
 #include "util/trace-event.h"
 #include "util/data.h"
index dca0d33c1343c152aef144a599c113a4d27e0c3f..11afb760616bd11a4ab01aa500fd24d171453ed0 100644 (file)
@@ -16,6 +16,7 @@
 #include "util/debug.h"
 #include "util/metricgroup.h"
 #include <subcmd/parse-options.h>
+#include <stdio.h>
 
 static bool desc_flag = true;
 static bool details_flag;
index f45fd7e9723e3814a117aef2aa665be99efea173..8950c05ef8fdbb316d4b89f1a5271ffb78a35ce9 100644 (file)
@@ -26,6 +26,7 @@
 #include "util/probe-finder.h"
 #include "util/probe-event.h"
 #include "util/probe-file.h"
+#include <linux/string.h>
 #include <linux/zalloc.h>
 
 #define DEFAULT_VAR_FILTER "!__k???tab_* & !__crc_*"
index 56705d2a6beccf816b0b644243697c5f7d0175d5..1447004eee8accfc57aa161d7a87b477f63f0b6b 100644 (file)
@@ -53,6 +53,7 @@
 #include <signal.h>
 #include <sys/mman.h>
 #include <sys/wait.h>
+#include <linux/string.h>
 #include <linux/time64.h>
 #include <linux/zalloc.h>
 
index 33c20e26b290803c31478c033a36e7773bc789bd..94e7e354cb1660466c3ec47b1318fc2d6aa2e7f6 100644 (file)
@@ -45,6 +45,7 @@
 #include "util/units.h"
 #include "util/branch.h"
 #include "util/util.h"
+#include "ui/ui.h"
 
 #include <dlfcn.h>
 #include <errno.h>
@@ -53,6 +54,7 @@
 #include <linux/ctype.h>
 #include <signal.h>
 #include <linux/bitmap.h>
+#include <linux/string.h>
 #include <linux/stringify.h>
 #include <linux/time64.h>
 #include <sys/types.h>
index c3f95440e99cd713dfc23c7c157ad807d09bf11e..5538b5886e35c86cbcb5e76e96d9b13724632e49 100644 (file)
@@ -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"
index 105695033ebcdc16ba6f4113ec8abe826cbce460..b1ec8ff52740421483ee7341d65e2895f32165c7 100644 (file)
@@ -29,6 +29,7 @@
 #include "util/event.h"
 #include "util/evlist.h"
 #include "util/evswitch.h"
+#include <subcmd/pager.h>
 #include <subcmd/exec-cmd.h>
 #include "util/machine.h"
 #include "util/map.h"
index 237b9b3a1bf11a071a3bafdd69077d6e6daf6d67..e0910637a82d8ad164368d08e1895a98e11bdee5 100644 (file)
@@ -10,6 +10,7 @@
 #include "builtin.h"
 #include "perf.h"
 
+#include "util/cache.h"
 #include "util/env.h"
 #include <subcmd/exec-cmd.h>
 #include "util/config.h"
@@ -32,6 +33,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <linux/kernel.h>
+#include <linux/string.h>
 #include <linux/zalloc.h>
 
 const char perf_usage_string[] =
index 87dc3e1174afe26d300e688a2d5febfba192eaec..a9599ab8c4710908ad1fdd21498213de70d92fda 100644 (file)
@@ -32,6 +32,7 @@
 #include <unistd.h>
 #include "../perf-sys.h"
 #include <subcmd/exec-cmd.h>
+#include "event.h"
 #include "tests.h"
 
 #define ENV "PERF_TEST_ATTR"
index b6f27ef9fb02f58ff68277a76e01a0e9e8025a6e..512288e9f547f44047cc4c70473a918569d85f89 100644 (file)
@@ -10,6 +10,7 @@
 #include "tests.h"
 #include "debug.h"
 #include <errno.h>
+#include <linux/string.h>
 
 #define NR_ITERS 111
 
index c4a30318d7e0b25041e4f9c0e755ff82d779b274..016bba2c142db757760a9bafe7ae56319f820bdf 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "tests.h"
 #include "debug.h"
+#include "event.h"
 #include "../perf-sys.h"
 #include "cloexec.h"
 
index 2d292f8fb3dd4f17c20b3e3239433af920283a47..c1c2c13de254c6952a3a8ac0a28316a6b2e1c141 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "tests.h"
 #include "debug.h"
+#include "event.h"
 #include "perf-sys.h"
 #include "cloexec.h"
 
index 101315a3b34f25087324975b5efd7b7cfabcd99c..eb4dbbddf4ffcfcbe42ee513d0dac6520dad00e7 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "tests.h"
 #include "debug.h"
+#include "event.h"
 #include "../perf-sys.h"
 #include "cloexec.h"
 
index 98642961fc63ed0b0b1500ac96359546c1c531ea..9fc163b2acbb446a1756c9bd26262d36ea4a84f0 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/bpf.h>
 #include <linux/filter.h>
 #include <linux/kernel.h>
+#include <linux/string.h>
 #include <api/fs/fs.h>
 #include <bpf/bpf.h>
 #include "tests.h"
index 714e3611352c0fe83029ebec7e2cc64c6c39ba06..228d1618cf7d740406b8e191dda53f1e250fbc1a 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
+#include <linux/string.h>
 #include <errno.h>
 #include <inttypes.h>
 #include <string.h>
index ee1d88650e69b9b32cd097a0565f66ffd391a954..87843af4c11848b5fe5835f820cab7c5f6c61773 100644 (file)
@@ -3,6 +3,7 @@
 #include "util/expr.h"
 #include "tests.h"
 #include <stdlib.h>
+#include <string.h>
 #include <linux/zalloc.h>
 
 static int test(struct parse_ctx *ctx, const char *e, double val2)
index 0579a70bbbff139cfa6a4f2fffd20ac5cafd7dd0..e483210b176bf0dbc8a373f2c22465ae89f3fa8d 100644 (file)
@@ -1,9 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <stdbool.h>
 #include <stdlib.h>
+#include <string.h>
 #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)
index fe91350fd5ab411e99701592129f6d2c12d7a191..bdf77bfe1b8036bf46981195db07d32db2c535bf 100644 (file)
@@ -13,6 +13,7 @@
 #include "tests.h"
 #include <linux/err.h>
 #include <linux/kernel.h>
+#include <linux/string.h>
 #include <perf/evlist.h>
 
 /*
index 4ae4dea07466db64175080da4a40cb63b8995389..9171f77cd9cdea57042f7635fef5afc86c7e4456 100644 (file)
@@ -9,6 +9,7 @@
 #include <fcntl.h>
 #include <api/fs/fs.h>
 #include <linux/err.h>
+#include <linux/string.h>
 #include <api/fs/tracing_path.h>
 #include "evsel.h"
 #include "tests.h"
index 62492106fb5e80627fa9e85d9cd130ad2f3dcf81..b71167b43dda94bbdf27fd41a256b246d9346a2d 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <stdbool.h>
 #include <linux/err.h>
+#include <linux/string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 58df4bda5e12147b35525fa6f077779ba71db31c..5ebffae186051f8213a408890d9787ebfb9c39a0 100644 (file)
@@ -3,6 +3,7 @@
 #include <inttypes.h>
 #include <api/fs/tracing_path.h>
 #include <linux/err.h>
+#include <linux/string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 3a205f6f936382bf3c0541f3a8fd64bd468f9c04..e1b42292cf7fdb2dd2b337c08666fc7d86a1af2d 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include <inttypes.h>
+#include <linux/string.h>
 /* For the CLR_() macros */
 #include <pthread.h>
 
index a8ca29fe172ba90cd074144b32b5f83a564e51b4..0c09dc15a059b907faea1628eab0eb2812afa856 100644 (file)
@@ -2,6 +2,7 @@
 #include <stdbool.h>
 #include <inttypes.h>
 #include <stdlib.h>
+#include <string.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
index 0e0e0627184e71864f85688618c199e94db9c9e9..f610e8c0a0836231ca995dd1515f8a9fb4e01a66 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <errno.h>
 #include <signal.h>
+#include <linux/string.h>
 #include <perf/evlist.h>
 
 static int exited;
index c19ec8849e772fee163d86a03747058c6962e716..39168c57943b2b6a573f35046e8bf9b0d656915d 100644 (file)
@@ -1,12 +1,19 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <stdlib.h>
+#include <string.h>
 #include <sys/types.h>
 #include <unistd.h>
 #include <sys/prctl.h>
 #include "tests.h"
 #include "thread_map.h"
 #include "debug.h"
+#include "event.h"
 #include <linux/zalloc.h>
+#include <perf/event.h>
+
+struct perf_sample;
+struct perf_tool;
+struct machine;
 
 #define NAME   (const char *) "perf"
 #define NAMEUL (unsigned long) NAME
index 2bb8cb0039c18468036aba68081097c4578db957..3721757435da5e59961ae1142f5ed56ffb04e5b5 100644 (file)
@@ -2,6 +2,7 @@
 #include <inttypes.h>
 #include <linux/compiler.h>
 #include <linux/types.h>
+#include <string.h>
 #include "tests.h"
 #include "units.h"
 #include "debug.h"
index 982ac55d69ea165e7c69fecf0812dd0a1bcaa20e..d262d6639829de0f6427a6765848f466cb490d2d 100644 (file)
@@ -1,10 +1,13 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
 #include <linux/hw_breakpoint.h>
+#include <linux/kernel.h>
 #include "tests.h"
 #include "debug.h"
+#include "event.h"
 #include "cloexec.h"
 #include "../perf-sys.h"
 
index e63f3778d75c07155f4c4bc835e027e689f7071f..77809c0fad02920ca581c6dc1dcfec648a317c07 100644 (file)
@@ -9,6 +9,7 @@
 #include "../browser.h"
 #include "../libslang.h"
 #include "config.h"
+#include <linux/string.h>
 #include <linux/zalloc.h>
 
 #define SCRIPT_NAMELEN 128
index fbf1ea9ce9a2275cab0470b7daab5e70050e137c..e166da9ec7679ce4816dd376461a8b17269d483c 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <stdio.h>
 #include <string.h>
+#include <linux/kernel.h>
 
 #include "gtk.h"
 #include "../ui.h"
index c28bdb7517ac2f390490130c612828c3c1c6ffc7..c2c558958b9cdf0ee956d46b0589aeb36796be66 100644 (file)
@@ -3,6 +3,7 @@
 #include "../../util/debug.h"
 #include "gtk.h"
 
+#include <stdlib.h>
 #include <string.h>
 #include <linux/zalloc.h>
 
index 93d6b724028547f22e66e75bfa374af0a8239754..1793c98653a505d5251ccdb1f2b7311228e31ee0 100644 (file)
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <pthread.h>
+#include <linux/kernel.h>
 
 #include "../../util/debug.h"
 #include "../helpline.h"
index 9ed76e88a3e4cf48841ae3ad80802a701e214917..689b27c34246c5086419a059d61fbf4a2c4b048f 100644 (file)
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 #include "util.h"
 #include "../util/debug.h"
-
+#include <stdio.h>
 
 /*
  * Default error logging functions
index 09e6c76e1c3b500c35b8950a7e02e96c303cfeb0..b020a8678eb9c6d81d10ff30858f3ad3c550aa12 100644 (file)
@@ -13,6 +13,7 @@
 #include "bpf-prologue.h"
 #include "probe-finder.h"
 #include <errno.h>
+#include <stdlib.h>
 #include <dwarf-regs.h>
 #include <linux/filter.h>
 
index 02d6d839ff248ac6f4087d83de32af297675435f..30642e1f2b1b898d6f9078d6c21f29b24df7ef64 100644 (file)
@@ -1,6 +1,7 @@
 #include "util/util.h"
 #include "util/debug.h"
 #include "util/branch.h"
+#include <linux/kernel.h>
 
 static bool cross_area(u64 addr1, u64 addr2, int size)
 {
index a47d0e8c24342ec0527643ed356e13be5a82d881..76bf05b26d3bd58afbafc3ed3ced9e716c623143 100644 (file)
@@ -16,6 +16,7 @@
 #include <stdbool.h>
 #include <errno.h>
 #include <math.h>
+#include <linux/string.h>
 #include <linux/zalloc.h>
 
 #include "asm/bug.h"
index 92d08198e64ad4d07ddb0c119fbbc657146113d2..4e904fcb2783b627bc8be2dad2ada8d57128213b 100644 (file)
@@ -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 <unistd.h>
 #include <sys/syscall.h>
+#include <linux/string.h>
 
 static unsigned long flag = PERF_FLAG_FD_CLOEXEC;
 
index 74aafe0df5066e10bd67d0a5ee2c9a5109bc2840..e75c3a279fe81761a441cee3c530308d874c68b5 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include <linux/kernel.h>
+#include <linux/string.h>
 #include <linux/zalloc.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index c822c5943340771211c5cc0e75346210c1d23a63..522887ee4c025237c2000c586160a2164f9b702e 100644 (file)
@@ -19,6 +19,7 @@
 #include "print_binary.h"
 #include "util.h"
 #include "target.h"
+#include "ui/helpline.h"
 
 #include <linux/ctype.h>
 
index 77445dfc5c7d2657445942807338f993b8ec2d21..b2deee987ffadf1e0bdfc3e6966678b89c095240 100644 (file)
@@ -4,11 +4,7 @@
 #define __PERF_DEBUG_H
 
 #include <stdbool.h>
-#include <string.h>
 #include <linux/compiler.h>
-#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);
 
index 03b2de1f5a358d2080524155e4e7e5b9058ea783..df6cee5c071f30da11df61f3066eff1b534e3b4a 100644 (file)
@@ -9,6 +9,7 @@
 #include <stdlib.h>
 #include "debug.h"
 #include "dwarf-aux.h"
+#include "strbuf.h"
 #include "string2.h"
 
 /**
index 0489b0cf8e2c63c3b39a770c213782288753109b..f204e58924034664da144ae5761c77d12d6c526c 100644 (file)
@@ -10,6 +10,8 @@
 #include <elfutils/libdwfl.h>
 #include <elfutils/version.h>
 
+struct strbuf;
+
 /* Find the realpath of the target file */
 const char *cu_find_realpath(Dwarf_Die *cu_die, const char *fname);
 
index 571efb4f03513b4ee81b70bad077787dfcda19a5..3baca06786fb73494cd6e4b7d410b046dba63e6f 100644 (file)
@@ -9,6 +9,7 @@
 #include <sys/utsname.h>
 #include <bpf/libbpf.h>
 #include <stdlib.h>
+#include <string.h>
 
 struct perf_env perf_env;
 
index 71b231c7097fa3c8fbb92797b783d86236845c9e..b5d6d6ec9a9bea86458eccb8332635aeb22333c6 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/hash.h>
 #include <linux/log2.h>
 #include <linux/err.h>
+#include <linux/string.h>
 #include <linux/zalloc.h>
 #include <perf/evlist.h>
 #include <perf/evsel.h>
index 432b8560cf51c8bf2d751d409d34fe516ade2582..f9a20a39b64adbacbf2ba1ca1aac8ed5f8f37499 100644 (file)
@@ -2,9 +2,11 @@
 %{
 #include "util.h"
 #include "util/debug.h"
+#include <stdlib.h> // strtod()
 #define IN_EXPR_Y 1
 #include "expr.h"
 #include "smt.h"
+#include <assert.h>
 #include <string.h>
 
 #define MAXIDLEN 256
index adae4134e972adc378043399d8f5e8532c144531..02ea2ee628148e0df67224d23dbf97df1fd0ca4c 100644 (file)
@@ -19,6 +19,7 @@
 #include <math.h>
 #include <inttypes.h>
 #include <sys/param.h>
+#include <linux/string.h>
 #include <linux/time64.h>
 #include <linux/zalloc.h>
 
index 825e3690940dfb90d771310eb7adb140dfb819ed..9b56fb74bedf84f172c88d3dc7df0e8045e22199 100644 (file)
@@ -9,6 +9,7 @@
 #include <stdbool.h>
 #include <errno.h>
 #include <linux/kernel.h>
+#include <linux/string.h>
 #include <linux/types.h>
 #include <linux/zalloc.h>
 
index 9f0470ecbca9649bdf29622b1f01936d53007e77..55fb4b3b1157c93839343e316cd24ae29f6d03a4 100644 (file)
@@ -9,6 +9,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <linux/err.h>
+#include <linux/string.h>
 #include <linux/zalloc.h>
 #include "debug.h"
 #include "llvm-utils.h"
index b1dd29a9d915efac1953d0d04ad9b99a5f3425de..3974470660335cbf7292848768ae826a993939cc 100644 (file)
@@ -9,6 +9,7 @@
 #include "compress.h"
 #include "util.h"
 #include "debug.h"
+#include <string.h>
 #include <unistd.h>
 
 #define BUFSIZE 8192
index a1542b4c047bd8d2a4d7bda3ddfc089cd6226c4a..6e9afe4e55dd3701e787309c95a41378c05f4cb9 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/ctype.h>
 #include <symbol/kallsyms.h>
 #include <linux/mman.h>
+#include <linux/string.h>
 #include <linux/zalloc.h>
 
 static void __machine__remove_thread(struct machine *machine, struct thread *th, bool lock);
index 27b7b102e4a2f2462db11baf01b9911810699c74..c75b20b9382072af1a19dd40fea9c1cb7dbc999f 100644 (file)
@@ -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);
index bb5f34b7ab446dad4b668c43621ee1c1cc547ec5..359db2b1fcef3096bdcb36316c1374454876de13 100644 (file)
@@ -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__)
index 1430437b9d51705c41db0ad12421025331b17b96..bb4aa88c50a8276fd091a126873187775ce9f3d0 100644 (file)
@@ -1,8 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0
 #include "util/debug.h"
+#include "util/event.h"
 #include <subcmd/parse-options.h>
 #include "util/parse-branch-options.h"
 #include <stdlib.h>
+#include <string.h>
 
 #define BRANCH_OPT(n, m) \
        { .name = n, .mode = (m) }
index 4f3aa8d99ef4d26190382fdc306cce32e0e2a658..e635c594f773ef0f19dc87705678498d433f614f 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <errno.h>
 #include <stdlib.h>
+#include <string.h>
 #include <setjmp.h>
 #include <linux/err.h>
 #include <linux/kernel.h>
index 025fc4491993caff17ae68812a6311e550375d0e..505905fc21c54440e3fab59966ec09d59026ef7d 100644 (file)
@@ -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"
index 28de8a4c2ce8ec1bd4ab9bad40f1b8af8e14bfd7..80ff41fc45be81f5b055e0ac123dc2fefbddcf5c 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/kernel.h>
 #include <linux/zalloc.h>
 #include <stdlib.h>
+#include <string.h>
 
 struct pstack {
        unsigned short  top;
index 23d0ab7c801c487e7987665c4138cd7d00ceb2b8..035355a9945eca286df842d5c5ea5a440d131d68 100644 (file)
@@ -22,6 +22,7 @@
 #include "annotate.h"
 #include "time-utils.h"
 #include <linux/kernel.h>
+#include <linux/string.h>
 
 regex_t                parent_regex;
 const char     default_parent_pattern[] = "^sys_|^do_page_fault";
index 0afdbf38a2b20c6a505dd1e0302cb2f1ff1eca56..a64a37628f12807481b1eade341ebb71186d3b2a 100644 (file)
@@ -1,8 +1,12 @@
 // SPDX-License-Identifier: GPL-2.0
+#include "cache.h"
 #include "debug.h"
+#include "strbuf.h"
 #include <linux/kernel.h>
+#include <linux/string.h>
 #include <linux/zalloc.h>
 #include <errno.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 
index 035f2e75728c8cf562edb98cd56a3289000d4825..c37cca690864f6851138c8efb4d25d1be8210521 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/capability.h>
 #include <linux/kernel.h>
 #include <linux/mman.h>
+#include <linux/string.h>
 #include <linux/time64.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 3adc6548034971bd45e276a558560213306b5b93..565f7aef7e6c9009a61513b3092670047a22dc40 100644 (file)
 #include "debug.h"
 
 #include <pwd.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
 
 enum target_errno target__validate(struct target *target)
 {
index 15134ac9b8f172554c0496b8585c5a1c1ab4ebe5..cd8a948d03ec9e6ba9b64faf790691de158f1789 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/zalloc.h>
 #include <errno.h>
 #include <stdlib.h>
+#include <string.h>
 #include "thread.h"
 #include "event.h"
 #include "machine.h"
index 607daec229432c32af9fd7e26f34e9fcb8c2aa92..32322a20a68be4fb7774008474e6fd2205df3b93 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 #include "util.h"
 #include "debug.h"
+#include "event.h"
 #include "namespaces.h"
 #include <api/fs/fs.h>
 #include <sys/mman.h>
index c59154e2d124b4b537540ee813296c625fa46e1a..b9823f414f10ca06762a4a43850bde975c450378 100644 (file)
@@ -2,6 +2,7 @@
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <errno.h>
 #include <linux/zalloc.h>
 
index 512ad7c09b1348621499587370d587a7fcd5ec90..59d456f716e94a84e984db14918f27d734f38c92 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <fcntl.h>
 #include <stdio.h>
+#include <string.h>
 #include <unistd.h>
 #include <sys/stat.h>
 #include <sys/mman.h>