perf kvm stat: Replace kvm-stat.h includes with forward declarations
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 29 Jan 2019 11:42:55 +0000 (12:42 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 6 Feb 2019 13:00:39 +0000 (10:00 -0300)
To reduce the include header dependency tree and speed up perf builds.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-dngwaxuhfnhksawgdpo6e74n@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/powerpc/util/kvm-stat.c
tools/perf/arch/s390/util/kvm-stat.c
tools/perf/arch/x86/util/kvm-stat.c
tools/perf/util/kvm-stat.h

index 596ad6aedaace816c0f7b37db55ae8ec7b5eef0f..86e64c47d8eaff13616ecec921fabf24431001c7 100644 (file)
@@ -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"
index aaabab5e28300d4120cdbf44c29c7d7b61563603..7e3961a4b292c8f1d217f26fd28f85bfcdd17079 100644 (file)
@@ -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);
index 081353d7b095c873c23d973732e2c363da9c4835..865a9762f22ef78edfa3dd09c63a3c929b2eae35 100644 (file)
@@ -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>
index 7b1f06567521708158b3daaad9a9d5d32ed6a4c2..1403dec189b4ee24076485844118b0a947327195 100644 (file)
@@ -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;