mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
[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
This commit is contained in:
@@ -398,18 +398,18 @@ std::error_code DataAggregator::writeAutoFDOData(StringRef OutputFilename) {
|
||||
|
||||
OutFile << FallthroughLBRs.size() << "\n";
|
||||
for (const auto &[Trace, Info] : FallthroughLBRs) {
|
||||
OutFile << formatv("{0:x}-{1:x}:{2}\n", filterAddress(Trace.From),
|
||||
OutFile << formatv("{0:x-}-{1:x-}:{2}\n", filterAddress(Trace.From),
|
||||
filterAddress(Trace.To),
|
||||
Info.InternCount + Info.ExternCount);
|
||||
}
|
||||
|
||||
OutFile << BasicSamples.size() << "\n";
|
||||
for (const auto [PC, HitCount] : BasicSamples)
|
||||
OutFile << formatv("{0:x}:{1}\n", filterAddress(PC), HitCount);
|
||||
OutFile << formatv("{0:x-}:{1}\n", filterAddress(PC), HitCount);
|
||||
|
||||
OutFile << BranchLBRs.size() << "\n";
|
||||
for (const auto &[Trace, Info] : BranchLBRs) {
|
||||
OutFile << formatv("{0:x}->{1:x}:{2}\n", filterAddress(Trace.From),
|
||||
OutFile << formatv("{0:x-}->{1:x-}:{2}\n", filterAddress(Trace.From),
|
||||
filterAddress(Trace.To), Info.TakenCount);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user