This patch adds support for optional memory profile information to be included with and indexed profile. The indexed profile header adds a new field which points to the offset of the memory profile section (if present) in the indexed profile. For users who do not utilize this feature the only overhead is a 64-bit offset in the header. The memory profile section contains (1) profile metadata describing the information recorded for each entry (2) an on-disk hashtable containing the profile records indexed via llvm::md5(function_name). We chose to introduce a separate hash table instead of the existing one since the indexing for the instrumented fdo hash table is based on a CFG hash which itself is perturbed by memprof instrumentation. This commit also includes the changes reviewed separately in D120093. Differential Revision: https://reviews.llvm.org/D120103
30 lines
483 B
CMake
30 lines
483 B
CMake
add_llvm_component_library(LLVMProfileData
|
|
GCOV.cpp
|
|
InstrProf.cpp
|
|
InstrProfCorrelator.cpp
|
|
InstrProfReader.cpp
|
|
InstrProfWriter.cpp
|
|
MemProf.cpp
|
|
ProfileSummaryBuilder.cpp
|
|
SampleProf.cpp
|
|
SampleProfReader.cpp
|
|
SampleProfWriter.cpp
|
|
RawMemProfReader.cpp
|
|
|
|
ADDITIONAL_HEADER_DIRS
|
|
${LLVM_MAIN_INCLUDE_DIR}/llvm/ProfileData
|
|
|
|
DEPENDS
|
|
intrinsics_gen
|
|
|
|
LINK_COMPONENTS
|
|
Core
|
|
Object
|
|
Support
|
|
Demangle
|
|
Symbolize
|
|
DebugInfoDWARF
|
|
)
|
|
|
|
add_subdirectory(Coverage)
|