[PATCH] D115979: [InstrProf] Don't profile merge by default in lightweight mode
Ellis Hoag via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 20 09:51:58 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGac719d7c9ae6: [InstrProf] Don't profile merge by default in lightweight mode (authored by ellis).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115979/new/
https://reviews.llvm.org/D115979
Files:
clang/lib/CodeGen/BackendUtil.cpp
compiler-rt/lib/profile/InstrProfilingMerge.c
Index: compiler-rt/lib/profile/InstrProfilingMerge.c
===================================================================
--- compiler-rt/lib/profile/InstrProfilingMerge.c
+++ compiler-rt/lib/profile/InstrProfilingMerge.c
@@ -95,8 +95,13 @@
COMPILER_RT_VISIBILITY
int __llvm_profile_merge_from_buffer(const char *ProfileData,
uint64_t ProfileSize) {
- if (__llvm_profile_get_version() & VARIANT_MASK_DBG_CORRELATE)
+ if (__llvm_profile_get_version() & VARIANT_MASK_DBG_CORRELATE) {
+ PROF_ERR(
+ "%s\n",
+ "Debug info correlation does not support profile merging at runtime. "
+ "Instead, merge raw profiles using the llvm-profdata tool.");
return 1;
+ }
__llvm_profile_data *SrcDataStart, *SrcDataEnd, *SrcData, *DstData;
__llvm_profile_header *Header = (__llvm_profile_header *)ProfileData;
Index: clang/lib/CodeGen/BackendUtil.cpp
===================================================================
--- clang/lib/CodeGen/BackendUtil.cpp
+++ clang/lib/CodeGen/BackendUtil.cpp
@@ -102,7 +102,7 @@
// Default filename used for profile generation.
std::string getDefaultProfileGenName() {
- return DebugInfoCorrelate ? "default_%m.proflite" : "default_%m.profraw";
+ return DebugInfoCorrelate ? "default_%p.proflite" : "default_%m.profraw";
}
class EmitAssemblyHelper {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115979.395483.patch
Type: text/x-patch
Size: 1358 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211220/80c37fbf/attachment-0001.bin>
More information about the cfe-commits
mailing list