[PATCH] D152314: [BOLT][NFC] Fix debug messages
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 6 15:51:14 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG713b28532e9f: [BOLT][NFC] Fix debug messages (authored by Amir).
Changed prior to commit:
https://reviews.llvm.org/D152314?vs=529063&id=529070#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152314/new/
https://reviews.llvm.org/D152314
Files:
bolt/lib/Core/BinaryFunction.cpp
bolt/lib/Profile/DataAggregator.cpp
Index: bolt/lib/Profile/DataAggregator.cpp
===================================================================
--- bolt/lib/Profile/DataAggregator.cpp
+++ 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;
}
Index: bolt/lib/Core/BinaryFunction.cpp
===================================================================
--- bolt/lib/Core/BinaryFunction.cpp
+++ 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<uint64_t, Relocation> &Rels =
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152314.529070.patch
Type: text/x-patch
Size: 2586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230606/03dbc546/attachment.bin>
More information about the llvm-commits
mailing list