Re: [PATCH v1 02/10] perf: Support discriminator in addr2line

From: Andi Kleen
Date: Thu Sep 12 2024 - 10:58:29 EST


Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> writes:
>
> I noticed that this is under:
>
> #elif defined(HAVE_LIBBFD_SUPPORT)
>
> That isn't built by default due to licensing issues, i.e. we only build
> it if BUILD_NONDISTRO=1 is selected on the make command line, see:
>
> tools/perf/Makefile.config +943

Yes I know. I ran into this when my perf report runs were suddenly incredibly
slow until I figured out how to set this flag.

It's sad how theoretical lawyerneering breaks perfectly fine code.

At least I'm fine with whatever legal risk this causes.


>
> And we have the patch below now, can we try to use it instead so that at
> some point we can remove the libbpf support?

I also support the external addr2line.

But yes need to support the LLVM version too. I'll look into that.

As a side note. I always disliked the LLVM dependencies, these
libraries/packages are gigantic and traditionally unstable in
interface. It would be better to use a sane small library as a
replacement like https://github.com/ianlancetaylor/libbacktrace

-Andi