forked from OSchip/llvm-project
![]() Use the llvm flag `-pgo-function-entry-coverage` to create single byte "counters" to track functions coverage. This mode has significantly less size overhead in both code and data because * We mark a function as "covered" with a store instead of an increment which generally requires fewer assembly instructions * We use a single byte per function rather than 8 bytes per block The trade off of course is that this mode only tells you if a function has been covered. This is useful, for example, to detect dead code. When combined with debug info correlation [0] we are able to create an instrumented Clang binary that is only 150M (the vanilla Clang binary is 143M). That is an overhead of 7M (4.9%) compared to the default instrumentation (without value profiling) which has an overhead of 31M (21.7%). [0] https://groups.google.com/g/llvm-dev/c/r03Z6JoN7d4 Reviewed By: kyulee Differential Revision: https://reviews.llvm.org/D116180 |
||
---|---|---|
.. | ||
Inputs | ||
binary-id-padding.c | ||
binary-id.c | ||
comdat_rename.test | ||
corrupted-profile.c | ||
counter_promo_for.c | ||
counter_promo_nest.c | ||
counter_promo_while.c | ||
coverage-linkage-lld.cpp | ||
coverage-linkage.cpp | ||
coverage-weak-lld.cpp | ||
coverage_ctors.cpp | ||
coverage_dtor.cpp | ||
coverage_shared.test | ||
coverage_test.cpp | ||
extern_template.test | ||
instrprof-alloc.test | ||
instrprof-basic.c | ||
instrprof-comdat.test | ||
instrprof-cs.c | ||
instrprof-debug-info-correlate.c | ||
instrprof-dir.c | ||
instrprof-dlopen.test | ||
instrprof-dynamic-one-shared.test | ||
instrprof-dynamic-two-shared.test | ||
instrprof-file_ex.test | ||
instrprof-merge-vp.c | ||
instrprof-show-debug-info-correlation.c | ||
instrprof-value-merge-lld.c | ||
instrprof-value-merge.c | ||
instrprof-value-prof-visibility.test | ||
instrprof-value-prof-warn.test | ||
lit.local.cfg.py |