diff options
author | Alexander Yarygin <yarygin@linux.vnet.ibm.com> | 2014-07-03 09:59:49 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-07-07 15:55:23 -0400 |
commit | da50ad69723111e0292f1943dad77b41bb9a25b0 (patch) | |
tree | eb0f7455fb95de36a05f00fa9a2c9b99e60dd38e /tools/perf/builtin-kvm.c | |
parent | 1561880d7b114a65e307d1ac9a0991dc715355b3 (diff) |
perf kvm: Introduce HAVE_KVM_STAT_SUPPORT flag
kvm stat support is currently conditional on i386/x86_64. Let's abstract
this into a HAVE_KVM_STAT_SUPPORT flag, so that other architectures can
support kvm stat as well.
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1404395992-17095-2-git-send-email-yarygin@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-kvm.c')
-rw-r--r-- | tools/perf/builtin-kvm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 0f1e5a2f6ad7..214ec0e7492b 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <pthread.h> | 29 | #include <pthread.h> |
30 | #include <math.h> | 30 | #include <math.h> |
31 | 31 | ||
32 | #if defined(__i386__) || defined(__x86_64__) | 32 | #ifdef HAVE_KVM_STAT_SUPPORT |
33 | #include <asm/svm.h> | 33 | #include <asm/svm.h> |
34 | #include <asm/vmx.h> | 34 | #include <asm/vmx.h> |
35 | #include <asm/kvm.h> | 35 | #include <asm/kvm.h> |
@@ -1609,7 +1609,7 @@ static int kvm_cmd_stat(const char *file_name, int argc, const char **argv) | |||
1609 | perf_stat: | 1609 | perf_stat: |
1610 | return cmd_stat(argc, argv, NULL); | 1610 | return cmd_stat(argc, argv, NULL); |
1611 | } | 1611 | } |
1612 | #endif | 1612 | #endif /* HAVE_KVM_STAT_SUPPORT */ |
1613 | 1613 | ||
1614 | static int __cmd_record(const char *file_name, int argc, const char **argv) | 1614 | static int __cmd_record(const char *file_name, int argc, const char **argv) |
1615 | { | 1615 | { |
@@ -1726,7 +1726,7 @@ int cmd_kvm(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1726 | return cmd_top(argc, argv, NULL); | 1726 | return cmd_top(argc, argv, NULL); |
1727 | else if (!strncmp(argv[0], "buildid-list", 12)) | 1727 | else if (!strncmp(argv[0], "buildid-list", 12)) |
1728 | return __cmd_buildid_list(file_name, argc, argv); | 1728 | return __cmd_buildid_list(file_name, argc, argv); |
1729 | #if defined(__i386__) || defined(__x86_64__) | 1729 | #ifdef HAVE_KVM_STAT_SUPPORT |
1730 | else if (!strncmp(argv[0], "stat", 4)) | 1730 | else if (!strncmp(argv[0], "stat", 4)) |
1731 | return kvm_cmd_stat(file_name, argc, argv); | 1731 | return kvm_cmd_stat(file_name, argc, argv); |
1732 | #endif | 1732 | #endif |