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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent e8b3ae40
#include <elfutils/libdwfl.h> #include <elfutils/libdwfl.h>
#include "../../util/unwind-libdw.h" #include "../../util/unwind-libdw.h"
#include "../../util/perf_regs.h" #include "../../util/perf_regs.h"
#include "../../util/event.h"
bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg) bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
{ {
......
#include <elfutils/libdwfl.h> #include <elfutils/libdwfl.h>
#include "../../util/unwind-libdw.h" #include "../../util/unwind-libdw.h"
#include "../../util/perf_regs.h" #include "../../util/perf_regs.h"
#include "../../util/event.h"
bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg) bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
{ {
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <asm/bug.h> #include <asm/bug.h>
#include "ui/browsers/hists.h" #include "ui/browsers/hists.h"
#include "evlist.h" #include "evlist.h"
#include "thread.h"
struct c2c_hists { struct c2c_hists {
struct hists hists; struct hists hists;
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "util/data.h" #include "util/data.h"
#include "util/auxtrace.h" #include "util/auxtrace.h"
#include "util/jit.h" #include "util/jit.h"
#include "util/thread.h"
#include <subcmd/parse-options.h> #include <subcmd/parse-options.h>
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "util/data.h" #include "util/data.h"
#include "util/mem-events.h" #include "util/mem-events.h"
#include "util/debug.h" #include "util/debug.h"
#include "util/symbol.h"
#define MEM_OPERATION_LOAD 0x1 #define MEM_OPERATION_LOAD 0x1
#define MEM_OPERATION_STORE 0x2 #define MEM_OPERATION_STORE 0x2
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <linux/rbtree.h> #include <linux/rbtree.h>
#include <linux/time64.h> #include <linux/time64.h>
#include "util/symbol.h" #include "util/symbol.h"
#include "util/thread.h"
#include "util/callchain.h" #include "util/callchain.h"
#include "perf.h" #include "perf.h"
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "../../util/sort.h" #include "../../util/sort.h"
#include "../../util/util.h" #include "../../util/util.h"
#include "../../util/top.h" #include "../../util/top.h"
#include "../../util/thread.h"
#include "../../arch/common.h" #include "../../arch/common.h"
#include "../browsers/hists.h" #include "../browsers/hists.h"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "../../util/evsel.h" #include "../../util/evsel.h"
#include "../../util/srcline.h" #include "../../util/srcline.h"
#include "../../util/string2.h" #include "../../util/string2.h"
#include "../../util/thread.h"
#include "../../util/sane_ctype.h" #include "../../util/sane_ctype.h"
static size_t callchain__fprintf_left_margin(FILE *fp, int left_margin) static size_t callchain__fprintf_left_margin(FILE *fp, int left_margin)
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "build-id.h" #include "build-id.h"
#include "event.h" #include "event.h"
#include "symbol.h" #include "symbol.h"
#include "thread.h"
#include <linux/kernel.h> #include <linux/kernel.h>
#include "debug.h" #include "debug.h"
#include "session.h" #include "session.h"
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "evsel.h" #include "evsel.h"
#include "annotate.h" #include "annotate.h"
#include "srcline.h" #include "srcline.h"
#include "thread.h"
#include "ui/progress.h" #include "ui/progress.h"
#include <errno.h> #include <errno.h>
#include <math.h> #include <math.h>
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "perf_regs.h" #include "perf_regs.h"
#include "asm/bug.h" #include "asm/bug.h"
#include "auxtrace.h" #include "auxtrace.h"
#include "thread.h"
#include "thread-stack.h" #include "thread-stack.h"
#include "stat.h" #include "stat.h"
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
#include "event.h" #include "event.h"
#include "header.h" #include "header.h"
#include "machine.h" #include "machine.h"
#include "symbol.h"
#include "thread.h"
#include "data.h" #include "data.h"
#include "ordered-events.h" #include "ordered-events.h"
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -14,6 +12,7 @@ ...@@ -14,6 +12,7 @@
#include <linux/perf_event.h> #include <linux/perf_event.h>
struct ip_callchain; struct ip_callchain;
struct symbol;
struct thread; struct thread;
struct auxtrace; struct auxtrace;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "hist.h" #include "hist.h"
#include "comm.h" #include "comm.h"
#include "symbol.h" #include "symbol.h"
#include "thread.h"
#include "evsel.h" #include "evsel.h"
#include "evlist.h" #include "evlist.h"
#include "strlist.h" #include "strlist.h"
......
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
#include "parse-events.h" #include "parse-events.h"
#include "hist.h" #include "hist.h"
#include "srcline.h" #include "srcline.h"
#include "thread.h"
struct thread;
extern regex_t parent_regex; extern regex_t parent_regex;
extern const char *sort_order; extern const char *sort_order;
......
...@@ -2,10 +2,12 @@ ...@@ -2,10 +2,12 @@
#define __PERF_UNWIND_LIBDW_H #define __PERF_UNWIND_LIBDW_H
#include <elfutils/libdwfl.h> #include <elfutils/libdwfl.h>
#include "event.h"
#include "thread.h"
#include "unwind.h" #include "unwind.h"
struct machine;
struct perf_sample;
struct thread;
bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg); bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg);
struct unwind_info { struct unwind_info {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment