[PATCH] D152595: [PseudoProbe] Disgard probes for dead functions.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 12 09:33:16 PDT 2023


hoy added a comment.

In D152595#4410514 <https://reviews.llvm.org/D152595#4410514>, @wenlei wrote:

>> Probes of dead functions may be left over in the final binary for some reason,
>
> How many probes (in terms of % size) belong to dead functions? Can we avoid emitting these probes in the first place?

Very little. Currently probes are emitted along with the binary code for functions and the linker is responsible for removing dead code. For probes, the linker can also remove them with the implementation D146853: [Pseudo Probe] Placing .pseudoprobe section in the same comdat group with .txt <https://reviews.llvm.org/D146853>. However, since dead probes are very little, probably due to the thinLTO compiler backend doing a good job removing dead functions already, I'm switching to the implementation D152546: [Pseudo Probe] Placing .pseudoprobe section in a comdat group <https://reviews.llvm.org/D152546>, which doesn't enable the linker to remove dead probes but has other benefits.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152595



More information about the llvm-commits mailing list