diff --git a/bolt/lib/Core/BinaryFunction.cpp b/bolt/lib/Core/BinaryFunction.cpp --- a/bolt/lib/Core/BinaryFunction.cpp +++ b/bolt/lib/Core/BinaryFunction.cpp @@ -4509,7 +4509,7 @@ "address is outside of the function"); uint64_t Offset = Address - getAddress(); LLVM_DEBUG(dbgs() << "BOLT-DEBUG: addRelocation in " - << formatv("{0}@{1:x} against {2}\n", this, Offset, + << formatv("{0}@{1:x} against {2}\n", *this, Offset, Symbol->getName())); bool IsCI = BC.isAArch64() && isInConstantIsland(Address); std::map &Rels = diff --git a/bolt/lib/Profile/DataAggregator.cpp b/bolt/lib/Profile/DataAggregator.cpp --- a/bolt/lib/Profile/DataAggregator.cpp +++ b/bolt/lib/Profile/DataAggregator.cpp @@ -791,23 +791,23 @@ BinaryFunction *FromFunc = getBinaryFunctionContainingAddress(First.To); BinaryFunction *ToFunc = getBinaryFunctionContainingAddress(Second.From); if (!FromFunc || !ToFunc) { - LLVM_DEBUG( - dbgs() << "Out of range trace starting in " << FromFunc->getPrintName() - << " @ " << Twine::utohexstr(First.To - FromFunc->getAddress()) - << " and ending in " << ToFunc->getPrintName() << " @ " - << ToFunc->getPrintName() << " @ " - << Twine::utohexstr(Second.From - ToFunc->getAddress()) << '\n'); + LLVM_DEBUG({ + dbgs() << "Out of range trace starting in " << FromFunc->getPrintName() + << formatv(" @ {0:x}", First.To - FromFunc->getAddress()) + << " and ending in " << ToFunc->getPrintName() + << formatv(" @ {0:x}\n", Second.From - ToFunc->getAddress()); + }); NumLongRangeTraces += Count; return false; } if (FromFunc != ToFunc) { NumInvalidTraces += Count; - LLVM_DEBUG( - dbgs() << "Invalid trace starting in " << FromFunc->getPrintName() - << " @ " << Twine::utohexstr(First.To - FromFunc->getAddress()) - << " and ending in " << ToFunc->getPrintName() << " @ " - << ToFunc->getPrintName() << " @ " - << Twine::utohexstr(Second.From - ToFunc->getAddress()) << '\n'); + LLVM_DEBUG({ + dbgs() << "Invalid trace starting in " << FromFunc->getPrintName() + << formatv(" @ {0:x}", First.To - FromFunc->getAddress()) + << " and ending in " << ToFunc->getPrintName() + << formatv(" @ {0:x}\n", Second.From - ToFunc->getAddress()); + }); return false; }