diff options
author | Xiao Guangrong <[email protected]> | 2012-11-19 16:19:21 +0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2012-11-23 20:40:17 -0300 |
commit | 7321090f6751c9987c26a8c81c63680d16a614d7 (patch) | |
tree | 27a52ff8c74ec62f604f72e68255df884ec5c112 | |
parent | 3786063a3c0ba26a2400a04476c0c0ccfd3c6beb (diff) |
perf kvm: Fix building perf kvm on non x86 arches
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 <[email protected]>
Signed-off-by: Xiao Guangrong <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Ahern <[email protected]>
Cc: David Howells <[email protected]>
Cc: Dong Hao <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Josh Boyer <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Runzhen Wang <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/builtin-kvm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 9fa45fa13bd6..283b4397e397 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); |