From: Namhyung Kim <namhyung@kernel.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Kan Liang <kan.liang@linux.intel.com>,
John Garry <john.g.garry@oracle.com>,
Will Deacon <will@kernel.org>,
James Clark <james.clark@linaro.org>,
Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linux.dev>,
Guo Ren <guoren@kernel.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>, Nick Terrell <terrelln@fb.com>,
Changbin Du <changbin.du@huawei.com>,
Guilherme Amadio <amadio@gentoo.org>,
Yang Jihong <yangjihong@bytedance.com>,
Aditya Gupta <adityag@linux.ibm.com>,
Athira Rajeev <atrajeev@linux.vnet.ibm.com>,
Masahiro Yamada <masahiroy@kernel.org>,
Bibo Mao <maobibo@loongson.cn>,
Huacai Chen <chenhuacai@kernel.org>,
Kajol Jain <kjain@linux.ibm.com>,
Atish Patra <atishp@rivosinc.com>,
Shenlin Liang <liangshenlin@eswincomputing.com>,
Anup Patel <anup@brainfault.org>,
Oliver Upton <oliver.upton@linux.dev>,
"Steinar H. Gunderson" <sesse@google.com>,
"Dr. David Alan Gilbert" <linux@treblig.org>,
Chen Pei <cp0613@linux.alibaba.com>,
Dima Kogan <dima@secretsauce.net>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Alexander Lobakin <aleksander.lobakin@intel.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: Re: [PATCH v3 00/20] Remove PERF_HAVE_DWARF_REGS
Date: Fri, 8 Nov 2024 10:33:41 -0800 [thread overview]
Message-ID: <Zy5ZhX-ZWRCQRHVs@google.com> (raw)
In-Reply-To: <20241108090040.463cb3f0820e7ac22d1bb6c2@kernel.org>
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@kernel.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@kernel.org>
Thanks for your review!
Namhyung
prev parent reply other threads:[~2024-11-08 18:41 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 0:25 [PATCH v3 00/20] Remove PERF_HAVE_DWARF_REGS Ian Rogers
2024-10-17 0:25 ` [PATCH v3 01/20] perf bpf-prologue: Remove unused file Ian Rogers
2024-10-17 0:25 ` [PATCH v3 02/20] perf dwarf-regs: Remove PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET Ian Rogers
2024-10-17 0:25 ` [PATCH v3 03/20] perf dwarf-regs: Add EM_HOST and EF_HOST defines Ian Rogers
2024-10-17 0:25 ` [PATCH v3 04/20] perf disasm: Add e_machine/e_flags to struct arch Ian Rogers
2024-11-08 17:33 ` Namhyung Kim
2024-11-08 18:19 ` Ian Rogers
2024-11-08 18:38 ` Namhyung Kim
2024-11-08 18:45 ` Ian Rogers
2024-10-17 0:25 ` [PATCH v3 05/20] perf dwarf-regs: Pass accurate disassembly machine to get_dwarf_regnum Ian Rogers
2024-10-17 0:25 ` [PATCH v3 06/20] perf dwarf-regs: Pass ELF flags to get_dwarf_regstr Ian Rogers
2024-10-17 0:25 ` [PATCH v3 07/20] perf dwarf-regs: Move x86 dwarf-regs out of arch Ian Rogers
2024-10-17 0:25 ` [PATCH v3 08/20] perf arm64: Remove dwarf-regs.c Ian Rogers
2024-10-17 0:25 ` [PATCH v3 09/20] perf arm: " Ian Rogers
2024-10-17 0:25 ` [PATCH v3 10/20] perf dwarf-regs: Move csky dwarf-regs out of arch Ian Rogers
2024-11-08 20:03 ` Namhyung Kim
2024-11-08 23:08 ` Ian Rogers
2024-10-17 0:25 ` [PATCH v3 11/20] perf loongarch: Remove dwarf-regs.c Ian Rogers
2024-10-17 0:25 ` [PATCH v3 12/20] perf mips: " Ian Rogers
2024-10-17 0:25 ` [PATCH v3 13/20] perf dwarf-regs: Move powerpc dwarf-regs out of arch Ian Rogers
2024-10-17 0:25 ` [PATCH v3 14/20] perf riscv: Remove dwarf-regs.c and add dwarf-regs-table.h Ian Rogers
2024-10-18 19:39 ` Palmer Dabbelt
2024-10-17 0:25 ` [PATCH v3 15/20] perf s390: Remove dwarf-regs.c Ian Rogers
2024-10-17 0:25 ` [PATCH v3 16/20] perf sh: " Ian Rogers
2024-10-17 0:25 ` [PATCH v3 17/20] perf sparc: " Ian Rogers
2024-10-17 0:25 ` [PATCH v3 18/20] perf xtensa: " Ian Rogers
2024-10-17 0:25 ` [PATCH v3 19/20] perf dwarf-regs: Remove get_arch_regstr code Ian Rogers
2024-10-17 0:25 ` [PATCH v3 20/20] perf build: Remove PERF_HAVE_DWARF_REGS Ian Rogers
2024-11-07 19:29 ` [PATCH v3 00/20] " Namhyung Kim
2024-11-08 0:00 ` Masami Hiramatsu
2024-11-08 18:33 ` Namhyung Kim [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zy5ZhX-ZWRCQRHVs@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adityag@linux.ibm.com \
--cc=adrian.hunter@intel.com \
--cc=aleksander.lobakin@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=amadio@gentoo.org \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=atishp@rivosinc.com \
--cc=atrajeev@linux.vnet.ibm.com \
--cc=changbin.du@huawei.com \
--cc=chenhuacai@kernel.org \
--cc=cp0613@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=dima@secretsauce.net \
--cc=guoren@kernel.org \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=john.g.garry@oracle.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=kjain@linux.ibm.com \
--cc=leo.yan@linux.dev \
--cc=liangshenlin@eswincomputing.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux@treblig.org \
--cc=maobibo@loongson.cn \
--cc=mark.rutland@arm.com \
--cc=masahiroy@kernel.org \
--cc=mhiramat@kernel.org \
--cc=mike.leach@linaro.org \
--cc=mingo@redhat.com \
--cc=oliver.upton@linux.dev \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=peterz@infradead.org \
--cc=przemyslaw.kitszel@intel.com \
--cc=sesse@google.com \
--cc=terrelln@fb.com \
--cc=will@kernel.org \
--cc=yangjihong@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).