llvm-project/compiler-rt/test/profile/Linux
Ellis Hoag 11d3074267 [InstrProf] Add single byte coverage mode
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
2022-01-27 17:38:55 -08:00
..
Inputs [test] Improve PGO tests 2021-03-03 11:32:24 -08:00
binary-id-padding.c [llvm][profile] Add padding after binary IDs 2021-09-28 11:50:50 -07:00
binary-id.c [profile] Fix profile merging with binary IDs 2021-07-30 18:54:27 -07:00
comdat_rename.test
corrupted-profile.c [compiler-rt][profile] Make corrupted-profile.c more robust 2021-09-23 17:16:47 -07:00
counter_promo_for.c Revert "[BPI] Improve static heuristics for integer comparisons" 2020-08-17 20:44:33 +02:00
counter_promo_nest.c
counter_promo_while.c Revert "[BPI] Improve static heuristics for integer comparisons" 2020-08-17 20:44:33 +02:00
coverage-linkage-lld.cpp [profile] Add -fprofile-instr-generate tests for weak definition and various linkages 2021-06-04 10:26:55 -07:00
coverage-linkage.cpp [profile][test] Improve coverage-linkage.cpp with ld.lld --gc-sections 2021-07-06 11:08:47 -07:00
coverage-weak-lld.cpp [profile] Add -fprofile-instr-generate tests for weak definition and various linkages 2021-06-02 16:12:08 -07:00
coverage_ctors.cpp [test] Fix compiler-rt/test/profile/coverage_emptylines.cpp if the build directory is under /tmp 2020-12-10 16:57:10 -08:00
coverage_dtor.cpp [test] Fix compiler-rt/test/profile/coverage_emptylines.cpp if the build directory is under /tmp 2020-12-10 16:57:10 -08:00
coverage_shared.test
coverage_test.cpp [test] Fix compiler-rt/test/profile/coverage_emptylines.cpp if the build directory is under /tmp 2020-12-10 16:57:10 -08:00
extern_template.test
instrprof-alloc.test
instrprof-basic.c Revert "Use uint64_t for branch weights instead of uint32_t" 2020-10-31 00:25:32 -07:00
instrprof-comdat.test [profile][test] Delete --path-equivalence=/tmp,%S 2021-07-31 00:36:17 -07:00
instrprof-cs.c Reapply commit b7425e956 2021-08-16 12:18:40 -07:00
instrprof-debug-info-correlate.c [InstrProf] Add single byte coverage mode 2022-01-27 17:38:55 -08:00
instrprof-dir.c
instrprof-dlopen.test
instrprof-dynamic-one-shared.test
instrprof-dynamic-two-shared.test
instrprof-file_ex.test
instrprof-merge-vp.c [Profile] Handle invalid profile data 2021-06-10 16:10:13 -07:00
instrprof-show-debug-info-correlation.c [InstrProf][Correlate] Verify debug info with llvm-profdata show 2022-01-27 10:11:04 -08:00
instrprof-value-merge-lld.c [profile][test] Add -no-pie to make value profile merge work on Linux with default PIE 2021-08-11 22:41:52 -07:00
instrprof-value-merge.c [profile][test] Add -no-pie to make value profile merge work on Linux with default PIE 2021-08-11 22:41:52 -07:00
instrprof-value-prof-visibility.test
instrprof-value-prof-warn.test [profile][test] Pin Linux/instrprof-value-prof-warn.test to -fuse-ld=bfd 2021-03-05 00:52:25 -08:00
lit.local.cfg.py