diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-19 20:34:35 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-24 12:43:35 -0400 |
commit | e7ff8920e62f0188e77b1dc5dc5d9a7322c342d7 (patch) | |
tree | 92046f32304382568f4cbcea11629bdc0e3242d7 /tools/perf | |
parent | e8b3ae40151e94e30a82c2cf8efa5ab4f99c8abf (diff) |
perf tools: Use just forward declarations for struct thread where possible
Removing various instances of unnecessary includes, reducing the maze of
header dependencies.
Link: http://lkml.kernel.org/n/tip-hwu6eyuok9pc57alookyzmsf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/arch/arm/util/unwind-libdw.c | 1 | ||||
-rw-r--r-- | tools/perf/arch/x86/util/unwind-libdw.c | 1 | ||||
-rw-r--r-- | tools/perf/builtin-c2c.c | 1 | ||||
-rw-r--r-- | tools/perf/builtin-inject.c | 1 | ||||
-rw-r--r-- | tools/perf/builtin-mem.c | 1 | ||||
-rw-r--r-- | tools/perf/builtin-timechart.c | 1 | ||||
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 1 | ||||
-rw-r--r-- | tools/perf/ui/stdio/hist.c | 1 | ||||
-rw-r--r-- | tools/perf/util/build-id.c | 1 | ||||
-rw-r--r-- | tools/perf/util/hist.c | 1 | ||||
-rw-r--r-- | tools/perf/util/session.c | 1 | ||||
-rw-r--r-- | tools/perf/util/session.h | 3 | ||||
-rw-r--r-- | tools/perf/util/sort.c | 1 | ||||
-rw-r--r-- | tools/perf/util/sort.h | 3 | ||||
-rw-r--r-- | tools/perf/util/unwind-libdw.h | 6 |
15 files changed, 19 insertions, 5 deletions
diff --git a/tools/perf/arch/arm/util/unwind-libdw.c b/tools/perf/arch/arm/util/unwind-libdw.c index b4176c60117a..bacfa00fca39 100644 --- a/tools/perf/arch/arm/util/unwind-libdw.c +++ b/tools/perf/arch/arm/util/unwind-libdw.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <elfutils/libdwfl.h> | 1 | #include <elfutils/libdwfl.h> |
2 | #include "../../util/unwind-libdw.h" | 2 | #include "../../util/unwind-libdw.h" |
3 | #include "../../util/perf_regs.h" | 3 | #include "../../util/perf_regs.h" |
4 | #include "../../util/event.h" | ||
4 | 5 | ||
5 | bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg) | 6 | bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg) |
6 | { | 7 | { |
diff --git a/tools/perf/arch/x86/util/unwind-libdw.c b/tools/perf/arch/x86/util/unwind-libdw.c index c4b72176ca83..38dc9bb2a7c9 100644 --- a/tools/perf/arch/x86/util/unwind-libdw.c +++ b/tools/perf/arch/x86/util/unwind-libdw.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <elfutils/libdwfl.h> | 1 | #include <elfutils/libdwfl.h> |
2 | #include "../../util/unwind-libdw.h" | 2 | #include "../../util/unwind-libdw.h" |
3 | #include "../../util/perf_regs.h" | 3 | #include "../../util/perf_regs.h" |
4 | #include "../../util/event.h" | ||
4 | 5 | ||
5 | bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg) | 6 | bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg) |
6 | { | 7 | { |
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index a14be1cd3d70..e33b4acece90 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/bug.h> | 32 | #include <asm/bug.h> |
33 | #include "ui/browsers/hists.h" | 33 | #include "ui/browsers/hists.h" |
34 | #include "evlist.h" | 34 | #include "evlist.h" |
35 | #include "thread.h" | ||
35 | 36 | ||
36 | struct c2c_hists { | 37 | struct c2c_hists { |
37 | struct hists hists; | 38 | struct hists hists; |
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index 8bd791cca008..ea8db38eedd1 100644 --- a/tools/perf/builtin-inject.c +++ b/tools/perf/builtin-inject.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include "util/data.h" | 18 | #include "util/data.h" |
19 | #include "util/auxtrace.h" | 19 | #include "util/auxtrace.h" |
20 | #include "util/jit.h" | 20 | #include "util/jit.h" |
21 | #include "util/thread.h" | ||
21 | 22 | ||
22 | #include <subcmd/parse-options.h> | 23 | #include <subcmd/parse-options.h> |
23 | 24 | ||
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c index 2e5be1d63af6..e001c0290793 100644 --- a/tools/perf/builtin-mem.c +++ b/tools/perf/builtin-mem.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include "util/data.h" | 12 | #include "util/data.h" |
13 | #include "util/mem-events.h" | 13 | #include "util/mem-events.h" |
14 | #include "util/debug.h" | 14 | #include "util/debug.h" |
15 | #include "util/symbol.h" | ||
15 | 16 | ||
16 | #define MEM_OPERATION_LOAD 0x1 | 17 | #define MEM_OPERATION_LOAD 0x1 |
17 | #define MEM_OPERATION_STORE 0x2 | 18 | #define MEM_OPERATION_STORE 0x2 |
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 38e2c437b7b3..4e2e61695986 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/rbtree.h> | 29 | #include <linux/rbtree.h> |
30 | #include <linux/time64.h> | 30 | #include <linux/time64.h> |
31 | #include "util/symbol.h" | 31 | #include "util/symbol.h" |
32 | #include "util/thread.h" | ||
32 | #include "util/callchain.h" | 33 | #include "util/callchain.h" |
33 | 34 | ||
34 | #include "perf.h" | 35 | #include "perf.h" |
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index 1b12a69740b3..69f4570bd4f9 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include "../../util/sort.h" | 14 | #include "../../util/sort.h" |
15 | #include "../../util/util.h" | 15 | #include "../../util/util.h" |
16 | #include "../../util/top.h" | 16 | #include "../../util/top.h" |
17 | #include "../../util/thread.h" | ||
17 | #include "../../arch/common.h" | 18 | #include "../../arch/common.h" |
18 | 19 | ||
19 | #include "../browsers/hists.h" | 20 | #include "../browsers/hists.h" |
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c index 5565105c9688..42e432bd2eb4 100644 --- a/tools/perf/ui/stdio/hist.c +++ b/tools/perf/ui/stdio/hist.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include "../../util/evsel.h" | 6 | #include "../../util/evsel.h" |
7 | #include "../../util/srcline.h" | 7 | #include "../../util/srcline.h" |
8 | #include "../../util/string2.h" | 8 | #include "../../util/string2.h" |
9 | #include "../../util/thread.h" | ||
9 | #include "../../util/sane_ctype.h" | 10 | #include "../../util/sane_ctype.h" |
10 | 11 | ||
11 | static size_t callchain__fprintf_left_margin(FILE *fp, int left_margin) | 12 | static size_t callchain__fprintf_left_margin(FILE *fp, int left_margin) |
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c index 687b5add4bde..168cc49654e7 100644 --- a/tools/perf/util/build-id.c +++ b/tools/perf/util/build-id.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include "build-id.h" | 15 | #include "build-id.h" |
16 | #include "event.h" | 16 | #include "event.h" |
17 | #include "symbol.h" | 17 | #include "symbol.h" |
18 | #include "thread.h" | ||
18 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
19 | #include "debug.h" | 20 | #include "debug.h" |
20 | #include "session.h" | 21 | #include "session.h" |
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 2944458b9edf..cf0186a088c1 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include "evsel.h" | 9 | #include "evsel.h" |
10 | #include "annotate.h" | 10 | #include "annotate.h" |
11 | #include "srcline.h" | 11 | #include "srcline.h" |
12 | #include "thread.h" | ||
12 | #include "ui/progress.h" | 13 | #include "ui/progress.h" |
13 | #include <errno.h> | 14 | #include <errno.h> |
14 | #include <math.h> | 15 | #include <math.h> |
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 19d993f2a305..3041c6b98191 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include "perf_regs.h" | 19 | #include "perf_regs.h" |
20 | #include "asm/bug.h" | 20 | #include "asm/bug.h" |
21 | #include "auxtrace.h" | 21 | #include "auxtrace.h" |
22 | #include "thread.h" | ||
22 | #include "thread-stack.h" | 23 | #include "thread-stack.h" |
23 | #include "stat.h" | 24 | #include "stat.h" |
24 | 25 | ||
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index 1ffae42f76a1..47b5e7dbcb18 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h | |||
@@ -5,8 +5,6 @@ | |||
5 | #include "event.h" | 5 | #include "event.h" |
6 | #include "header.h" | 6 | #include "header.h" |
7 | #include "machine.h" | 7 | #include "machine.h" |
8 | #include "symbol.h" | ||
9 | #include "thread.h" | ||
10 | #include "data.h" | 8 | #include "data.h" |
11 | #include "ordered-events.h" | 9 | #include "ordered-events.h" |
12 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
@@ -14,6 +12,7 @@ | |||
14 | #include <linux/perf_event.h> | 12 | #include <linux/perf_event.h> |
15 | 13 | ||
16 | struct ip_callchain; | 14 | struct ip_callchain; |
15 | struct symbol; | ||
17 | struct thread; | 16 | struct thread; |
18 | 17 | ||
19 | struct auxtrace; | 18 | struct auxtrace; |
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index fe4fd7b5f8e0..5762ae4e9e91 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include "hist.h" | 6 | #include "hist.h" |
7 | #include "comm.h" | 7 | #include "comm.h" |
8 | #include "symbol.h" | 8 | #include "symbol.h" |
9 | #include "thread.h" | ||
9 | #include "evsel.h" | 10 | #include "evsel.h" |
10 | #include "evlist.h" | 11 | #include "evlist.h" |
11 | #include "strlist.h" | 12 | #include "strlist.h" |
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index 8bcec05ee578..b7c75597e18f 100644 --- a/tools/perf/util/sort.h +++ b/tools/perf/util/sort.h | |||
@@ -21,7 +21,8 @@ | |||
21 | #include "parse-events.h" | 21 | #include "parse-events.h" |
22 | #include "hist.h" | 22 | #include "hist.h" |
23 | #include "srcline.h" | 23 | #include "srcline.h" |
24 | #include "thread.h" | 24 | |
25 | struct thread; | ||
25 | 26 | ||
26 | extern regex_t parent_regex; | 27 | extern regex_t parent_regex; |
27 | extern const char *sort_order; | 28 | extern const char *sort_order; |
diff --git a/tools/perf/util/unwind-libdw.h b/tools/perf/util/unwind-libdw.h index 58328669ed16..4a2b269a7b3b 100644 --- a/tools/perf/util/unwind-libdw.h +++ b/tools/perf/util/unwind-libdw.h | |||
@@ -2,10 +2,12 @@ | |||
2 | #define __PERF_UNWIND_LIBDW_H | 2 | #define __PERF_UNWIND_LIBDW_H |
3 | 3 | ||
4 | #include <elfutils/libdwfl.h> | 4 | #include <elfutils/libdwfl.h> |
5 | #include "event.h" | ||
6 | #include "thread.h" | ||
7 | #include "unwind.h" | 5 | #include "unwind.h" |
8 | 6 | ||
7 | struct machine; | ||
8 | struct perf_sample; | ||
9 | struct thread; | ||
10 | |||
9 | bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg); | 11 | bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg); |
10 | 12 | ||
11 | struct unwind_info { | 13 | struct unwind_info { |