Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+19 -5
+1
tools/perf/arch/arm/util/unwind-libdw.c
··· 1 1 #include <elfutils/libdwfl.h> 2 2 #include "../../util/unwind-libdw.h" 3 3 #include "../../util/perf_regs.h" 4 + #include "../../util/event.h" 4 5 5 6 bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg) 6 7 {
+1
tools/perf/arch/x86/util/unwind-libdw.c
··· 1 1 #include <elfutils/libdwfl.h> 2 2 #include "../../util/unwind-libdw.h" 3 3 #include "../../util/perf_regs.h" 4 + #include "../../util/event.h" 4 5 5 6 bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg) 6 7 {
+1
tools/perf/builtin-c2c.c
··· 32 32 #include <asm/bug.h> 33 33 #include "ui/browsers/hists.h" 34 34 #include "evlist.h" 35 + #include "thread.h" 35 36 36 37 struct c2c_hists { 37 38 struct hists hists;
+1
tools/perf/builtin-inject.c
··· 18 18 #include "util/data.h" 19 19 #include "util/auxtrace.h" 20 20 #include "util/jit.h" 21 + #include "util/thread.h" 21 22 22 23 #include <subcmd/parse-options.h> 23 24
+1
tools/perf/builtin-mem.c
··· 12 12 #include "util/data.h" 13 13 #include "util/mem-events.h" 14 14 #include "util/debug.h" 15 + #include "util/symbol.h" 15 16 16 17 #define MEM_OPERATION_LOAD 0x1 17 18 #define MEM_OPERATION_STORE 0x2
+1
tools/perf/builtin-timechart.c
··· 29 29 #include <linux/rbtree.h> 30 30 #include <linux/time64.h> 31 31 #include "util/symbol.h" 32 + #include "util/thread.h" 32 33 #include "util/callchain.h" 33 34 34 35 #include "perf.h"
+1
tools/perf/ui/browsers/hists.c
··· 14 14 #include "../../util/sort.h" 15 15 #include "../../util/util.h" 16 16 #include "../../util/top.h" 17 + #include "../../util/thread.h" 17 18 #include "../../arch/common.h" 18 19 19 20 #include "../browsers/hists.h"
+1
tools/perf/ui/stdio/hist.c
··· 6 6 #include "../../util/evsel.h" 7 7 #include "../../util/srcline.h" 8 8 #include "../../util/string2.h" 9 + #include "../../util/thread.h" 9 10 #include "../../util/sane_ctype.h" 10 11 11 12 static size_t callchain__fprintf_left_margin(FILE *fp, int left_margin)
+1
tools/perf/util/build-id.c
··· 15 15 #include "build-id.h" 16 16 #include "event.h" 17 17 #include "symbol.h" 18 + #include "thread.h" 18 19 #include <linux/kernel.h> 19 20 #include "debug.h" 20 21 #include "session.h"
+1
tools/perf/util/hist.c
··· 9 9 #include "evsel.h" 10 10 #include "annotate.h" 11 11 #include "srcline.h" 12 + #include "thread.h" 12 13 #include "ui/progress.h" 13 14 #include <errno.h> 14 15 #include <math.h>
+1
tools/perf/util/session.c
··· 19 19 #include "perf_regs.h" 20 20 #include "asm/bug.h" 21 21 #include "auxtrace.h" 22 + #include "thread.h" 22 23 #include "thread-stack.h" 23 24 #include "stat.h" 24 25
+1 -2
tools/perf/util/session.h
··· 5 5 #include "event.h" 6 6 #include "header.h" 7 7 #include "machine.h" 8 - #include "symbol.h" 9 - #include "thread.h" 10 8 #include "data.h" 11 9 #include "ordered-events.h" 12 10 #include <linux/kernel.h> ··· 12 14 #include <linux/perf_event.h> 13 15 14 16 struct ip_callchain; 17 + struct symbol; 15 18 struct thread; 16 19 17 20 struct auxtrace;
+1
tools/perf/util/sort.c
··· 6 6 #include "hist.h" 7 7 #include "comm.h" 8 8 #include "symbol.h" 9 + #include "thread.h" 9 10 #include "evsel.h" 10 11 #include "evlist.h" 11 12 #include "strlist.h"
+2 -1
tools/perf/util/sort.h
··· 21 21 #include "parse-events.h" 22 22 #include "hist.h" 23 23 #include "srcline.h" 24 - #include "thread.h" 24 + 25 + struct thread; 25 26 26 27 extern regex_t parent_regex; 27 28 extern const char *sort_order;
+4 -2
tools/perf/util/unwind-libdw.h
··· 2 2 #define __PERF_UNWIND_LIBDW_H 3 3 4 4 #include <elfutils/libdwfl.h> 5 - #include "event.h" 6 - #include "thread.h" 7 5 #include "unwind.h" 6 + 7 + struct machine; 8 + struct perf_sample; 9 + struct thread; 8 10 9 11 bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg); 10 12