perf tools: Add Hygon Dhyana support
authorPu Wen <[email protected]>
Mon, 12 Nov 2018 07:40:51 +0000 (15:40 +0800)
committerArnaldo Carvalho de Melo <[email protected]>
Thu, 22 Nov 2018 01:39:56 +0000 (22:39 -0300)
The tool perf is useful for the performance analysis on the Hygon Dhyana
platform. But right now there is no Hygon support for it to analyze the
KVM guest os data. So add Hygon Dhyana support to it by checking vendor
string to share the code path of AMD.

Signed-off-by: Pu Wen <[email protected]>
Acked-by: Borislav Petkov <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/arch/x86/util/kvm-stat.c

index b32409a0e546dc9861dce978d1881ddc15b741b7..081353d7b095c873c23d973732e2c363da9c4835 100644 (file)
@@ -156,7 +156,7 @@ int cpu_isa_init(struct perf_kvm_stat *kvm, const char *cpuid)
        if (strstr(cpuid, "Intel")) {
                kvm->exit_reasons = vmx_exit_reasons;
                kvm->exit_reasons_isa = "VMX";
-       } else if (strstr(cpuid, "AMD")) {
+       } else if (strstr(cpuid, "AMD") || strstr(cpuid, "Hygon")) {
                kvm->exit_reasons = svm_exit_reasons;
                kvm->exit_reasons_isa = "SVM";
        } else