Re: [PATCH v2 00/17] Support dynamic opening of capstone/llvm remove BUILD_NONDISTRO

Andi Kleen
2025-01-22T15:21:01Z

On Tue, Jan 21, 2025 at 10:23:15PM -0800, Ian Rogers wrote:
> Linking against libcapstone and libLLVM can be a significant increase
> in dependencies and size of memory footprint. For something like `perf
> record` the disassembler and addr2line functionality won't be
> used. Support dynamically loading these libraries using dlopen and
> then calling the appropriate functions found using dlsym.

It's unclear to me what this actually fixes. If the code is not used
it should not be faulted in and the dynamic linker is lazy too, so
if it's not used, it won't even be linked.

I don't see any numbers, but it won't surprise me if it improved
actual run time or memory usage significantly.

-Andi