[PATCH] D158194: [lld/ELF] Add flag to print relocation stats
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 17 09:31:50 PDT 2023
aeubanks added a comment.
In D158194#4595844 <https://reviews.llvm.org/D158194#4595844>, @MaskRay wrote:
> This adds overhead to most relocations. The maximum offset doesn't necessarily reflect the pressure. We need to look at the distribution.
> I am therefore object to such an approach.
> As an alternative, we can relink with `--emit-relocs` and use another program to analyze the relocations.
I measured this (probably should have gotten numbers before sending this out) and yeah this does noticeably increase link times even when it's turned off so this current approach won't work.
But for continual monitoring of relocation pressure across binaries in a large build system, it's quite convenient to do this in the linker rather than as a separate step. Are you against all approaches of doing this in lld during the link (under a flag that won't impact link times at all), or just approaches in lld that affect lld link times?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158194/new/
https://reviews.llvm.org/D158194
More information about the llvm-commits
mailing list