[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1541422268-5758-1-git-send-email-puwen@hygon.cn>
Date: Mon, 5 Nov 2018 20:51:08 +0800
From: Pu Wen <puwen@...on.cn>
To: <peterz@...radead.org>, <acme@...nel.org>,
<alexander.shishkin@...ux.intel.com>, <jolsa@...hat.com>,
<namhyung@...nel.org>, <mingo@...hat.com>, <bp@...en8.de>,
<linux-kernel@...r.kernel.org>
CC: Pu Wen <puwen@...on.cn>
Subject: [PATCH] tools/perf: Add Hygon Dhyana support
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 <puwen@...on.cn>
---
tools/perf/arch/x86/util/kvm-stat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/arch/x86/util/kvm-stat.c b/tools/perf/arch/x86/util/kvm-stat.c
index b32409a..081353d 100644
--- a/tools/perf/arch/x86/util/kvm-stat.c
+++ b/tools/perf/arch/x86/util/kvm-stat.c
@@ -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
--
2.7.4
Powered by blists - more mailing lists