Re: [PATCH v1 09/11] perf build: Rename HAVE_DWARF_SUPPORT to HAVE_LIBDW_SUPPORT

From: Ian Rogers
Date: Thu Sep 26 2024 - 11:10:26 EST


On Wed, Sep 25, 2024 at 5:34 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
>
> On Tue, Sep 24, 2024 at 09:04:16AM -0700, Ian Rogers wrote:
> > In Makefile.config for unwinding the name dwarf implies either
> > libunwind or libdw. Make it clearer that HAVE_DWARF_SUPPORT is really
> > just defined when libdw is present by renaming to HAVE_LIBDW_SUPPORT.
> >
> > Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
> > ---
> > tools/perf/Documentation/perf-check.txt | 6 +++---
> > tools/perf/Makefile.config | 2 +-
> > tools/perf/arch/powerpc/annotate/instructions.c | 4 ++--
> > tools/perf/arch/x86/annotate/instructions.c | 2 +-
> > tools/perf/builtin-annotate.c | 2 +-
> > tools/perf/builtin-check.c | 6 +++---
> > tools/perf/builtin-probe.c | 12 ++++++------
> > tools/perf/builtin-report.c | 4 ++--
> > tools/perf/util/annotate-data.h | 8 ++++----
> > tools/perf/util/debuginfo.h | 6 +++---
> > tools/perf/util/disasm.c | 4 ++--
> > tools/perf/util/disasm.h | 4 ++--
> > tools/perf/util/genelf.c | 4 ++--
> > tools/perf/util/genelf.h | 2 +-
> > tools/perf/util/include/dwarf-regs.h | 6 +++---
> > tools/perf/util/probe-event.c | 4 ++--
> > tools/perf/util/probe-finder.h | 4 ++--
> > 17 files changed, 40 insertions(+), 40 deletions(-)
> >
> > diff --git a/tools/perf/Documentation/perf-check.txt b/tools/perf/Documentation/perf-check.txt
> > index 45101a8e4154..31741499e786 100644
> > --- a/tools/perf/Documentation/perf-check.txt
> > +++ b/tools/perf/Documentation/perf-check.txt
> > @@ -47,15 +47,15 @@ feature::
> > bpf / HAVE_LIBBPF_SUPPORT
> > bpf_skeletons / HAVE_BPF_SKEL
> > debuginfod / HAVE_DEBUGINFOD_SUPPORT
> > - dwarf / HAVE_DWARF_SUPPORT
> > - dwarf_getlocations / HAVE_DWARF_SUPPORT
> > + dwarf / HAVE_LIBDW_SUPPORT
> > + dwarf_getlocations / HAVE_LIBDW_SUPPORT
>
> I'm not sure if we really want to display dwarf_getlocatiosn as it's too
> implementation detail IMHO. Maybe just 'dwarf' or 'libdw' is enough.

I think that's follow up work. I think we should rename dwarf to libdw
given the confusion using dwarf here can create.

Thanks,
Ian

> Thanks,
> Namhyung
>
>
> > dwarf-unwind / HAVE_DWARF_UNWIND_SUPPORT
> > auxtrace / HAVE_AUXTRACE_SUPPORT
> > libaudit / HAVE_LIBAUDIT_SUPPORT
> > libbfd / HAVE_LIBBFD_SUPPORT
> > libcapstone / HAVE_LIBCAPSTONE_SUPPORT
> > libcrypto / HAVE_LIBCRYPTO_SUPPORT
> > - libdw-dwarf-unwind / HAVE_DWARF_SUPPORT
> > + libdw-dwarf-unwind / HAVE_LIBDW_SUPPORT
> > libelf / HAVE_LIBELF_SUPPORT
> > libnuma / HAVE_LIBNUMA_SUPPORT
> > libopencsd / HAVE_CSTRACE_SUPPORT