llvm-project/compiler-rt/lib/profile
Reid Kleckner 987d331fab [InstrProf] Implement static profdata registration
Summary:
The motivating use case is eliminating duplicate profile data registered
for the same inline function in two object files. Before this change,
users would observe multiple symbol definition errors with VC link, but
links with LLD would succeed.

Users (Mozilla) have reported that PGO works well with clang-cl and LLD,
but when using LLD without this static registration, we would get into a
"relocation against a discarded section" situation. I'm not sure what
happens in that situation, but I suspect that duplicate, unused profile
information was retained. If so, this change will reduce the size of
such binaries with LLD.

Now, Windows uses static registration and is in line with all the other
platforms.

Reviewers: davidxl, wmi, inglorion, void, calixte

Subscribers: mgorny, krytarowski, eraman, fedor.sergeev, hiraditya, #sanitizers, dmajor, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D57929

llvm-svn: 353547
2019-02-08 19:03:50 +00:00
..
CMakeLists.txt [InstrProf] Implement static profdata registration 2019-02-08 19:03:50 +00:00
GCDAProfiling.c Silence -Wformat warnings about GetLastError returning ULONG 2019-02-07 23:58:48 +00:00
InstrProfData.inc [InstrProf] Implement static profdata registration 2019-02-08 19:03:50 +00:00
InstrProfiling.c Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfiling.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingBuffer.c Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingFile.c Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingInternal.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingMerge.c Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingMergeFile.c Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingNameVar.c Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingPlatformDarwin.c Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingPlatformFuchsia.c Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingPlatformLinux.c [InstrProf] Implement static profdata registration 2019-02-08 19:03:50 +00:00
InstrProfilingPlatformOther.c [InstrProf] Implement static profdata registration 2019-02-08 19:03:50 +00:00
InstrProfilingPlatformWindows.c [InstrProf] Implement static profdata registration 2019-02-08 19:03:50 +00:00
InstrProfilingPort.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingRuntime.cc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingUtil.c Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingUtil.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingValue.c [InstrProf] Implement static profdata registration 2019-02-08 19:03:50 +00:00
InstrProfilingWriter.c Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WindowsMMap.c [GCOV] Close file mapping handle on Windows, so flushed gcda files can be removed while the process is in execution 2018-11-07 09:38:26 +00:00
WindowsMMap.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00