Skip to content

Commit 4627446

Browse files
committed
[BOLT] Fix AutoFDO output format after D154120
AutoFDO profile has no leading 0x in hex dumps. Reviewed By: #bolt, rafauler Differential Revision: https://reviews.llvm.org/D159507
1 parent bc8f4a1 commit 4627446

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,18 +398,18 @@ std::error_code DataAggregator::writeAutoFDOData(StringRef OutputFilename) {
398398

399399
OutFile << FallthroughLBRs.size() << "\n";
400400
for (const auto &[Trace, Info] : FallthroughLBRs) {
401-
OutFile << formatv("{0:x}-{1:x}:{2}\n", filterAddress(Trace.From),
401+
OutFile << formatv("{0:x-}-{1:x-}:{2}\n", filterAddress(Trace.From),
402402
filterAddress(Trace.To),
403403
Info.InternCount + Info.ExternCount);
404404
}
405405

406406
OutFile << BasicSamples.size() << "\n";
407407
for (const auto [PC, HitCount] : BasicSamples)
408-
OutFile << formatv("{0:x}:{1}\n", filterAddress(PC), HitCount);
408+
OutFile << formatv("{0:x-}:{1}\n", filterAddress(PC), HitCount);
409409

410410
OutFile << BranchLBRs.size() << "\n";
411411
for (const auto &[Trace, Info] : BranchLBRs) {
412-
OutFile << formatv("{0:x}->{1:x}:{2}\n", filterAddress(Trace.From),
412+
OutFile << formatv("{0:x-}->{1:x-}:{2}\n", filterAddress(Trace.From),
413413
filterAddress(Trace.To), Info.TakenCount);
414414
}
415415

0 commit comments

Comments
 (0)