[compiler-rt] [llvm] [MemProf] Support multiple profiled binaries (PR #217039)
Parmida Vahdatnia via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 06:21:28 PDT 2026
================
@@ -624,7 +681,17 @@ Error RawMemProfReader::symbolizeAndFilterStackFrames(
for (size_t I = 0, NumFrames = DI.getNumberOfFrames(); I < NumFrames;
I++) {
const auto &DIFrame = DI.getFrame(I);
- const uint64_t Guid = memprof::getGUID(DIFrame.FunctionName);
+ // A PC identifies its module, but the normal MemProf GUID only hashes
+ // the linkage name. Qualify it with the build ID when multiple binaries
+ // are supplied so equal external symbols in different DSOs remain
+ // distinct. Keep single-binary GUIDs unchanged for compatibility.
+ // Build-ID-qualified GUIDs describe the exact profiled DSOs; applying
+ // such a profile to rebuilt DSOs additionally requires a compiler-side
----------------
parmidavnia wrote:
You're right, this new guid+buildID will fail at profile use, I'll use a new measure (not buildID) to separate the binaries.
https://github.com/llvm/llvm-project/pull/217039
More information about the llvm-commits
mailing list