From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>,
Borislav Petkov <bp@alien8.de>, David Ahern <dsahern@gmail.com>,
David Howells <dhowells@redhat.com>,
Dong Hao <haodong@linux.vnet.ibm.com>,
Josh Boyer <jwboyer@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Namhyung Kim <namhyung@gmail.com>,
Paul Mackerras <paulus@samba.org>,
Runzhen Wang <runzhen@linux.vnet.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-arch@vger.kernel.org, x86@kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 8/8] perf kvm: Fix building perf kvm on non x86 arches
Date: Fri, 23 Nov 2012 21:20:53 -0300 [thread overview]
Message-ID: <1353716453-9693-9-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1353716453-9693-1-git-send-email-acme@infradead.org>
From: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Now, 'perf kvm stat' is only supported on x86, let its code depend on
(__x86_64__ || __i386__) to fix building it on other architectures.
Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Dong Hao <haodong@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Josh Boyer <jwboyer@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Runzhen Wang <runzhen@linux.vnet.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: x86@kernel.org
Link: http://lkml.kernel.org/r/50A9EB89.70901@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-kvm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 9fa45fa..283b439 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -22,6 +22,7 @@
#include <pthread.h>
#include <math.h>
+#if defined(__i386__) || defined(__x86_64__)
#include <asm/svm.h>
#include <asm/vmx.h>
#include <asm/kvm.h>
@@ -896,6 +897,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)
{
@@ -1018,8 +1020,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);
+#if defined(__i386__) || defined(__x86_64__)
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.9.2.358.g22243
next prev parent reply other threads:[~2012-11-24 0:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-24 0:20 [GIT PULL 0/8] perf/urgent fixes Arnaldo Carvalho de Melo
2012-11-24 0:20 ` [PATCH 7/8] perf kvm: Rename perf_kvm to perf_kvm_stat Arnaldo Carvalho de Melo
2012-11-24 0:20 ` Arnaldo Carvalho de Melo
2012-11-24 0:20 ` Arnaldo Carvalho de Melo [this message]
2012-11-24 0:20 ` [PATCH 8/8] perf kvm: Fix building perf kvm on non x86 arches Arnaldo Carvalho de Melo
2012-11-28 20:27 ` [GIT PULL 0/8] perf/urgent fixes Josh Boyer
2012-11-28 20:27 ` Josh Boyer
2012-12-01 11:05 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1353716453-9693-9-git-send-email-acme@infradead.org \
--to=acme@infradead.org \
--cc=acme@redhat.com \
--cc=bp@alien8.de \
--cc=dhowells@redhat.com \
--cc=dsahern@gmail.com \
--cc=haodong@linux.vnet.ibm.com \
--cc=jwboyer@gmail.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@gmail.com \
--cc=paulus@samba.org \
--cc=runzhen@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
--cc=xiaoguangrong@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).