[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zy5ZhX-ZWRCQRHVs@google.com>
Date: Fri, 8 Nov 2024 10:33:41 -0800
From: Namhyung Kim <namhyung@...nel.org>
To: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Ian Rogers <irogers@...gle.com>, 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>,
Adrian Hunter <adrian.hunter@...el.com>,
Kan Liang <kan.liang@...ux.intel.com>,
John Garry <john.g.garry@...cle.com>, Will Deacon <will@...nel.org>,
James Clark <james.clark@...aro.org>,
Mike Leach <mike.leach@...aro.org>, Leo Yan <leo.yan@...ux.dev>,
Guo Ren <guoren@...nel.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, Nick Terrell <terrelln@...com>,
Changbin Du <changbin.du@...wei.com>,
Guilherme Amadio <amadio@...too.org>,
Yang Jihong <yangjihong@...edance.com>,
Aditya Gupta <adityag@...ux.ibm.com>,
Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Bibo Mao <maobibo@...ngson.cn>, Huacai Chen <chenhuacai@...nel.org>,
Kajol Jain <kjain@...ux.ibm.com>, Atish Patra <atishp@...osinc.com>,
Shenlin Liang <liangshenlin@...incomputing.com>,
Anup Patel <anup@...infault.org>,
Oliver Upton <oliver.upton@...ux.dev>,
"Steinar H. Gunderson" <sesse@...gle.com>,
"Dr. David Alan Gilbert" <linux@...blig.org>,
Chen Pei <cp0613@...ux.alibaba.com>,
Dima Kogan <dima@...retsauce.net>,
Przemek Kitszel <przemyslaw.kitszel@...el.com>,
"David S. Miller" <davem@...emloft.net>,
Alexander Lobakin <aleksander.lobakin@...el.com>,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-csky@...r.kernel.org,
linux-riscv@...ts.infradead.org
Subject: Re: [PATCH v3 00/20] Remove PERF_HAVE_DWARF_REGS
On Fri, Nov 08, 2024 at 09:00:40AM +0900, Masami Hiramatsu wrote:
> Hi,
>
> On Thu, 7 Nov 2024 11:29:34 -0800
> Namhyung Kim <namhyung@...nel.org> wrote:
>
> > Hi all,
> >
> > On Wed, Oct 16, 2024 at 05:25:00PM -0700, Ian Rogers wrote:
> > > These changes are on top of:
> > > https://lore.kernel.org/lkml/20241017001354.56973-1-irogers@google.com/
> > >
> > > Prior to these patches PERF_HAVE_DWARF_REGS indicated the presence of
> > > dwarf-regs.c in the arch directory. dwarf-regs.c provided upto 4
> > > functions:
> > >
> > > 1) regs_query_register_offset would translate a register name into a
> > > pt_regs offset and was used by BPF prologues. BPF prologues existed
> > > for BPF events and support for these was removed many releases ago.
> > > This code was dead and could be removed.
> > >
> > > 2) get_arch_regstr duplicated get_dwarf_regstr and so it could be
> > > removed. The case for csky was a little more complicated as the ABI
> > > controlled the string. The callers of get_dwarf_regstr were updated to
> > > also pass the ELF flags so that on csky the ABI appropriate table
> > > could be used. As the argument is only used on csky this a no-op for
> > > everything else.
> > >
> > > 3) get_arch_regnum translated a register name back to a dwarf number
> > > and only existed on x86 where "al", "ax", "eax" and "rax" could all
> > > mean register 0. This code was moved to util with similar
> > > machine/flags logic to get_arch_regstr and for consistency with it.
> > >
> > > 4) get_powerpc_regs a PowerPC specific function used by annotate that
> > > should really be in util.
> > >
> > > 2 and 3 required the wiring through of the ELF machine and flags in
> > > callers to get_dwarf_regstr and get_dwarf_regnum. When these values
> > > weren't dependent on an ELF file a new EM_HOST and EF_HOST were added
> > > to give the host ELF machine and flags. These 2 #defines got rid of
> > > the existing separate arch files and #ifdefs.
> > >
> > > v3: These files were separated from the rest of the v2 libdw clean up
> > > in:
> > > https://lore.kernel.org/lkml/CAP-5=fVZH3L-6y_sxLwSmT8WyMXDMFnuqUksNULdQYJCPNBFYw@mail.gmail.com/
> > >
> > > Ian Rogers (20):
> > > perf bpf-prologue: Remove unused file
> > > perf dwarf-regs: Remove PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET
> > > perf dwarf-regs: Add EM_HOST and EF_HOST defines
> > > perf disasm: Add e_machine/e_flags to struct arch
> > > perf dwarf-regs: Pass accurate disassembly machine to get_dwarf_regnum
> > > perf dwarf-regs: Pass ELF flags to get_dwarf_regstr
> > > perf dwarf-regs: Move x86 dwarf-regs out of arch
> > > perf arm64: Remove dwarf-regs.c
> > > perf arm: Remove dwarf-regs.c
> > > perf dwarf-regs: Move csky dwarf-regs out of arch
> > > perf loongarch: Remove dwarf-regs.c
> > > perf mips: Remove dwarf-regs.c
> > > perf dwarf-regs: Move powerpc dwarf-regs out of arch
> > > perf riscv: Remove dwarf-regs.c and add dwarf-regs-table.h
> > > perf s390: Remove dwarf-regs.c
> > > perf sh: Remove dwarf-regs.c
> > > perf sparc: Remove dwarf-regs.c
> > > perf xtensa: Remove dwarf-regs.c
> > > perf dwarf-regs: Remove get_arch_regstr code
> > > perf build: Remove PERF_HAVE_DWARF_REGS
> >
> > These look all good and I'm about to apply the series.
> >
> > Masami, do you have any remaining concerns? It'd be nice if you can
> > give your Reviewed-by.
>
> I think it looks good to me.
>
> Reviewed-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>
Thanks for your review!
Namhyung
Powered by blists - more mailing lists