[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAhV-H6L9kNyGU2UrX7jyN_6O_pafSVSamP7DYHkzfMgmCxVXA@mail.gmail.com>
Date: Thu, 18 May 2023 11:12:26 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Leo Yan <leo.yan@...aro.org>
Cc: Tiezhu Yang <yangtiezhu@...ngson.cn>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-perf-users@...r.kernel.org, loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org, loongson-kernel@...ts.loongnix.cn
Subject: Re: [PATCH] perf symbol: Add LoongArch case in get_plt_sizes()
On Thu, May 18, 2023 at 11:06 AM Leo Yan <leo.yan@...aro.org> wrote:
>
> On Thu, May 18, 2023 at 10:11:27AM +0800, Huacai Chen wrote:
> > Queued, thanks.
>
> The patch is fine for me.
>
> Should not perf patches are to be merged via Arnaldo's tree?
I think both are OK, if Arnaldo takes this patch, I will drop it.
Huacai
>
> Thanks,
> Leo
>
> > On Tue, May 9, 2023 at 2:56 PM Tiezhu Yang <yangtiezhu@...ngson.cn> wrote:
> > >
> > > We can see the following definitions in bfd/elfnn-loongarch.c:
> > >
> > > #define PLT_HEADER_INSNS 8
> > > #define PLT_HEADER_SIZE (PLT_HEADER_INSNS * 4)
> > >
> > > #define PLT_ENTRY_INSNS 4
> > > #define PLT_ENTRY_SIZE (PLT_ENTRY_INSNS * 4)
> > >
> > > so plt header size is 32 and plt entry size is 16 on LoongArch,
> > > let us add LoongArch case in get_plt_sizes().
> > >
> > > Link: https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/elfnn-loongarch.c
> > > Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
> > > ---
> > >
> > > This is based on 6.4-rc1
> > >
> > > tools/perf/util/symbol-elf.c | 4 ++++
> > > 1 file changed, 4 insertions(+)
> > >
> > > diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
> > > index b2ed9cc..5d409c2 100644
> > > --- a/tools/perf/util/symbol-elf.c
> > > +++ b/tools/perf/util/symbol-elf.c
> > > @@ -411,6 +411,10 @@ static bool get_plt_sizes(struct dso *dso, GElf_Ehdr *ehdr, GElf_Shdr *shdr_plt,
> > > *plt_header_size = 32;
> > > *plt_entry_size = 16;
> > > return true;
> > > + case EM_LOONGARCH:
> > > + *plt_header_size = 32;
> > > + *plt_entry_size = 16;
> > > + return true;
> > > case EM_SPARC:
> > > *plt_header_size = 48;
> > > *plt_entry_size = 12;
> > > --
> > > 2.1.0
> > >
> > >
Powered by blists - more mailing lists