linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] perf tools riscv: Add support for riscv lookup_binutils_path
@ 2023-03-15  5:15 Paran Lee
  2023-03-16  0:11 ` Ian Rogers
  2023-04-19  3:41 ` Palmer Dabbelt
  0 siblings, 2 replies; 4+ messages in thread
From: Paran Lee @ 2023-03-15  5:15 UTC (permalink / raw)
  To: Jiri Olsa, Namhyung Kim, Ian Rogers, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Arnaldo Carvalho de Melo
  Cc: Anton Blanchard, Daniel Axtens, Michael Ellerman,
	linux-perf-users, linux-kernel, linux-riscv, Paran Lee

Add RISC-V binutils path on lookup triplets.

Signed-off-by: Paran Lee <p4ranlee@gmail.com>
---
 tools/perf/arch/common.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c
index 59dd875fd5e4..e80d4d22cabf 100644
--- a/tools/perf/arch/common.c
+++ b/tools/perf/arch/common.c
@@ -43,6 +43,20 @@ const char *const powerpc_triplets[] = {
 	NULL
 };
 
+const char *const riscv32_triplets[] = {
+	"riscv32-unknown-linux-gnu-",
+	"riscv32-linux-android-",
+	"riscv32-linux-gnu-",
+	NULL
+};
+
+const char *const riscv64_triplets[] = {
+	"riscv64-unknown-linux-gnu-",
+	"riscv64-linux-android-",
+	"riscv64-linux-gnu-",
+	NULL
+};
+
 const char *const s390_triplets[] = {
 	"s390-ibm-linux-",
 	"s390x-linux-gnu-",
@@ -166,6 +180,10 @@ static int perf_env__lookup_binutils_path(struct perf_env *env,
 		path_list = arm64_triplets;
 	else if (!strcmp(arch, "powerpc"))
 		path_list = powerpc_triplets;
+	else if (!strcmp(arch, "riscv32"))
+		path_list = riscv32_triplets;
+	else if (!strcmp(arch, "riscv64"))
+		path_list = riscv64_triplets;
 	else if (!strcmp(arch, "sh"))
 		path_list = sh_triplets;
 	else if (!strcmp(arch, "s390"))
-- 
2.34.1


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

* Re: [PATCH v2] perf tools riscv: Add support for riscv lookup_binutils_path
  2023-03-15  5:15 [PATCH v2] perf tools riscv: Add support for riscv lookup_binutils_path Paran Lee
@ 2023-03-16  0:11 ` Ian Rogers
  2023-04-19  3:41 ` Palmer Dabbelt
  1 sibling, 0 replies; 4+ messages in thread
From: Ian Rogers @ 2023-03-16  0:11 UTC (permalink / raw)
  To: Paran Lee
  Cc: Jiri Olsa, Namhyung Kim, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Arnaldo Carvalho de Melo, Anton Blanchard, Daniel Axtens,
	Michael Ellerman, linux-perf-users, linux-kernel, linux-riscv

On Tue, Mar 14, 2023 at 10:15 PM Paran Lee <p4ranlee@gmail.com> wrote:
>
> Add RISC-V binutils path on lookup triplets.
>
> Signed-off-by: Paran Lee <p4ranlee@gmail.com>

Acked-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> ---
>  tools/perf/arch/common.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c
> index 59dd875fd5e4..e80d4d22cabf 100644
> --- a/tools/perf/arch/common.c
> +++ b/tools/perf/arch/common.c
> @@ -43,6 +43,20 @@ const char *const powerpc_triplets[] = {
>         NULL
>  };
>
> +const char *const riscv32_triplets[] = {
> +       "riscv32-unknown-linux-gnu-",
> +       "riscv32-linux-android-",
> +       "riscv32-linux-gnu-",
> +       NULL
> +};
> +
> +const char *const riscv64_triplets[] = {
> +       "riscv64-unknown-linux-gnu-",
> +       "riscv64-linux-android-",
> +       "riscv64-linux-gnu-",
> +       NULL
> +};
> +
>  const char *const s390_triplets[] = {
>         "s390-ibm-linux-",
>         "s390x-linux-gnu-",
> @@ -166,6 +180,10 @@ static int perf_env__lookup_binutils_path(struct perf_env *env,
>                 path_list = arm64_triplets;
>         else if (!strcmp(arch, "powerpc"))
>                 path_list = powerpc_triplets;
> +       else if (!strcmp(arch, "riscv32"))
> +               path_list = riscv32_triplets;
> +       else if (!strcmp(arch, "riscv64"))
> +               path_list = riscv64_triplets;
>         else if (!strcmp(arch, "sh"))
>                 path_list = sh_triplets;
>         else if (!strcmp(arch, "s390"))
> --
> 2.34.1
>

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

* Re: [PATCH v2] perf tools riscv: Add support for riscv lookup_binutils_path
  2023-03-15  5:15 [PATCH v2] perf tools riscv: Add support for riscv lookup_binutils_path Paran Lee
  2023-03-16  0:11 ` Ian Rogers
@ 2023-04-19  3:41 ` Palmer Dabbelt
  2023-04-29  1:23   ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 4+ messages in thread
From: Palmer Dabbelt @ 2023-04-19  3:41 UTC (permalink / raw)
  To: p4ranlee
  Cc: jolsa, namhyung, irogers, Paul Walmsley, aou, acme, anton, dja,
	mpe, linux-perf-users, linux-kernel, linux-riscv, p4ranlee

On Tue, 14 Mar 2023 22:15:01 PDT (-0700), p4ranlee@gmail.com wrote:
> Add RISC-V binutils path on lookup triplets.
>
> Signed-off-by: Paran Lee <p4ranlee@gmail.com>
> ---
>  tools/perf/arch/common.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c
> index 59dd875fd5e4..e80d4d22cabf 100644
> --- a/tools/perf/arch/common.c
> +++ b/tools/perf/arch/common.c
> @@ -43,6 +43,20 @@ const char *const powerpc_triplets[] = {
>  	NULL
>  };
>
> +const char *const riscv32_triplets[] = {
> +	"riscv32-unknown-linux-gnu-",
> +	"riscv32-linux-android-",
> +	"riscv32-linux-gnu-",
> +	NULL
> +};
> +
> +const char *const riscv64_triplets[] = {
> +	"riscv64-unknown-linux-gnu-",
> +	"riscv64-linux-android-",
> +	"riscv64-linux-gnu-",
> +	NULL
> +};
> +
>  const char *const s390_triplets[] = {
>  	"s390-ibm-linux-",
>  	"s390x-linux-gnu-",
> @@ -166,6 +180,10 @@ static int perf_env__lookup_binutils_path(struct perf_env *env,
>  		path_list = arm64_triplets;
>  	else if (!strcmp(arch, "powerpc"))
>  		path_list = powerpc_triplets;
> +	else if (!strcmp(arch, "riscv32"))
> +		path_list = riscv32_triplets;
> +	else if (!strcmp(arch, "riscv64"))
> +		path_list = riscv64_triplets;
>  	else if (!strcmp(arch, "sh"))
>  		path_list = sh_triplets;
>  	else if (!strcmp(arch, "s390"))

Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>

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

* Re: [PATCH v2] perf tools riscv: Add support for riscv lookup_binutils_path
  2023-04-19  3:41 ` Palmer Dabbelt
@ 2023-04-29  1:23   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-04-29  1:23 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: p4ranlee, jolsa, namhyung, irogers, Paul Walmsley, aou, acme,
	anton, dja, mpe, linux-perf-users, linux-kernel, linux-riscv

Em Tue, Apr 18, 2023 at 08:41:21PM -0700, Palmer Dabbelt escreveu:
> On Tue, 14 Mar 2023 22:15:01 PDT (-0700), p4ranlee@gmail.com wrote:
> > Add RISC-V binutils path on lookup triplets.
> > 
> > Signed-off-by: Paran Lee <p4ranlee@gmail.com>
> > ---
> >  tools/perf/arch/common.c | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> > 
> > diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c
> > index 59dd875fd5e4..e80d4d22cabf 100644
> > --- a/tools/perf/arch/common.c
> > +++ b/tools/perf/arch/common.c
> > @@ -43,6 +43,20 @@ const char *const powerpc_triplets[] = {
> >  	NULL
> >  };
> > 
> > +const char *const riscv32_triplets[] = {
> > +	"riscv32-unknown-linux-gnu-",
> > +	"riscv32-linux-android-",
> > +	"riscv32-linux-gnu-",
> > +	NULL
> > +};
> > +
> > +const char *const riscv64_triplets[] = {
> > +	"riscv64-unknown-linux-gnu-",
> > +	"riscv64-linux-android-",
> > +	"riscv64-linux-gnu-",
> > +	NULL
> > +};
> > +
> >  const char *const s390_triplets[] = {
> >  	"s390-ibm-linux-",
> >  	"s390x-linux-gnu-",
> > @@ -166,6 +180,10 @@ static int perf_env__lookup_binutils_path(struct perf_env *env,
> >  		path_list = arm64_triplets;
> >  	else if (!strcmp(arch, "powerpc"))
> >  		path_list = powerpc_triplets;
> > +	else if (!strcmp(arch, "riscv32"))
> > +		path_list = riscv32_triplets;
> > +	else if (!strcmp(arch, "riscv64"))
> > +		path_list = riscv64_triplets;
> >  	else if (!strcmp(arch, "sh"))
> >  		path_list = sh_triplets;
> >  	else if (!strcmp(arch, "s390"))
> 
> Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
> Acked-by: Palmer Dabbelt <palmer@rivosinc.com>

Thanks, applied.

- Arnaldo


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

end of thread, other threads:[~2023-04-29  1:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-15  5:15 [PATCH v2] perf tools riscv: Add support for riscv lookup_binutils_path Paran Lee
2023-03-16  0:11 ` Ian Rogers
2023-04-19  3:41 ` Palmer Dabbelt
2023-04-29  1:23   ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).