[llvm-dev] [InstrProfiling] Lightweight Instrumentation

Xinliang David Li via llvm-dev llvm-dev at lists.llvm.org
Mon Oct 18 12:31:26 PDT 2021

(re-post due to size limit)

Hi Ellis, thanks for the proposal. Improving the usability of
Instrumentation PGO is indeed very important.

>From the results data below, if I understand correctly, the main savings
are from supporting the coverage mode (using boolean counters), right? If
we only enable that, the meta data based IRPGO clang size will be 10 MB
larger (__llvm_prf_names are strippible or easily doable).

About __llvm_prof_data -- it also serves the purpose of detecting CFG
mismatch (with cfg hashing). On the other hand, about half of the size is
used for value profiling purposes, so for coverage mode when value profile
is not needed, its size can be cut in half -- leaving the total overhead to
be roughly 7 MiB, very close to the debug info based matching scheme.

I support the proposal related to different profiling modes (entry only,
boolean counter).  I suggest having those features upstreamed. In addition,
changes that can reduce existing IRPGO size (e.g, strippable name section,
reduced __llvm_prof_data) are also very welcome. After those are done, we
will have a better idea if the size is still an issue (with a better
comparison with the debug info based method).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211018/93622f80/attachment.html>

More information about the llvm-dev mailing list