[PATCH] D105217: [LLD] Adding support for RELA for CG Profile.

Alexander Yermolovich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 1 18:13:39 PDT 2021


ayermolo added a comment.

In D105217#2851379 <https://reviews.llvm.org/D105217#2851379>, @MaskRay wrote:

> First, `.llvm.call-graph-profile` is only emitted by -fprofile-use= and -fprofile-sample-use=, instrumentation PGO and sample PGO.
> The use case is very specific. For sample PGO/BOLT there are other requirements from an external tool converting linux-perf data to a profile format recognized by llvm-project.
> I can imagine that BOLT may have more requirements on LLVM tooling.
> So I don't see why requiring llvm-strip will be another hindrance.
> Also keep in mind that GNU binutils doesn't recognize the section type SHT_LLVM_*. (Folks have added dumping support to llvm-readobj.)
>
>> Second is how caching of object files works within the build system. It allows flexibility for projects to re-use objects with and without debug information.
>
> If linker input size is not a concern, you may use `ld -S` instead of `strip -S` on .o files.

Linker input size is a concern. But also moving all the object files (gigs worth) around from machines where they are cached to ones where final linking step is happening. 
I brought up BOLT just in context of debug fission, and that it's not always possible to enable it. Depending on the work flow. Not as an argument for this patch. Sorry for confusion.
Speaking of distributed build environment. As James pointed out, they might not have full llvm toolchain installed. I understand that this ads complexity, but it's very small and it enables maximum compatibility of LLD with standard tools that is used in production.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105217/new/

https://reviews.llvm.org/D105217



More information about the llvm-commits mailing list