[PATCH] D96757: [InstrProfiling] Use ELF section groups for counters, data and values

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 17:20:14 PST 2021


phosek added a comment.

In D96757#2567122 <https://reviews.llvm.org/D96757#2567122>, @MaskRay wrote:

> Would be good to know the root cause. `SHF_LINK_ORDER` is the perfect alternative to COFF `comdat nodeduplicates` here as both solutions don't have space overhead.

The current issue we're stuck on is in the build of zstd (as discussed privately):

  ld.lld: error: host_arm64-profile/obj/third_party/zstd/libzstd.a(libzstd.zstd_decompress.c.o):(__llvm_prf_cnts): sh_link points to discarded section host_arm64-profile/obj/third_party/zstd/libzstd.a(libzstd.zstd_decompress.c.o):(.text.ZSTD_getDDict)



In D96757#2567128 <https://reviews.llvm.org/D96757#2567128>, @davidxl wrote:

> Good point about the section header. The objective of the patch is to reduce binary image size (loadable sections) though the object size may increase.  It would be good to know the object size overhead because some of our large binaries may get hit during link time (of instr binary).

I'll do a full build of Fuchsia with this change to measure the impact.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96757



More information about the llvm-commits mailing list