File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -735,9 +735,13 @@ ProfileGeneratorBase::getCalleeNameForAddress(uint64_t TargetAddress) {
735735 if (!FRange || !FRange->IsFuncEntry )
736736 return StringRef ();
737737
738- auto FuncName = Binary->findPseudoProbeName (FRange->Func );
739- if (FuncName.size ())
740- return FunctionSamples::getCanonicalFnName (FuncName);
738+ // DWARF and symbol table may have mismatching function names. Instead, we'll
739+ // try to use its pseudo probe name first.
740+ if (Binary->usePseudoProbes ()) {
741+ auto FuncName = Binary->findPseudoProbeName (FRange->Func );
742+ if (FuncName.size ())
743+ return FunctionSamples::getCanonicalFnName (FuncName);
744+ }
741745
742746 return FunctionSamples::getCanonicalFnName (FRange->getFuncName ());
743747}
You can’t perform that action at this time.
0 commit comments