[llvm-branch-commits] [llvm-profgen] Support [buildid:]0xaddr format in perfscript input (PR #190863)
Wei Wang via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Apr 7 16:45:41 PDT 2026
================
@@ -705,6 +753,13 @@ bool PerfScriptReader::extractLBRStack(TraceStream &TraceIt,
Dst = Binary->canonicalizeVirtualAddress(Dst);
bool SrcIsInternal = Binary->addressIsCode(Src);
bool DstIsInternal = Binary->addressIsCode(Dst);
+ // Filter by build ID: addresses with a non-matching buildid prefix
+ // are treated as external.
+ StringRef BinaryBuildID = getFilterBuildID(Binary);
+ if (!SrcBuildID.empty() && SrcBuildID != BinaryBuildID)
----------------
apolloww wrote:
I think we can drop `!SrcBuildID.empty()` here (a few other places too). As long as both do not match (empty or not), the address is not internal.
https://github.com/llvm/llvm-project/pull/190863
More information about the llvm-branch-commits
mailing list