diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-17 10:39:06 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-19 12:01:44 -0400 |
commit | 877a7a11050ee4d465364c57f8fbf78f6b1a2559 (patch) | |
tree | 26997a41ae82b4404b5b2e9730f8ffcfae367f6e | |
parent | 8607c1ee734d12f62c6a46abef13a510e25a1839 (diff) |
perf tools: Add include <linux/kernel.h> where ARRAY_SIZE() is used
To pave the way for further cleanups where linux/kernel.h may stop being
included in some header.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-qqxan6tfsl6qx3l0v3nwgjvk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
42 files changed, 42 insertions, 1 deletions
diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c index 1fe43bd5a012..27ebd50ee619 100644 --- a/tools/perf/bench/numa.c +++ b/tools/perf/bench/numa.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <sys/wait.h> | 30 | #include <sys/wait.h> |
31 | #include <sys/prctl.h> | 31 | #include <sys/prctl.h> |
32 | #include <sys/types.h> | 32 | #include <sys/types.h> |
33 | #include <linux/kernel.h> | ||
33 | #include <linux/time64.h> | 34 | #include <linux/time64.h> |
34 | 35 | ||
35 | #include <numa.h> | 36 | #include <numa.h> |
diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c index 9730fd409f3b..1f18385907f5 100644 --- a/tools/perf/builtin-help.c +++ b/tools/perf/builtin-help.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <subcmd/run-command.h> | 12 | #include <subcmd/run-command.h> |
13 | #include <subcmd/help.h> | 13 | #include <subcmd/help.h> |
14 | #include "util/debug.h" | 14 | #include "util/debug.h" |
15 | #include <linux/kernel.h> | ||
15 | 16 | ||
16 | static struct man_viewer_list { | 17 | static struct man_viewer_list { |
17 | struct man_viewer_list *next; | 18 | struct man_viewer_list *next; |
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c index 515587825af4..8f0b94563936 100644 --- a/tools/perf/builtin-kmem.c +++ b/tools/perf/builtin-kmem.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include "util/debug.h" | 21 | #include "util/debug.h" |
22 | 22 | ||
23 | #include <linux/kernel.h> | ||
23 | #include <linux/rbtree.h> | 24 | #include <linux/rbtree.h> |
24 | #include <linux/string.h> | 25 | #include <linux/string.h> |
25 | #include <locale.h> | 26 | #include <locale.h> |
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 38b409173693..a7d7f4c6052e 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <sys/timerfd.h> | 24 | #include <sys/timerfd.h> |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #include <linux/kernel.h> | ||
27 | #include <linux/time64.h> | 28 | #include <linux/time64.h> |
28 | #include <termios.h> | 29 | #include <termios.h> |
29 | #include <semaphore.h> | 30 | #include <semaphore.h> |
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c index b686fb6759da..f74dd869f88b 100644 --- a/tools/perf/builtin-lock.c +++ b/tools/perf/builtin-lock.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/list.h> | 27 | #include <linux/list.h> |
28 | #include <linux/hash.h> | 28 | #include <linux/hash.h> |
29 | #include <linux/kernel.h> | ||
29 | 30 | ||
30 | static struct perf_session *session; | 31 | static struct perf_session *session; |
31 | 32 | ||
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 79833e226789..5cd60882c8d9 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include "util/debug.h" | 23 | #include "util/debug.h" |
24 | 24 | ||
25 | #include <linux/kernel.h> | ||
25 | #include <linux/log2.h> | 26 | #include <linux/log2.h> |
26 | #include <sys/prctl.h> | 27 | #include <sys/prctl.h> |
27 | #include <sys/resource.h> | 28 | #include <sys/resource.h> |
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 2dab70fba2ba..36b076653d16 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "util/thread-stack.h" | 24 | #include "util/thread-stack.h" |
25 | #include "util/time-utils.h" | 25 | #include "util/time-utils.h" |
26 | #include <linux/bitmap.h> | 26 | #include <linux/bitmap.h> |
27 | #include <linux/kernel.h> | ||
27 | #include <linux/stringify.h> | 28 | #include <linux/stringify.h> |
28 | #include <linux/time64.h> | 29 | #include <linux/time64.h> |
29 | #include "asm/bug.h" | 30 | #include "asm/bug.h" |
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index fafdb44b8bcb..822c8d39ca1d 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "util/cache.h" | 23 | #include "util/cache.h" |
24 | #include "util/evlist.h" | 24 | #include "util/evlist.h" |
25 | #include "util/evsel.h" | 25 | #include "util/evsel.h" |
26 | #include <linux/kernel.h> | ||
26 | #include <linux/rbtree.h> | 27 | #include <linux/rbtree.h> |
27 | #include <linux/time64.h> | 28 | #include <linux/time64.h> |
28 | #include "util/symbol.h" | 29 | #include "util/symbol.h" |
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index fce278d5fada..2792ed1fae43 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/err.h> | 45 | #include <linux/err.h> |
46 | #include <linux/filter.h> | 46 | #include <linux/filter.h> |
47 | #include <linux/audit.h> | 47 | #include <linux/audit.h> |
48 | #include <linux/kernel.h> | ||
48 | #include <linux/random.h> | 49 | #include <linux/random.h> |
49 | #include <linux/stringify.h> | 50 | #include <linux/stringify.h> |
50 | #include <linux/time64.h> | 51 | #include <linux/time64.h> |
diff --git a/tools/perf/perf.c b/tools/perf/perf.c index 9dc346f2b255..07ee1352f4ed 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <pthread.h> | 22 | #include <pthread.h> |
23 | #include <stdlib.h> | 23 | #include <stdlib.h> |
24 | #include <time.h> | 24 | #include <time.h> |
25 | #include <linux/kernel.h> | ||
25 | 26 | ||
26 | const char perf_usage_string[] = | 27 | const char perf_usage_string[] = |
27 | "perf [--version] [--help] [OPTIONS] COMMAND [ARGS]"; | 28 | "perf [--version] [--help] [OPTIONS] COMMAND [ARGS]"; |
diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c index 1a04fe77487d..67fe5eeff021 100644 --- a/tools/perf/tests/bpf.c +++ b/tools/perf/tests/bpf.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <util/evlist.h> | 5 | #include <util/evlist.h> |
6 | #include <linux/bpf.h> | 6 | #include <linux/bpf.h> |
7 | #include <linux/filter.h> | 7 | #include <linux/filter.h> |
8 | #include <linux/kernel.h> | ||
8 | #include <api/fs/fs.h> | 9 | #include <api/fs/fs.h> |
9 | #include <bpf/bpf.h> | 10 | #include <bpf/bpf.h> |
10 | #include "tests.h" | 11 | #include "tests.h" |
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index e6d7876c94c2..f029737ad255 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include "color.h" | 13 | #include "color.h" |
14 | #include <subcmd/parse-options.h> | 14 | #include <subcmd/parse-options.h> |
15 | #include "symbol.h" | 15 | #include "symbol.h" |
16 | #include <linux/kernel.h> | ||
16 | 17 | ||
17 | static bool dont_fork; | 18 | static bool dont_fork; |
18 | 19 | ||
diff --git a/tools/perf/tests/clang.c b/tools/perf/tests/clang.c index f853e242a86c..c5bb2203f5a9 100644 --- a/tools/perf/tests/clang.c +++ b/tools/perf/tests/clang.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include "debug.h" | 2 | #include "debug.h" |
3 | #include "util.h" | 3 | #include "util.h" |
4 | #include "c++/clang-c.h" | 4 | #include "c++/clang-c.h" |
5 | #include <linux/kernel.h> | ||
5 | 6 | ||
6 | static struct { | 7 | static struct { |
7 | int (*func)(void); | 8 | int (*func)(void); |
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c index d1f693041324..99dbd5ae294a 100644 --- a/tools/perf/tests/code-reading.c +++ b/tools/perf/tests/code-reading.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #include <linux/kernel.h> | ||
1 | #include <linux/types.h> | 2 | #include <linux/types.h> |
2 | #include <stdlib.h> | 3 | #include <stdlib.h> |
3 | #include <unistd.h> | 4 | #include <unistd.h> |
diff --git a/tools/perf/tests/dso-data.c b/tools/perf/tests/dso-data.c index 13725e09ba22..46ea2e061b86 100644 --- a/tools/perf/tests/dso-data.c +++ b/tools/perf/tests/dso-data.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | #include <linux/kernel.h> | ||
2 | #include <linux/types.h> | 3 | #include <linux/types.h> |
3 | #include <sys/stat.h> | 4 | #include <sys/stat.h> |
4 | #include <fcntl.h> | 5 | #include <fcntl.h> |
diff --git a/tools/perf/tests/evsel-roundtrip-name.c b/tools/perf/tests/evsel-roundtrip-name.c index 60926a1f6fd7..9221d2732cc4 100644 --- a/tools/perf/tests/evsel-roundtrip-name.c +++ b/tools/perf/tests/evsel-roundtrip-name.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include "parse-events.h" | 3 | #include "parse-events.h" |
4 | #include "tests.h" | 4 | #include "tests.h" |
5 | #include "debug.h" | 5 | #include "debug.h" |
6 | #include <linux/kernel.h> | ||
6 | 7 | ||
7 | static int perf_evsel__roundtrip_cache_name_test(void) | 8 | static int perf_evsel__roundtrip_cache_name_test(void) |
8 | { | 9 | { |
diff --git a/tools/perf/tests/hists_common.c b/tools/perf/tests/hists_common.c index 6b21746d6eec..f6c580e3ed84 100644 --- a/tools/perf/tests/hists_common.c +++ b/tools/perf/tests/hists_common.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "util/machine.h" | 7 | #include "util/machine.h" |
8 | #include "util/thread.h" | 8 | #include "util/thread.h" |
9 | #include "tests/hists_common.h" | 9 | #include "tests/hists_common.h" |
10 | #include <linux/kernel.h> | ||
10 | 11 | ||
11 | static struct { | 12 | static struct { |
12 | u32 pid; | 13 | u32 pid; |
diff --git a/tools/perf/tests/hists_cumulate.c b/tools/perf/tests/hists_cumulate.c index 9fd54b79a788..70918b986568 100644 --- a/tools/perf/tests/hists_cumulate.c +++ b/tools/perf/tests/hists_cumulate.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include "util/parse-events.h" | 9 | #include "util/parse-events.h" |
10 | #include "tests/tests.h" | 10 | #include "tests/tests.h" |
11 | #include "tests/hists_common.h" | 11 | #include "tests/hists_common.h" |
12 | #include <linux/kernel.h> | ||
12 | 13 | ||
13 | struct sample { | 14 | struct sample { |
14 | u32 pid; | 15 | u32 pid; |
diff --git a/tools/perf/tests/hists_filter.c b/tools/perf/tests/hists_filter.c index 62efb14f3a5a..f171b2da4899 100644 --- a/tools/perf/tests/hists_filter.c +++ b/tools/perf/tests/hists_filter.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include "util/parse-events.h" | 9 | #include "util/parse-events.h" |
10 | #include "tests/tests.h" | 10 | #include "tests/tests.h" |
11 | #include "tests/hists_common.h" | 11 | #include "tests/hists_common.h" |
12 | #include <linux/kernel.h> | ||
12 | 13 | ||
13 | struct sample { | 14 | struct sample { |
14 | u32 pid; | 15 | u32 pid; |
diff --git a/tools/perf/tests/hists_link.c b/tools/perf/tests/hists_link.c index eddc7407ff8a..1bd26d23c2fc 100644 --- a/tools/perf/tests/hists_link.c +++ b/tools/perf/tests/hists_link.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include "thread.h" | 9 | #include "thread.h" |
10 | #include "parse-events.h" | 10 | #include "parse-events.h" |
11 | #include "hists_common.h" | 11 | #include "hists_common.h" |
12 | #include <linux/kernel.h> | ||
12 | 13 | ||
13 | struct sample { | 14 | struct sample { |
14 | u32 pid; | 15 | u32 pid; |
diff --git a/tools/perf/tests/hists_output.c b/tools/perf/tests/hists_output.c index 63c5efaba1b5..cdf0dde5fe97 100644 --- a/tools/perf/tests/hists_output.c +++ b/tools/perf/tests/hists_output.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include "util/parse-events.h" | 9 | #include "util/parse-events.h" |
10 | #include "tests/tests.h" | 10 | #include "tests/tests.h" |
11 | #include "tests/hists_common.h" | 11 | #include "tests/hists_common.h" |
12 | #include <linux/kernel.h> | ||
12 | 13 | ||
13 | struct sample { | 14 | struct sample { |
14 | u32 cpu; | 15 | u32 cpu; |
diff --git a/tools/perf/tests/is_printable_array.c b/tools/perf/tests/is_printable_array.c index 42e13393e502..a008e5c2d980 100644 --- a/tools/perf/tests/is_printable_array.c +++ b/tools/perf/tests/is_printable_array.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/compiler.h> | 1 | #include <linux/compiler.h> |
2 | #include <linux/kernel.h> | ||
2 | #include "tests.h" | 3 | #include "tests.h" |
3 | #include "debug.h" | 4 | #include "debug.h" |
4 | #include "util.h" | 5 | #include "util.h" |
diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c index 634bce9caebd..a7cb80805993 100644 --- a/tools/perf/tests/mmap-basic.c +++ b/tools/perf/tests/mmap-basic.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "cpumap.h" | 7 | #include "cpumap.h" |
8 | #include "tests.h" | 8 | #include "tests.h" |
9 | #include <linux/err.h> | 9 | #include <linux/err.h> |
10 | #include <linux/kernel.h> | ||
10 | 11 | ||
11 | /* | 12 | /* |
12 | * This test will generate random numbers of calls to some getpid syscalls, | 13 | * This test will generate random numbers of calls to some getpid syscalls, |
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c index 1dc838014422..05621748aead 100644 --- a/tools/perf/tests/parse-events.c +++ b/tools/perf/tests/parse-events.c | |||
@@ -1,4 +1,3 @@ | |||
1 | |||
2 | #include "parse-events.h" | 1 | #include "parse-events.h" |
3 | #include "evsel.h" | 2 | #include "evsel.h" |
4 | #include "evlist.h" | 3 | #include "evlist.h" |
@@ -6,6 +5,7 @@ | |||
6 | #include "tests.h" | 5 | #include "tests.h" |
7 | #include "debug.h" | 6 | #include "debug.h" |
8 | #include "util.h" | 7 | #include "util.h" |
8 | #include <linux/kernel.h> | ||
9 | #include <linux/hw_breakpoint.h> | 9 | #include <linux/hw_breakpoint.h> |
10 | #include <api/fs/fs.h> | 10 | #include <api/fs/fs.h> |
11 | 11 | ||
diff --git a/tools/perf/tests/parse-no-sample-id-all.c b/tools/perf/tests/parse-no-sample-id-all.c index 65dcf48a92fb..c6207db09f12 100644 --- a/tools/perf/tests/parse-no-sample-id-all.c +++ b/tools/perf/tests/parse-no-sample-id-all.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #include <linux/kernel.h> | ||
1 | #include <linux/types.h> | 2 | #include <linux/types.h> |
2 | #include <stddef.h> | 3 | #include <stddef.h> |
3 | 4 | ||
diff --git a/tools/perf/tests/pmu.c b/tools/perf/tests/pmu.c index 1e2ba2602930..de6498dc4cbb 100644 --- a/tools/perf/tests/pmu.c +++ b/tools/perf/tests/pmu.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include "pmu.h" | 2 | #include "pmu.h" |
3 | #include "util.h" | 3 | #include "util.h" |
4 | #include "tests.h" | 4 | #include "tests.h" |
5 | #include <linux/kernel.h> | ||
5 | 6 | ||
6 | /* Simulated format definitions. */ | 7 | /* Simulated format definitions. */ |
7 | static struct test_format { | 8 | static struct test_format { |
diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c index 5f23710b9fee..73b5e47ef20b 100644 --- a/tools/perf/tests/sample-parsing.c +++ b/tools/perf/tests/sample-parsing.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <stdbool.h> | 1 | #include <stdbool.h> |
2 | #include <linux/kernel.h> | ||
2 | #include <linux/types.h> | 3 | #include <linux/types.h> |
3 | 4 | ||
4 | #include "util.h" | 5 | #include "util.h" |
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index ba36aac340bc..9adce112d255 100644 --- a/tools/perf/ui/browsers/annotate.c +++ b/tools/perf/ui/browsers/annotate.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include "../../util/evsel.h" | 10 | #include "../../util/evsel.h" |
11 | #include "../../util/config.h" | 11 | #include "../../util/config.h" |
12 | #include <pthread.h> | 12 | #include <pthread.h> |
13 | #include <linux/kernel.h> | ||
13 | 14 | ||
14 | struct disasm_line_samples { | 15 | struct disasm_line_samples { |
15 | double percent; | 16 | double percent; |
diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c index 4ea2ba861fc2..d9350a1da48b 100644 --- a/tools/perf/ui/tui/setup.c +++ b/tools/perf/ui/tui/setup.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <errno.h> | 1 | #include <errno.h> |
2 | #include <signal.h> | 2 | #include <signal.h> |
3 | #include <stdbool.h> | 3 | #include <stdbool.h> |
4 | #include <linux/kernel.h> | ||
4 | #ifdef HAVE_BACKTRACE_SUPPORT | 5 | #ifdef HAVE_BACKTRACE_SUPPORT |
5 | #include <execinfo.h> | 6 | #include <execinfo.h> |
6 | #endif | 7 | #endif |
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 30498a2d4a6f..45df4a38811a 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <regex.h> | 22 | #include <regex.h> |
23 | #include <pthread.h> | 23 | #include <pthread.h> |
24 | #include <linux/bitops.h> | 24 | #include <linux/bitops.h> |
25 | #include <linux/kernel.h> | ||
25 | #include <sys/utsname.h> | 26 | #include <sys/utsname.h> |
26 | 27 | ||
27 | const char *disassembler_style; | 28 | const char *disassembler_style; |
diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c index bc6bc7062eb4..27af9d62d899 100644 --- a/tools/perf/util/bpf-loader.c +++ b/tools/perf/util/bpf-loader.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <bpf/libbpf.h> | 9 | #include <bpf/libbpf.h> |
10 | #include <bpf/bpf.h> | 10 | #include <bpf/bpf.h> |
11 | #include <linux/err.h> | 11 | #include <linux/err.h> |
12 | #include <linux/kernel.h> | ||
12 | #include <linux/string.h> | 13 | #include <linux/string.h> |
13 | #include "perf.h" | 14 | #include "perf.h" |
14 | #include "debug.h" | 15 | #include "debug.h" |
diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c index 89ece2445713..b7917519f6cc 100644 --- a/tools/perf/util/data-convert-bt.c +++ b/tools/perf/util/data-convert-bt.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/compiler.h> | 10 | #include <linux/compiler.h> |
11 | #include <linux/kernel.h> | ||
11 | #include <babeltrace/ctf-writer/writer.h> | 12 | #include <babeltrace/ctf-writer/writer.h> |
12 | #include <babeltrace/ctf-writer/clock.h> | 13 | #include <babeltrace/ctf-writer/clock.h> |
13 | #include <babeltrace/ctf-writer/stream.h> | 14 | #include <babeltrace/ctf-writer/stream.h> |
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index 42db00d78573..385c82e12473 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <asm/bug.h> | 1 | #include <asm/bug.h> |
2 | #include <linux/kernel.h> | ||
2 | #include <sys/time.h> | 3 | #include <sys/time.h> |
3 | #include <sys/resource.h> | 4 | #include <sys/resource.h> |
4 | #include "symbol.h" | 5 | #include "symbol.h" |
diff --git a/tools/perf/util/dwarf-regs.c b/tools/perf/util/dwarf-regs.c index 62bc4a86a970..c708395b3cb6 100644 --- a/tools/perf/util/dwarf-regs.c +++ b/tools/perf/util/dwarf-regs.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <debug.h> | 8 | #include <debug.h> |
9 | #include <dwarf-regs.h> | 9 | #include <dwarf-regs.h> |
10 | #include <elf.h> | 10 | #include <elf.h> |
11 | #include <linux/kernel.h> | ||
11 | 12 | ||
12 | #ifndef EM_AARCH64 | 13 | #ifndef EM_AARCH64 |
13 | #define EM_AARCH64 183 /* ARM 64 bit */ | 14 | #define EM_AARCH64 183 /* ARM 64 bit */ |
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 4d7e65fa9d86..a0f59f69f46a 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #include <linux/kernel.h> | ||
1 | #include <linux/types.h> | 2 | #include <linux/types.h> |
2 | #include <uapi/linux/mman.h> /* To get things like MAP_HUGETLB even on older libc headers */ | 3 | #include <uapi/linux/mman.h> /* To get things like MAP_HUGETLB even on older libc headers */ |
3 | #include <api/fs/fs.h> | 4 | #include <api/fs/fs.h> |
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index 39942995f537..3fed4fb2e866 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __PERF_EVLIST_H | 1 | #ifndef __PERF_EVLIST_H |
2 | #define __PERF_EVLIST_H 1 | 2 | #define __PERF_EVLIST_H 1 |
3 | 3 | ||
4 | #include <linux/kernel.h> | ||
4 | #include <linux/refcount.h> | 5 | #include <linux/refcount.h> |
5 | #include <linux/list.h> | 6 | #include <linux/list.h> |
6 | #include <api/fd/array.h> | 7 | #include <api/fd/array.h> |
diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c index 1d4ab53c60ca..c56d52f90b54 100644 --- a/tools/perf/util/mem-events.c +++ b/tools/perf/util/mem-events.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <sys/stat.h> | 6 | #include <sys/stat.h> |
7 | #include <unistd.h> | 7 | #include <unistd.h> |
8 | #include <api/fs/fs.h> | 8 | #include <api/fs/fs.h> |
9 | #include <linux/kernel.h> | ||
9 | #include "mem-events.h" | 10 | #include "mem-events.h" |
10 | #include "debug.h" | 11 | #include "debug.h" |
11 | #include "symbol.h" | 12 | #include "symbol.h" |
diff --git a/tools/perf/util/perf-hooks.c b/tools/perf/util/perf-hooks.c index cb368306b12b..d55092964da2 100644 --- a/tools/perf/util/perf-hooks.c +++ b/tools/perf/util/perf-hooks.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <stdlib.h> | 9 | #include <stdlib.h> |
10 | #include <setjmp.h> | 10 | #include <setjmp.h> |
11 | #include <linux/err.h> | 11 | #include <linux/err.h> |
12 | #include <linux/kernel.h> | ||
12 | #include "util/util.h" | 13 | #include "util/util.h" |
13 | #include "util/debug.h" | 14 | #include "util/debug.h" |
14 | #include "util/perf-hooks.h" | 15 | #include "util/perf-hooks.h" |
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index 4bd758553450..1ffae42f76a1 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #include "thread.h" | 9 | #include "thread.h" |
10 | #include "data.h" | 10 | #include "data.h" |
11 | #include "ordered-events.h" | 11 | #include "ordered-events.h" |
12 | #include <linux/kernel.h> | ||
12 | #include <linux/rbtree.h> | 13 | #include <linux/rbtree.h> |
13 | #include <linux/perf_event.h> | 14 | #include <linux/perf_event.h> |
14 | 15 | ||
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 73f3ec1cf2a0..13b9af1d1b45 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "evlist.h" | 7 | #include "evlist.h" |
8 | #include <traceevent/event-parse.h> | 8 | #include <traceevent/event-parse.h> |
9 | #include "mem-events.h" | 9 | #include "mem-events.h" |
10 | #include <linux/kernel.h> | ||
10 | 11 | ||
11 | regex_t parent_regex; | 12 | regex_t parent_regex; |
12 | const char default_parent_pattern[] = "^sys_|^do_page_fault"; | 13 | const char default_parent_pattern[] = "^sys_|^do_page_fault"; |
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 9b4d8ba22fed..619e3eb44c50 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
4 | #include <stdio.h> | 4 | #include <stdio.h> |
5 | #include <string.h> | 5 | #include <string.h> |
6 | #include <linux/kernel.h> | ||
6 | #include <sys/types.h> | 7 | #include <sys/types.h> |
7 | #include <sys/stat.h> | 8 | #include <sys/stat.h> |
8 | #include <sys/param.h> | 9 | #include <sys/param.h> |
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c index dcdb87a5d0a1..e8ce6abc5321 100644 --- a/tools/perf/util/thread.c +++ b/tools/perf/util/thread.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <stdlib.h> | 2 | #include <stdlib.h> |
3 | #include <stdio.h> | 3 | #include <stdio.h> |
4 | #include <string.h> | 4 | #include <string.h> |
5 | #include <linux/kernel.h> | ||
5 | #include "session.h" | 6 | #include "session.h" |
6 | #include "thread.h" | 7 | #include "thread.h" |
7 | #include "thread-stack.h" | 8 | #include "thread-stack.h" |