Skip to content
Commit 62d86142 authored by Fangrui Song's avatar Fangrui Song
Browse files

[Pseudo Probe] Make .pseudo_probe GC-able

* Add the SHF_LINK_ORDER flag so that the .pseudo_probe section is discarded when the associated text section is discarded.
* Add unique ID so that with `clang -ffunction-sections -fno-unique-section-names`, there is one separate .pseudo_probe for each text section (disambiguated by `.section ....,unique,id` in assembly)

The changes allow .pseudo_probe GC even if we don't place instrumented functions
in an IR comdat (see `getOrCreateFunctionComdat` in SampleProfileProbe.cpp).

Reviewed By: hoy

Differential Revision: https://reviews.llvm.org/D153189
parent 01b51288
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment