diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-08-29 15:18:59 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-08-31 18:10:19 -0400 |
commit | 8520a98dbab61e9e340cdfb72dd17ccc8a98961e (patch) | |
tree | 7a589c16906e4eb8c238c2281faeab57fefa613c | |
parent | b42090256fba05dce1a0482a4ccd9bb6464cc499 (diff) |
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 <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, 104 insertions, 6 deletions
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 @@ | |||
11 | #include <linux/coresight-pmu.h> | 11 | #include <linux/coresight-pmu.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/log2.h> | 13 | #include <linux/log2.h> |
14 | #include <linux/string.h> | ||
14 | #include <linux/types.h> | 15 | #include <linux/types.h> |
15 | #include <linux/zalloc.h> | 16 | #include <linux/zalloc.h> |
16 | 17 | ||
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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include <limits.h> | ||
2 | #include <stdio.h> | 3 | #include <stdio.h> |
3 | #include <stdlib.h> | 4 | #include <stdlib.h> |
5 | #include <string.h> | ||
4 | #include <unistd.h> | 6 | #include <unistd.h> |
5 | #include "common.h" | 7 | #include "common.h" |
6 | #include "../util/env.h" | 8 | #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 @@ | |||
7 | #include <unistd.h> | 7 | #include <unistd.h> |
8 | #include <stdio.h> | 8 | #include <stdio.h> |
9 | #include <stdlib.h> | 9 | #include <stdlib.h> |
10 | #include <string.h> | ||
10 | #include <sys/ptrace.h> | 11 | #include <sys/ptrace.h> |
11 | #include <asm/ptrace.h> | 12 | #include <asm/ptrace.h> |
12 | #include <errno.h> | 13 | #include <errno.h> |
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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include <linux/types.h> | 2 | #include <linux/types.h> |
3 | #include <string.h> | ||
3 | 4 | ||
4 | #include "debug.h" | 5 | #include "debug.h" |
5 | #include "tests/tests.h" | 6 | #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 @@ | |||
6 | #include <sys/mman.h> | 6 | #include <sys/mman.h> |
7 | #include <sys/types.h> | 7 | #include <sys/types.h> |
8 | #include <sys/wait.h> | 8 | #include <sys/wait.h> |
9 | #include <linux/string.h> | ||
9 | #include <linux/types.h> | 10 | #include <linux/types.h> |
10 | #include "perf-sys.h" | 11 | #include "perf-sys.h" |
11 | #include "debug.h" | 12 | #include "debug.h" |
12 | #include "tests/tests.h" | 13 | #include "tests/tests.h" |
13 | #include "cloexec.h" | 14 | #include "cloexec.h" |
15 | #include "event.h" | ||
14 | #include "util.h" | 16 | #include "util.h" |
15 | #include "arch-tests.h" | 17 | #include "arch-tests.h" |
16 | 18 | ||
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 @@ | |||
7 | #include "../../perf-sys.h" | 7 | #include "../../perf-sys.h" |
8 | #include "../../util/perf_regs.h" | 8 | #include "../../util/perf_regs.h" |
9 | #include "../../util/debug.h" | 9 | #include "../../util/debug.h" |
10 | #include "../../util/event.h" | ||
10 | 11 | ||
11 | const struct sample_reg sample_reg_masks[] = { | 12 | const struct sample_reg sample_reg_masks[] = { |
12 | SMPL_REG(AX, PERF_REG_X86_AX), | 13 | 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 @@ | |||
20 | #include <sys/param.h> | 20 | #include <sys/param.h> |
21 | #include "debug.h" | 21 | #include "debug.h" |
22 | #include "builtin.h" | 22 | #include "builtin.h" |
23 | #include <subcmd/pager.h> | ||
23 | #include <subcmd/parse-options.h> | 24 | #include <subcmd/parse-options.h> |
24 | #include "mem-events.h" | 25 | #include "mem-events.h" |
25 | #include "session.h" | 26 | #include "session.h" |
@@ -35,6 +36,7 @@ | |||
35 | #include "thread.h" | 36 | #include "thread.h" |
36 | #include "mem2node.h" | 37 | #include "mem2node.h" |
37 | #include "symbol.h" | 38 | #include "symbol.h" |
39 | #include "ui/ui.h" | ||
38 | #include "../perf.h" | 40 | #include "../perf.h" |
39 | 41 | ||
40 | struct c2c_hists { | 42 | 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 @@ | |||
13 | #include "util/debug.h" | 13 | #include "util/debug.h" |
14 | #include "util/config.h" | 14 | #include "util/config.h" |
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <stdio.h> | ||
16 | #include <stdlib.h> | 17 | #include <stdlib.h> |
17 | 18 | ||
18 | static bool use_system_config, use_user_config; | 19 | 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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include <linux/compiler.h> | 2 | #include <linux/compiler.h> |
3 | #include <stdio.h> | ||
4 | #include <string.h> | ||
3 | #include "builtin.h" | 5 | #include "builtin.h" |
4 | #include "perf.h" | 6 | #include "perf.h" |
5 | #include "debug.h" | 7 | #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 @@ | |||
24 | #include "util/annotate.h" | 24 | #include "util/annotate.h" |
25 | #include "util/map.h" | 25 | #include "util/map.h" |
26 | #include <linux/zalloc.h> | 26 | #include <linux/zalloc.h> |
27 | #include <subcmd/pager.h> | ||
27 | #include <subcmd/parse-options.h> | 28 | #include <subcmd/parse-options.h> |
28 | 29 | ||
29 | #include <errno.h> | 30 | #include <errno.h> |
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 @@ | |||
13 | #include <fcntl.h> | 13 | #include <fcntl.h> |
14 | #include <poll.h> | 14 | #include <poll.h> |
15 | #include <linux/capability.h> | 15 | #include <linux/capability.h> |
16 | #include <linux/string.h> | ||
16 | 17 | ||
17 | #include "debug.h" | 18 | #include "debug.h" |
19 | #include <subcmd/pager.h> | ||
18 | #include <subcmd/parse-options.h> | 20 | #include <subcmd/parse-options.h> |
19 | #include <api/fs/tracing_path.h> | 21 | #include <api/fs/tracing_path.h> |
20 | #include "evlist.h" | 22 | #include "evlist.h" |
@@ -24,7 +26,6 @@ | |||
24 | #include "util/cap.h" | 26 | #include "util/cap.h" |
25 | #include "util/config.h" | 27 | #include "util/config.h" |
26 | 28 | ||
27 | |||
28 | #define DEFAULT_TRACER "function_graph" | 29 | #define DEFAULT_TRACER "function_graph" |
29 | 30 | ||
30 | struct perf_ftrace { | 31 | 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 @@ | |||
4 | * | 4 | * |
5 | * Builtin help command | 5 | * Builtin help command |
6 | */ | 6 | */ |
7 | #include "util/cache.h" | ||
7 | #include "util/config.h" | 8 | #include "util/config.h" |
9 | #include "util/strbuf.h" | ||
8 | #include "builtin.h" | 10 | #include "builtin.h" |
9 | #include <subcmd/exec-cmd.h> | 11 | #include <subcmd/exec-cmd.h> |
10 | #include "common-cmds.h" | 12 | #include "common-cmds.h" |
@@ -13,10 +15,12 @@ | |||
13 | #include <subcmd/help.h> | 15 | #include <subcmd/help.h> |
14 | #include "util/debug.h" | 16 | #include "util/debug.h" |
15 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/string.h> | ||
16 | #include <linux/zalloc.h> | 19 | #include <linux/zalloc.h> |
17 | #include <errno.h> | 20 | #include <errno.h> |
18 | #include <stdio.h> | 21 | #include <stdio.h> |
19 | #include <stdlib.h> | 22 | #include <stdlib.h> |
23 | #include <string.h> | ||
20 | #include <sys/types.h> | 24 | #include <sys/types.h> |
21 | #include <sys/stat.h> | 25 | #include <sys/stat.h> |
22 | #include <unistd.h> | 26 | #include <unistd.h> |
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 @@ | |||
14 | #include "util/callchain.h" | 14 | #include "util/callchain.h" |
15 | #include "util/time-utils.h" | 15 | #include "util/time-utils.h" |
16 | 16 | ||
17 | #include <subcmd/pager.h> | ||
17 | #include <subcmd/parse-options.h> | 18 | #include <subcmd/parse-options.h> |
18 | #include "util/trace-event.h" | 19 | #include "util/trace-event.h" |
19 | #include "util/data.h" | 20 | #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 @@ | |||
16 | #include "util/debug.h" | 16 | #include "util/debug.h" |
17 | #include "util/metricgroup.h" | 17 | #include "util/metricgroup.h" |
18 | #include <subcmd/parse-options.h> | 18 | #include <subcmd/parse-options.h> |
19 | #include <stdio.h> | ||
19 | 20 | ||
20 | static bool desc_flag = true; | 21 | static bool desc_flag = true; |
21 | static bool details_flag; | 22 | 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 @@ | |||
26 | #include "util/probe-finder.h" | 26 | #include "util/probe-finder.h" |
27 | #include "util/probe-event.h" | 27 | #include "util/probe-event.h" |
28 | #include "util/probe-file.h" | 28 | #include "util/probe-file.h" |
29 | #include <linux/string.h> | ||
29 | #include <linux/zalloc.h> | 30 | #include <linux/zalloc.h> |
30 | 31 | ||
31 | #define DEFAULT_VAR_FILTER "!__k???tab_* & !__crc_*" | 32 | #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 @@ | |||
53 | #include <signal.h> | 53 | #include <signal.h> |
54 | #include <sys/mman.h> | 54 | #include <sys/mman.h> |
55 | #include <sys/wait.h> | 55 | #include <sys/wait.h> |
56 | #include <linux/string.h> | ||
56 | #include <linux/time64.h> | 57 | #include <linux/time64.h> |
57 | #include <linux/zalloc.h> | 58 | #include <linux/zalloc.h> |
58 | 59 | ||
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 @@ | |||
45 | #include "util/units.h" | 45 | #include "util/units.h" |
46 | #include "util/branch.h" | 46 | #include "util/branch.h" |
47 | #include "util/util.h" | 47 | #include "util/util.h" |
48 | #include "ui/ui.h" | ||
48 | 49 | ||
49 | #include <dlfcn.h> | 50 | #include <dlfcn.h> |
50 | #include <errno.h> | 51 | #include <errno.h> |
@@ -53,6 +54,7 @@ | |||
53 | #include <linux/ctype.h> | 54 | #include <linux/ctype.h> |
54 | #include <signal.h> | 55 | #include <signal.h> |
55 | #include <linux/bitmap.h> | 56 | #include <linux/bitmap.h> |
57 | #include <linux/string.h> | ||
56 | #include <linux/stringify.h> | 58 | #include <linux/stringify.h> |
57 | #include <linux/time64.h> | 59 | #include <linux/time64.h> |
58 | #include <sys/types.h> | 60 | #include <sys/types.h> |
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 @@ | |||
45 | #include "util/intlist.h" | 45 | #include "util/intlist.h" |
46 | #include "util/parse-branch-options.h" | 46 | #include "util/parse-branch-options.h" |
47 | #include "arch/common.h" | 47 | #include "arch/common.h" |
48 | #include "ui/ui.h" | ||
48 | 49 | ||
49 | #include "util/debug.h" | 50 | #include "util/debug.h" |
50 | #include "util/ordered-events.h" | 51 | #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 @@ | |||
29 | #include "util/event.h" | 29 | #include "util/event.h" |
30 | #include "util/evlist.h" | 30 | #include "util/evlist.h" |
31 | #include "util/evswitch.h" | 31 | #include "util/evswitch.h" |
32 | #include <subcmd/pager.h> | ||
32 | #include <subcmd/exec-cmd.h> | 33 | #include <subcmd/exec-cmd.h> |
33 | #include "util/machine.h" | 34 | #include "util/machine.h" |
34 | #include "util/map.h" | 35 | #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 @@ | |||
10 | #include "builtin.h" | 10 | #include "builtin.h" |
11 | #include "perf.h" | 11 | #include "perf.h" |
12 | 12 | ||
13 | #include "util/cache.h" | ||
13 | #include "util/env.h" | 14 | #include "util/env.h" |
14 | #include <subcmd/exec-cmd.h> | 15 | #include <subcmd/exec-cmd.h> |
15 | #include "util/config.h" | 16 | #include "util/config.h" |
@@ -32,6 +33,7 @@ | |||
32 | #include <sys/stat.h> | 33 | #include <sys/stat.h> |
33 | #include <unistd.h> | 34 | #include <unistd.h> |
34 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
36 | #include <linux/string.h> | ||
35 | #include <linux/zalloc.h> | 37 | #include <linux/zalloc.h> |
36 | 38 | ||
37 | const char perf_usage_string[] = | 39 | 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 @@ | |||
32 | #include <unistd.h> | 32 | #include <unistd.h> |
33 | #include "../perf-sys.h" | 33 | #include "../perf-sys.h" |
34 | #include <subcmd/exec-cmd.h> | 34 | #include <subcmd/exec-cmd.h> |
35 | #include "event.h" | ||
35 | #include "tests.h" | 36 | #include "tests.h" |
36 | 37 | ||
37 | #define ENV "PERF_TEST_ATTR" | 38 | #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 @@ | |||
10 | #include "tests.h" | 10 | #include "tests.h" |
11 | #include "debug.h" | 11 | #include "debug.h" |
12 | #include <errno.h> | 12 | #include <errno.h> |
13 | #include <linux/string.h> | ||
13 | 14 | ||
14 | #define NR_ITERS 111 | 15 | #define NR_ITERS 111 |
15 | 16 | ||
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 @@ | |||
19 | 19 | ||
20 | #include "tests.h" | 20 | #include "tests.h" |
21 | #include "debug.h" | 21 | #include "debug.h" |
22 | #include "event.h" | ||
22 | #include "../perf-sys.h" | 23 | #include "../perf-sys.h" |
23 | #include "cloexec.h" | 24 | #include "cloexec.h" |
24 | 25 | ||
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 @@ | |||
25 | 25 | ||
26 | #include "tests.h" | 26 | #include "tests.h" |
27 | #include "debug.h" | 27 | #include "debug.h" |
28 | #include "event.h" | ||
28 | #include "perf-sys.h" | 29 | #include "perf-sys.h" |
29 | #include "cloexec.h" | 30 | #include "cloexec.h" |
30 | 31 | ||
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 @@ | |||
24 | 24 | ||
25 | #include "tests.h" | 25 | #include "tests.h" |
26 | #include "debug.h" | 26 | #include "debug.h" |
27 | #include "event.h" | ||
27 | #include "../perf-sys.h" | 28 | #include "../perf-sys.h" |
28 | #include "cloexec.h" | 29 | #include "cloexec.h" |
29 | 30 | ||
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 @@ | |||
12 | #include <linux/bpf.h> | 12 | #include <linux/bpf.h> |
13 | #include <linux/filter.h> | 13 | #include <linux/filter.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/string.h> | ||
15 | #include <api/fs/fs.h> | 16 | #include <api/fs/fs.h> |
16 | #include <bpf/bpf.h> | 17 | #include <bpf/bpf.h> |
17 | #include "tests.h" | 18 | #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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include <linux/compiler.h> | 2 | #include <linux/compiler.h> |
3 | #include <linux/string.h> | ||
3 | #include <errno.h> | 4 | #include <errno.h> |
4 | #include <inttypes.h> | 5 | #include <inttypes.h> |
5 | #include <string.h> | 6 | #include <string.h> |
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 @@ | |||
3 | #include "util/expr.h" | 3 | #include "util/expr.h" |
4 | #include "tests.h" | 4 | #include "tests.h" |
5 | #include <stdlib.h> | 5 | #include <stdlib.h> |
6 | #include <string.h> | ||
6 | #include <linux/zalloc.h> | 7 | #include <linux/zalloc.h> |
7 | 8 | ||
8 | static int test(struct parse_ctx *ctx, const char *e, double val2) | 9 | 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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include <stdbool.h> | 2 | #include <stdbool.h> |
3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
4 | #include <string.h> | ||
4 | #include "tests.h" | 5 | #include "tests.h" |
5 | #include "dso.h" | 6 | #include "dso.h" |
6 | #include "debug.h" | 7 | #include "debug.h" |
8 | #include "event.h" | ||
7 | 9 | ||
8 | static int test(const char *path, bool alloc_name, bool kmod, | 10 | static int test(const char *path, bool alloc_name, bool kmod, |
9 | int comp, const char *name) | 11 | 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 @@ | |||
13 | #include "tests.h" | 13 | #include "tests.h" |
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/string.h> | ||
16 | #include <perf/evlist.h> | 17 | #include <perf/evlist.h> |
17 | 18 | ||
18 | /* | 19 | /* |
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 @@ | |||
9 | #include <fcntl.h> | 9 | #include <fcntl.h> |
10 | #include <api/fs/fs.h> | 10 | #include <api/fs/fs.h> |
11 | #include <linux/err.h> | 11 | #include <linux/err.h> |
12 | #include <linux/string.h> | ||
12 | #include <api/fs/tracing_path.h> | 13 | #include <api/fs/tracing_path.h> |
13 | #include "evsel.h" | 14 | #include "evsel.h" |
14 | #include "tests.h" | 15 | #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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include <stdbool.h> | 2 | #include <stdbool.h> |
3 | #include <linux/err.h> | 3 | #include <linux/err.h> |
4 | #include <linux/string.h> | ||
4 | #include <sys/types.h> | 5 | #include <sys/types.h> |
5 | #include <sys/stat.h> | 6 | #include <sys/stat.h> |
6 | #include <fcntl.h> | 7 | #include <fcntl.h> |
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 @@ | |||
3 | #include <inttypes.h> | 3 | #include <inttypes.h> |
4 | #include <api/fs/tracing_path.h> | 4 | #include <api/fs/tracing_path.h> |
5 | #include <linux/err.h> | 5 | #include <linux/err.h> |
6 | #include <linux/string.h> | ||
6 | #include <sys/types.h> | 7 | #include <sys/types.h> |
7 | #include <sys/stat.h> | 8 | #include <sys/stat.h> |
8 | #include <fcntl.h> | 9 | #include <fcntl.h> |
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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include <errno.h> | 2 | #include <errno.h> |
3 | #include <inttypes.h> | 3 | #include <inttypes.h> |
4 | #include <linux/string.h> | ||
4 | /* For the CLR_() macros */ | 5 | /* For the CLR_() macros */ |
5 | #include <pthread.h> | 6 | #include <pthread.h> |
6 | 7 | ||
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 @@ | |||
2 | #include <stdbool.h> | 2 | #include <stdbool.h> |
3 | #include <inttypes.h> | 3 | #include <inttypes.h> |
4 | #include <stdlib.h> | 4 | #include <stdlib.h> |
5 | #include <string.h> | ||
5 | #include <linux/bitops.h> | 6 | #include <linux/bitops.h> |
6 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
7 | #include <linux/types.h> | 8 | #include <linux/types.h> |
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 @@ | |||
9 | 9 | ||
10 | #include <errno.h> | 10 | #include <errno.h> |
11 | #include <signal.h> | 11 | #include <signal.h> |
12 | #include <linux/string.h> | ||
12 | #include <perf/evlist.h> | 13 | #include <perf/evlist.h> |
13 | 14 | ||
14 | static int exited; | 15 | 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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include <stdlib.h> | 2 | #include <stdlib.h> |
3 | #include <string.h> | ||
3 | #include <sys/types.h> | 4 | #include <sys/types.h> |
4 | #include <unistd.h> | 5 | #include <unistd.h> |
5 | #include <sys/prctl.h> | 6 | #include <sys/prctl.h> |
6 | #include "tests.h" | 7 | #include "tests.h" |
7 | #include "thread_map.h" | 8 | #include "thread_map.h" |
8 | #include "debug.h" | 9 | #include "debug.h" |
10 | #include "event.h" | ||
9 | #include <linux/zalloc.h> | 11 | #include <linux/zalloc.h> |
12 | #include <perf/event.h> | ||
13 | |||
14 | struct perf_sample; | ||
15 | struct perf_tool; | ||
16 | struct machine; | ||
10 | 17 | ||
11 | #define NAME (const char *) "perf" | 18 | #define NAME (const char *) "perf" |
12 | #define NAMEUL (unsigned long) NAME | 19 | #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 @@ | |||
2 | #include <inttypes.h> | 2 | #include <inttypes.h> |
3 | #include <linux/compiler.h> | 3 | #include <linux/compiler.h> |
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <string.h> | ||
5 | #include "tests.h" | 6 | #include "tests.h" |
6 | #include "units.h" | 7 | #include "units.h" |
7 | #include "debug.h" | 8 | #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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include <stdlib.h> | 2 | #include <stdlib.h> |
3 | #include <string.h> | ||
3 | #include <unistd.h> | 4 | #include <unistd.h> |
4 | #include <sys/ioctl.h> | 5 | #include <sys/ioctl.h> |
5 | #include <linux/hw_breakpoint.h> | 6 | #include <linux/hw_breakpoint.h> |
7 | #include <linux/kernel.h> | ||
6 | #include "tests.h" | 8 | #include "tests.h" |
7 | #include "debug.h" | 9 | #include "debug.h" |
10 | #include "event.h" | ||
8 | #include "cloexec.h" | 11 | #include "cloexec.h" |
9 | #include "../perf-sys.h" | 12 | #include "../perf-sys.h" |
10 | 13 | ||
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 @@ | |||
9 | #include "../browser.h" | 9 | #include "../browser.h" |
10 | #include "../libslang.h" | 10 | #include "../libslang.h" |
11 | #include "config.h" | 11 | #include "config.h" |
12 | #include <linux/string.h> | ||
12 | #include <linux/zalloc.h> | 13 | #include <linux/zalloc.h> |
13 | 14 | ||
14 | #define SCRIPT_NAMELEN 128 | 15 | #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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include <stdio.h> | 2 | #include <stdio.h> |
3 | #include <string.h> | 3 | #include <string.h> |
4 | #include <linux/kernel.h> | ||
4 | 5 | ||
5 | #include "gtk.h" | 6 | #include "gtk.h" |
6 | #include "../ui.h" | 7 | #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 @@ | |||
3 | #include "../../util/debug.h" | 3 | #include "../../util/debug.h" |
4 | #include "gtk.h" | 4 | #include "gtk.h" |
5 | 5 | ||
6 | #include <stdlib.h> | ||
6 | #include <string.h> | 7 | #include <string.h> |
7 | #include <linux/zalloc.h> | 8 | #include <linux/zalloc.h> |
8 | 9 | ||
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 @@ | |||
3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
4 | #include <string.h> | 4 | #include <string.h> |
5 | #include <pthread.h> | 5 | #include <pthread.h> |
6 | #include <linux/kernel.h> | ||
6 | 7 | ||
7 | #include "../../util/debug.h" | 8 | #include "../../util/debug.h" |
8 | #include "../helpline.h" | 9 | #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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include "util.h" | 2 | #include "util.h" |
3 | #include "../util/debug.h" | 3 | #include "../util/debug.h" |
4 | 4 | #include <stdio.h> | |
5 | 5 | ||
6 | /* | 6 | /* |
7 | * Default error logging functions | 7 | * 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 @@ | |||
13 | #include "bpf-prologue.h" | 13 | #include "bpf-prologue.h" |
14 | #include "probe-finder.h" | 14 | #include "probe-finder.h" |
15 | #include <errno.h> | 15 | #include <errno.h> |
16 | #include <stdlib.h> | ||
16 | #include <dwarf-regs.h> | 17 | #include <dwarf-regs.h> |
17 | #include <linux/filter.h> | 18 | #include <linux/filter.h> |
18 | 19 | ||
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 @@ | |||
1 | #include "util/util.h" | 1 | #include "util/util.h" |
2 | #include "util/debug.h" | 2 | #include "util/debug.h" |
3 | #include "util/branch.h" | 3 | #include "util/branch.h" |
4 | #include <linux/kernel.h> | ||
4 | 5 | ||
5 | static bool cross_area(u64 addr1, u64 addr2, int size) | 6 | static bool cross_area(u64 addr1, u64 addr2, int size) |
6 | { | 7 | { |
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 @@ | |||
16 | #include <stdbool.h> | 16 | #include <stdbool.h> |
17 | #include <errno.h> | 17 | #include <errno.h> |
18 | #include <math.h> | 18 | #include <math.h> |
19 | #include <linux/string.h> | ||
19 | #include <linux/zalloc.h> | 20 | #include <linux/zalloc.h> |
20 | 21 | ||
21 | #include "asm/bug.h" | 22 | #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 @@ | |||
4 | #include "util.h" | 4 | #include "util.h" |
5 | #include "../perf-sys.h" | 5 | #include "../perf-sys.h" |
6 | #include "cloexec.h" | 6 | #include "cloexec.h" |
7 | #include "event.h" | ||
7 | #include "asm/bug.h" | 8 | #include "asm/bug.h" |
8 | #include "debug.h" | 9 | #include "debug.h" |
9 | #include <unistd.h> | 10 | #include <unistd.h> |
10 | #include <sys/syscall.h> | 11 | #include <sys/syscall.h> |
12 | #include <linux/string.h> | ||
11 | 13 | ||
12 | static unsigned long flag = PERF_FLAG_FD_CLOEXEC; | 14 | static unsigned long flag = PERF_FLAG_FD_CLOEXEC; |
13 | 15 | ||
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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include <linux/compiler.h> | 2 | #include <linux/compiler.h> |
3 | #include <linux/kernel.h> | 3 | #include <linux/kernel.h> |
4 | #include <linux/string.h> | ||
4 | #include <linux/zalloc.h> | 5 | #include <linux/zalloc.h> |
5 | #include <sys/types.h> | 6 | #include <sys/types.h> |
6 | #include <sys/stat.h> | 7 | #include <sys/stat.h> |
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 @@ | |||
19 | #include "print_binary.h" | 19 | #include "print_binary.h" |
20 | #include "util.h" | 20 | #include "util.h" |
21 | #include "target.h" | 21 | #include "target.h" |
22 | #include "ui/helpline.h" | ||
22 | 23 | ||
23 | #include <linux/ctype.h> | 24 | #include <linux/ctype.h> |
24 | 25 | ||
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 @@ | |||
4 | #define __PERF_DEBUG_H | 4 | #define __PERF_DEBUG_H |
5 | 5 | ||
6 | #include <stdbool.h> | 6 | #include <stdbool.h> |
7 | #include <string.h> | ||
8 | #include <linux/compiler.h> | 7 | #include <linux/compiler.h> |
9 | #include "event.h" | ||
10 | #include "../ui/helpline.h" | ||
11 | #include "../ui/progress.h" | ||
12 | #include "../ui/util.h" | 8 | #include "../ui/util.h" |
13 | 9 | ||
14 | extern int verbose; | 10 | extern int verbose; |
@@ -42,6 +38,8 @@ extern int debug_data_convert; | |||
42 | 38 | ||
43 | #define STRERR_BUFSIZE 128 /* For the buffer size of str_error_r */ | 39 | #define STRERR_BUFSIZE 128 /* For the buffer size of str_error_r */ |
44 | 40 | ||
41 | union perf_event; | ||
42 | |||
45 | int dump_printf(const char *fmt, ...) __printf(1, 2); | 43 | int dump_printf(const char *fmt, ...) __printf(1, 2); |
46 | void trace_event(union perf_event *event); | 44 | void trace_event(union perf_event *event); |
47 | 45 | ||
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 @@ | |||
9 | #include <stdlib.h> | 9 | #include <stdlib.h> |
10 | #include "debug.h" | 10 | #include "debug.h" |
11 | #include "dwarf-aux.h" | 11 | #include "dwarf-aux.h" |
12 | #include "strbuf.h" | ||
12 | #include "string2.h" | 13 | #include "string2.h" |
13 | 14 | ||
14 | /** | 15 | /** |
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 @@ | |||
10 | #include <elfutils/libdwfl.h> | 10 | #include <elfutils/libdwfl.h> |
11 | #include <elfutils/version.h> | 11 | #include <elfutils/version.h> |
12 | 12 | ||
13 | struct strbuf; | ||
14 | |||
13 | /* Find the realpath of the target file */ | 15 | /* Find the realpath of the target file */ |
14 | const char *cu_find_realpath(Dwarf_Die *cu_die, const char *fname); | 16 | const char *cu_find_realpath(Dwarf_Die *cu_die, const char *fname); |
15 | 17 | ||
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 @@ | |||
9 | #include <sys/utsname.h> | 9 | #include <sys/utsname.h> |
10 | #include <bpf/libbpf.h> | 10 | #include <bpf/libbpf.h> |
11 | #include <stdlib.h> | 11 | #include <stdlib.h> |
12 | #include <string.h> | ||
12 | 13 | ||
13 | struct perf_env perf_env; | 14 | struct perf_env perf_env; |
14 | 15 | ||
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 @@ | |||
35 | #include <linux/hash.h> | 35 | #include <linux/hash.h> |
36 | #include <linux/log2.h> | 36 | #include <linux/log2.h> |
37 | #include <linux/err.h> | 37 | #include <linux/err.h> |
38 | #include <linux/string.h> | ||
38 | #include <linux/zalloc.h> | 39 | #include <linux/zalloc.h> |
39 | #include <perf/evlist.h> | 40 | #include <perf/evlist.h> |
40 | #include <perf/evsel.h> | 41 | #include <perf/evsel.h> |
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 @@ | |||
2 | %{ | 2 | %{ |
3 | #include "util.h" | 3 | #include "util.h" |
4 | #include "util/debug.h" | 4 | #include "util/debug.h" |
5 | #include <stdlib.h> // strtod() | ||
5 | #define IN_EXPR_Y 1 | 6 | #define IN_EXPR_Y 1 |
6 | #include "expr.h" | 7 | #include "expr.h" |
7 | #include "smt.h" | 8 | #include "smt.h" |
9 | #include <assert.h> | ||
8 | #include <string.h> | 10 | #include <string.h> |
9 | 11 | ||
10 | #define MAXIDLEN 256 | 12 | #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 @@ | |||
19 | #include <math.h> | 19 | #include <math.h> |
20 | #include <inttypes.h> | 20 | #include <inttypes.h> |
21 | #include <sys/param.h> | 21 | #include <sys/param.h> |
22 | #include <linux/string.h> | ||
22 | #include <linux/time64.h> | 23 | #include <linux/time64.h> |
23 | #include <linux/zalloc.h> | 24 | #include <linux/zalloc.h> |
24 | 25 | ||
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 @@ | |||
9 | #include <stdbool.h> | 9 | #include <stdbool.h> |
10 | #include <errno.h> | 10 | #include <errno.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/string.h> | ||
12 | #include <linux/types.h> | 13 | #include <linux/types.h> |
13 | #include <linux/zalloc.h> | 14 | #include <linux/zalloc.h> |
14 | 15 | ||
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 @@ | |||
9 | #include <stdio.h> | 9 | #include <stdio.h> |
10 | #include <stdlib.h> | 10 | #include <stdlib.h> |
11 | #include <linux/err.h> | 11 | #include <linux/err.h> |
12 | #include <linux/string.h> | ||
12 | #include <linux/zalloc.h> | 13 | #include <linux/zalloc.h> |
13 | #include "debug.h" | 14 | #include "debug.h" |
14 | #include "llvm-utils.h" | 15 | #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 @@ | |||
9 | #include "compress.h" | 9 | #include "compress.h" |
10 | #include "util.h" | 10 | #include "util.h" |
11 | #include "debug.h" | 11 | #include "debug.h" |
12 | #include <string.h> | ||
12 | #include <unistd.h> | 13 | #include <unistd.h> |
13 | 14 | ||
14 | #define BUFSIZE 8192 | 15 | #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 @@ | |||
30 | #include <linux/ctype.h> | 30 | #include <linux/ctype.h> |
31 | #include <symbol/kallsyms.h> | 31 | #include <symbol/kallsyms.h> |
32 | #include <linux/mman.h> | 32 | #include <linux/mman.h> |
33 | #include <linux/string.h> | ||
33 | #include <linux/zalloc.h> | 34 | #include <linux/zalloc.h> |
34 | 35 | ||
35 | static void __machine__remove_thread(struct machine *machine, struct thread *th, bool lock); | 36 | 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 @@ | |||
20 | #include "namespaces.h" | 20 | #include "namespaces.h" |
21 | #include "unwind.h" | 21 | #include "unwind.h" |
22 | #include "srccode.h" | 22 | #include "srccode.h" |
23 | #include "ui/ui.h" | ||
23 | 24 | ||
24 | static void __maps__insert(struct maps *maps, struct map *map); | 25 | static void __maps__insert(struct maps *maps, struct map *map); |
25 | static void __maps__insert_name(struct maps *maps, struct map *map); | 26 | 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 @@ | |||
8 | #include "session.h" | 8 | #include "session.h" |
9 | #include "asm/bug.h" | 9 | #include "asm/bug.h" |
10 | #include "debug.h" | 10 | #include "debug.h" |
11 | #include "ui/progress.h" | ||
11 | 12 | ||
12 | #define pr_N(n, fmt, ...) \ | 13 | #define pr_N(n, fmt, ...) \ |
13 | eprintf(n, debug_ordered_events, fmt, ##__VA_ARGS__) | 14 | 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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include "util/debug.h" | 2 | #include "util/debug.h" |
3 | #include "util/event.h" | ||
3 | #include <subcmd/parse-options.h> | 4 | #include <subcmd/parse-options.h> |
4 | #include "util/parse-branch-options.h" | 5 | #include "util/parse-branch-options.h" |
5 | #include <stdlib.h> | 6 | #include <stdlib.h> |
7 | #include <string.h> | ||
6 | 8 | ||
7 | #define BRANCH_OPT(n, m) \ | 9 | #define BRANCH_OPT(n, m) \ |
8 | { .name = n, .mode = (m) } | 10 | { .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 @@ | |||
8 | 8 | ||
9 | #include <errno.h> | 9 | #include <errno.h> |
10 | #include <stdlib.h> | 10 | #include <stdlib.h> |
11 | #include <string.h> | ||
11 | #include <setjmp.h> | 12 | #include <setjmp.h> |
12 | #include <linux/err.h> | 13 | #include <linux/err.h> |
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
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 @@ | |||
24 | #include "dso.h" | 24 | #include "dso.h" |
25 | #include "debug.h" | 25 | #include "debug.h" |
26 | #include "intlist.h" | 26 | #include "intlist.h" |
27 | #include "strbuf.h" | ||
27 | #include "strlist.h" | 28 | #include "strlist.h" |
28 | #include "symbol.h" | 29 | #include "symbol.h" |
29 | #include "probe-finder.h" | 30 | #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 @@ | |||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/zalloc.h> | 11 | #include <linux/zalloc.h> |
12 | #include <stdlib.h> | 12 | #include <stdlib.h> |
13 | #include <string.h> | ||
13 | 14 | ||
14 | struct pstack { | 15 | struct pstack { |
15 | unsigned short top; | 16 | 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 @@ | |||
22 | #include "annotate.h" | 22 | #include "annotate.h" |
23 | #include "time-utils.h" | 23 | #include "time-utils.h" |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/string.h> | ||
25 | 26 | ||
26 | regex_t parent_regex; | 27 | regex_t parent_regex; |
27 | const char default_parent_pattern[] = "^sys_|^do_page_fault"; | 28 | 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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include "cache.h" | ||
2 | #include "debug.h" | 3 | #include "debug.h" |
4 | #include "strbuf.h" | ||
3 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/string.h> | ||
4 | #include <linux/zalloc.h> | 7 | #include <linux/zalloc.h> |
5 | #include <errno.h> | 8 | #include <errno.h> |
9 | #include <stdio.h> | ||
6 | #include <stdlib.h> | 10 | #include <stdlib.h> |
7 | #include <unistd.h> | 11 | #include <unistd.h> |
8 | 12 | ||
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 @@ | |||
7 | #include <linux/capability.h> | 7 | #include <linux/capability.h> |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/mman.h> | 9 | #include <linux/mman.h> |
10 | #include <linux/string.h> | ||
10 | #include <linux/time64.h> | 11 | #include <linux/time64.h> |
11 | #include <sys/types.h> | 12 | #include <sys/types.h> |
12 | #include <sys/stat.h> | 13 | #include <sys/stat.h> |
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 @@ | |||
10 | #include "debug.h" | 10 | #include "debug.h" |
11 | 11 | ||
12 | #include <pwd.h> | 12 | #include <pwd.h> |
13 | #include <stdio.h> | ||
13 | #include <stdlib.h> | 14 | #include <stdlib.h> |
14 | #include <string.h> | 15 | #include <string.h> |
16 | #include <linux/kernel.h> | ||
17 | #include <linux/string.h> | ||
15 | 18 | ||
16 | enum target_errno target__validate(struct target *target) | 19 | enum target_errno target__validate(struct target *target) |
17 | { | 20 | { |
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 @@ | |||
10 | #include <linux/zalloc.h> | 10 | #include <linux/zalloc.h> |
11 | #include <errno.h> | 11 | #include <errno.h> |
12 | #include <stdlib.h> | 12 | #include <stdlib.h> |
13 | #include <string.h> | ||
13 | #include "thread.h" | 14 | #include "thread.h" |
14 | #include "event.h" | 15 | #include "event.h" |
15 | #include "machine.h" | 16 | #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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include "util.h" | 2 | #include "util.h" |
3 | #include "debug.h" | 3 | #include "debug.h" |
4 | #include "event.h" | ||
4 | #include "namespaces.h" | 5 | #include "namespaces.h" |
5 | #include <api/fs/fs.h> | 6 | #include <api/fs/fs.h> |
6 | #include <sys/mman.h> | 7 | #include <sys/mman.h> |
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 @@ | |||
2 | #include <inttypes.h> | 2 | #include <inttypes.h> |
3 | #include <stdio.h> | 3 | #include <stdio.h> |
4 | #include <stdlib.h> | 4 | #include <stdlib.h> |
5 | #include <string.h> | ||
5 | #include <errno.h> | 6 | #include <errno.h> |
6 | #include <linux/zalloc.h> | 7 | #include <linux/zalloc.h> |
7 | 8 | ||
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 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include <fcntl.h> | 2 | #include <fcntl.h> |
3 | #include <stdio.h> | 3 | #include <stdio.h> |
4 | #include <string.h> | ||
4 | #include <unistd.h> | 5 | #include <unistd.h> |
5 | #include <sys/stat.h> | 6 | #include <sys/stat.h> |
6 | #include <sys/mman.h> | 7 | #include <sys/mman.h> |