llvm-project/compiler-rt/lib/profile
Gulfem Savrun Yeniceri 999886325e [profile] Create only prof header when no counters
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
2022-08-30 19:50:41 +00:00
..
CMakeLists.txt [compiler-rt] Silence warnings when building with MSVC 2022-01-11 10:36:57 -05:00
GCDAProfiling.c [Compiler-RT] Remove FlushViewOfFile call when unmapping gcda files on win32. 2022-07-05 13:24:28 +00:00
InstrProfiling.c [compiler-rt][builtins] Add compiler flags to catch potential errors 2022-08-26 08:35:19 -07:00
InstrProfiling.h [InstrProf][NFC] Do not assume size of counter type 2022-01-14 11:29:11 -08:00
InstrProfilingBuffer.c [InstrProf] Add single byte coverage mode 2022-01-27 17:38:55 -08:00
InstrProfilingFile.c Giving a lot more functions prototypes; NFC 2022-04-09 17:25:10 -04:00
InstrProfilingInternal.c Giving a lot more functions prototypes; NFC 2022-04-09 17:25:10 -04:00
InstrProfilingInternal.h [InstrProf][NFC] Do not assume size of counter type 2022-01-14 11:29:11 -08:00
InstrProfilingMerge.c Giving a lot more functions prototypes; NFC 2022-04-09 17:25:10 -04:00
InstrProfilingMergeFile.c
InstrProfilingNameVar.c
InstrProfilingPlatformDarwin.c [InstrProf][NFC] Do not assume size of counter type 2022-01-14 11:29:11 -08:00
InstrProfilingPlatformFuchsia.c Giving a lot more functions prototypes; NFC 2022-04-09 17:25:10 -04:00
InstrProfilingPlatformLinux.c [AIX][PGO] Enable linux style PGO on AIX 2022-05-05 04:10:39 +00:00
InstrProfilingPlatformOther.c [AIX][PGO] Enable linux style PGO on AIX 2022-05-05 04:10:39 +00:00
InstrProfilingPlatformWindows.c [InstrProf][NFC] Do not assume size of counter type 2022-01-14 11:29:11 -08:00
InstrProfilingPort.h [profile] Add __attribute__((used)) to zero size dummy sections 2021-02-17 19:22:25 -08:00
InstrProfilingRuntime.cpp
InstrProfilingUtil.c [InstrProf] Stop exporting lprofDirMode 2022-05-31 17:13:00 +00:00
InstrProfilingUtil.h [Profile][NFC] Clean up initializeProfileForContinuousMode 2021-08-06 14:00:36 -07:00
InstrProfilingValue.c Giving a lot more functions prototypes; NFC 2022-04-09 17:25:10 -04:00
InstrProfilingVersionVar.c [compiler-rt/profile] Reland mark __llvm_profile_raw_version as hidden 2021-11-16 11:37:00 -08:00
InstrProfilingWriter.c [profile] Create only prof header when no counters 2022-08-30 19:50:41 +00:00
WindowsMMap.c [profile] Decommit memory after counter relocation 2021-07-15 22:49:21 -07:00
WindowsMMap.h [profile] Decommit memory after counter relocation 2021-07-15 22:49:21 -07:00