LKML Archive on lore.kernel.org
 help / Atom feed
* [RFC PATCH RESEND] tools/perf: Add Hygon Dhyana support
@ 2018-11-12  7:40 Pu Wen
  2018-11-12 11:09 ` Borislav Petkov
  2018-11-22  7:12 ` [tip:perf/core] perf tools: " tip-bot for Pu Wen
  0 siblings, 2 replies; 4+ messages in thread
From: Pu Wen @ 2018-11-12  7:40 UTC (permalink / raw)
  To: peterz, mingo, acme, alexander.shishkin, jolsa, namhyung, tglx, bp
  Cc: linux-kernel, linux-perf-users, Pu Wen

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@hygon.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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH RESEND] tools/perf: Add Hygon Dhyana support
  2018-11-12  7:40 [RFC PATCH RESEND] tools/perf: Add Hygon Dhyana support Pu Wen
@ 2018-11-12 11:09 ` Borislav Petkov
  2018-11-12 16:30   ` Arnaldo Carvalho de Melo
  2018-11-22  7:12 ` [tip:perf/core] perf tools: " tip-bot for Pu Wen
  1 sibling, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2018-11-12 11:09 UTC (permalink / raw)
  To: Pu Wen, acme
  Cc: peterz, mingo, alexander.shishkin, jolsa, namhyung, tglx,
	linux-kernel, linux-perf-users

On Mon, Nov 12, 2018 at 03:40:51PM +0800, Pu Wen wrote:
> 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

acme, pls fix that to "OS" when applying. Thx.

> string to share the code path of AMD.
> 
> Signed-off-by: Pu Wen <puwen@hygon.cn>
> ---
>  tools/perf/arch/x86/util/kvm-stat.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Borislav Petkov <bp@suse.de>

> 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
> 

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH RESEND] tools/perf: Add Hygon Dhyana support
  2018-11-12 11:09 ` Borislav Petkov
@ 2018-11-12 16:30   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-11-12 16:30 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Pu Wen, peterz, mingo, alexander.shishkin, jolsa, namhyung, tglx,
	linux-kernel, linux-perf-users

Em Mon, Nov 12, 2018 at 12:09:23PM +0100, Borislav Petkov escreveu:
> On Mon, Nov 12, 2018 at 03:40:51PM +0800, Pu Wen wrote:
> > 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
> 
> acme, pls fix that to "OS" when applying. Thx.
> 
> > string to share the code path of AMD.
> > 
> > Signed-off-by: Pu Wen <puwen@hygon.cn>
> > ---
> >  tools/perf/arch/x86/util/kvm-stat.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Acked-by: Borislav Petkov <bp@suse.de>

Thanks, applied.

- Arnaldo
 
> > 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
> > 
> 
> -- 
> Regards/Gruss,
>     Boris.
> 
> Good mailing practices for 400: avoid top-posting and trim the reply.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip:perf/core] perf tools: Add Hygon Dhyana support
  2018-11-12  7:40 [RFC PATCH RESEND] tools/perf: Add Hygon Dhyana support Pu Wen
  2018-11-12 11:09 ` Borislav Petkov
@ 2018-11-22  7:12 ` " tip-bot for Pu Wen
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Pu Wen @ 2018-11-22  7:12 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: namhyung, alexander.shishkin, bp, acme, linux-kernel, peterz,
	puwen, jolsa, hpa, tglx, mingo

Commit-ID:  4787eff3fa88f62fede6ed7afa06477ae6bf984d
Gitweb:     https://git.kernel.org/tip/4787eff3fa88f62fede6ed7afa06477ae6bf984d
Author:     Pu Wen <puwen@hygon.cn>
AuthorDate: Mon, 12 Nov 2018 15:40:51 +0800
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 21 Nov 2018 22:39:56 -0300

perf tools: 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@hygon.cn>
Acked-by: Borislav Petkov <bp@suse.de>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1542008451-31735-1-git-send-email-puwen@hygon.cn
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 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 b32409a0e546..081353d7b095 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-12  7:40 [RFC PATCH RESEND] tools/perf: Add Hygon Dhyana support Pu Wen
2018-11-12 11:09 ` Borislav Petkov
2018-11-12 16:30   ` Arnaldo Carvalho de Melo
2018-11-22  7:12 ` [tip:perf/core] perf tools: " tip-bot for Pu Wen

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox