[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50A48912.20606@linux.vnet.ibm.com>
Date: Thu, 15 Nov 2012 14:17:54 +0800
From: Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>
To: Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>
CC: Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Josh Boyer <jwboyer@...il.com>,
David Howells <dhowells@...hat.com>, mingo@...nel.org,
haodong@...ux.vnet.ibm.com, runzhen@...ux.vnet.ibm.com,
dsahern@...il.com, tglx@...utronix.de, bp@...en8.de,
namhyung@...il.com, torvalds@...ux-foundation.org,
paulus@...ba.org, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org, x86@...nel.org
Subject: [PATCH 2/2] perf kvm: fix building perf kvm on PowerPC
Now, 'perf kvm stat' is only supported on x86, let its code depend
on ARCH_X86 to fix building it on other architectures
Signed-off-by: Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>
---
tools/perf/arch/x86/Makefile | 2 ++
tools/perf/builtin-kvm.c | 4 ++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/tools/perf/arch/x86/Makefile b/tools/perf/arch/x86/Makefile
index 815841c..320fb95 100644
--- a/tools/perf/arch/x86/Makefile
+++ b/tools/perf/arch/x86/Makefile
@@ -1,3 +1,5 @@
+ARCH_CFLAGS += -DARCH_X86
+
ifndef NO_DWARF
PERF_HAVE_DWARF_REGS := 1
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 7fb426b..75e998a 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -22,6 +22,7 @@
#include <pthread.h>
#include <math.h>
+#ifdef ARCH_X86
#include "../../arch/x86/include/asm/svm.h"
#include "../../arch/x86/include/asm/vmx.h"
#include "../../arch/x86/include/asm/kvm.h"
@@ -913,6 +914,7 @@ static int kvm_cmd_stat(const char *file_name, int argc, const char **argv)
perf_stat:
return cmd_stat(argc, argv, NULL);
}
+#endif
static int __cmd_record(const char *file_name, int argc, const char **argv)
{
@@ -1035,8 +1037,10 @@ int cmd_kvm(int argc, const char **argv, const char *prefix __maybe_unused)
return cmd_top(argc, argv, NULL);
else if (!strncmp(argv[0], "buildid-list", 12))
return __cmd_buildid_list(file_name, argc, argv);
+#ifdef ARCH_X86
else if (!strncmp(argv[0], "stat", 4))
return kvm_cmd_stat(file_name, argc, argv);
+#endif
else
usage_with_options(kvm_usage, kvm_options);
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists