[llvm] [llvm-profgen] Loading binary functions from .symtab when DWARF info is incomplete (PR #163654)

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 21 13:35:18 PST 2025


================
@@ -732,6 +733,15 @@ ProfileGeneratorBase::getCalleeNameForAddress(uint64_t TargetAddress) {
   if (!FRange || !FRange->IsFuncEntry)
     return StringRef();
 
+  if (RestoreSymbolName && FRange->Func->HasSymtabName) {
+    const AddressProbesMap &Address2ProbesMap = Binary->getAddress2ProbesMap();
+    for (const MCDecodedPseudoProbe &Probe :
+         Address2ProbesMap.find(TargetAddress)) {
----------------
HighW4y2H3ll wrote:

I see. Thanks for checking on that! I updated with a `loadSymbolsFromPseudoProbe` function. That loads the pseudo probe names based on the function range start address and pseudo probe address. I used a lower_bound to get the first pseudo probe of the function address, and traverse up through the inline tree to get the top-level function.

https://github.com/llvm/llvm-project/pull/163654


More information about the llvm-commits mailing list