![]() When we use selective instrumentation and instrument a file that is not in the selected files list provided via -fprofile-list, we generate an empty raw profile. This leads to empty_raw_profile error when we try to read that profile. This patch fixes the issue by generating a raw profile that contains only a profile header when there are no counters and profile data. A small reproducer for the above issue: echo "src:other.cc" > code.list clang++ -O2 -fprofile-instr-generate -fcoverage-mapping -fprofile-list=code.list code.cc -o code ./code llvm-profdata show default.profraw Differential Revision: https://reviews.llvm.org/D132094 |
||
---|---|---|
.. | ||
Inputs | ||
gcov-destructor.c | ||
gcov-dlopen.c | ||
gcov-execlp.c | ||
gcov-fork.c | ||
gcov-shared-flush.c | ||
instrprof-dlopen.test | ||
instrprof-dynamic-one-shared.test | ||
instrprof-dynamic-two-shared.test | ||
instrprof-empty-profile.c | ||
instrprof-gcov-parallel.test | ||
instrprof-get-filename-merge-mode.c | ||
instrprof-shared-empty-profile.test | ||
instrprof-shared.test | ||
instrprof-value-prof-shared.test | ||
instrprof-visibility-kinds.inc | ||
instrprof-visibility.cpp | ||
lit.local.cfg.py |