Skip to contentSkip to conversation

perf kvm stat: Replace kvm-stat.h includes with forward declarations

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Feb 9, 2019 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  5691903a6f5223b162c0c56a03b04d46bf653ae4
Gitweb:     https://git.kernel.org/tip/5691903a6f5223b162c0c56a03b04d46bf653ae4
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Tue, 29 Jan 2019 12:42:55 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 6 Feb 2019 10:00:39 -0300

perf kvm stat: Replace kvm-stat.h includes with forward declarations

To reduce the include header dependency tree and speed up perf builds.

---
 tools/perf/arch/powerpc/util/kvm-stat.c | 1 +
 tools/perf/arch/s390/util/kvm-stat.c    | 1 +
 tools/perf/arch/x86/util/kvm-stat.c     | 1 +
 tools/perf/util/kvm-stat.h              | 7 ++++---
 4 files changed, 7 insertions(+), 3 deletions(-)
tools/perf/arch/powerpc/util/kvm-stat.c +1 -0
index 596ad6aedaac..86e64c47d8ea 100644
@@ -3,6 +3,7 @@
 #include "util/kvm-stat.h"
 #include "util/parse-events.h"
 #include "util/debug.h"
+#include "util/evsel.h"
 
 #include "book3s_hv_exits.h"
 #include "book3s_hcalls.h"
tools/perf/arch/s390/util/kvm-stat.c +1 -0
index aaabab5e2830..7e3961a4b292 100644
@@ -11,6 +11,7 @@
 
 #include <errno.h>
 #include "../../util/kvm-stat.h"
+#include "../../util/evsel.h"
 #include <asm/sie.h>
 
 define_exit_reasons_table(sie_exit_reasons, sie_intercept_code);
tools/perf/arch/x86/util/kvm-stat.c +1 -0
index 081353d7b095..865a9762f22e 100644
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <errno.h>
 #include "../../util/kvm-stat.h"
+#include "../../util/evsel.h"
 #include <asm/svm.h>
 #include <asm/vmx.h>
 #include <asm/kvm.h>
tools/perf/util/kvm-stat.h +4 -3
index 7b1f06567521..1403dec189b4 100644
@@ -3,12 +3,13 @@
 #define __PERF_KVM_STAT_H
 
 #include "../perf.h"
-#include "evsel.h"
-#include "evlist.h"
-#include "session.h"
 #include "tool.h"
 #include "stat.h"
 
+struct perf_evsel;
+struct perf_evlist;
+struct perf_session;
+
 struct event_key {
 	#define INVALID_KEY     (~0ULL)
 	u64 key;