aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2017-04-19 21:34:35 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-04-24 13:43:35 -0300
commite7ff8920e62f0188e77b1dc5dc5d9a7322c342d7 (patch)
tree92046f32304382568f4cbcea11629bdc0e3242d7 /tools/perf/util
parentperf tools: Add the right header to obtain PERF_ALIGN() (diff)
downloadlinux-dev-e7ff8920e62f0188e77b1dc5dc5d9a7322c342d7.tar.xz
linux-dev-e7ff8920e62f0188e77b1dc5dc5d9a7322c342d7.zip
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/util')
-rw-r--r--tools/perf/util/build-id.c1
-rw-r--r--tools/perf/util/hist.c1
-rw-r--r--tools/perf/util/session.c1
-rw-r--r--tools/perf/util/session.h3
-rw-r--r--tools/perf/util/sort.c1
-rw-r--r--tools/perf/util/sort.h3
-rw-r--r--tools/perf/util/unwind-libdw.h6
7 files changed, 11 insertions, 5 deletions
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 @@
#include "build-id.h"
#include "event.h"
#include "symbol.h"
+#include "thread.h"
#include <linux/kernel.h>
#include "debug.h"
#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 @@
#include "evsel.h"
#include "annotate.h"
#include "srcline.h"
+#include "thread.h"
#include "ui/progress.h"
#include <errno.h>
#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 @@
#include "perf_regs.h"
#include "asm/bug.h"
#include "auxtrace.h"
+#include "thread.h"
#include "thread-stack.h"
#include "stat.h"
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 @@
#include "event.h"
#include "header.h"
#include "machine.h"
-#include "symbol.h"
-#include "thread.h"
#include "data.h"
#include "ordered-events.h"
#include <linux/kernel.h>
@@ -14,6 +12,7 @@
#include <linux/perf_event.h>
struct ip_callchain;
+struct symbol;
struct thread;
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 @@
#include "hist.h"
#include "comm.h"
#include "symbol.h"
+#include "thread.h"
#include "evsel.h"
#include "evlist.h"
#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 @@
#include "parse-events.h"
#include "hist.h"
#include "srcline.h"
-#include "thread.h"
+
+struct thread;
extern regex_t parent_regex;
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 @@
#define __PERF_UNWIND_LIBDW_H
#include <elfutils/libdwfl.h>
-#include "event.h"
-#include "thread.h"
#include "unwind.h"
+struct machine;
+struct perf_sample;
+struct thread;
+
bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg);
struct unwind_info {