Skip to content

Commit de275f7

Browse files
committed
[𝘀𝗽𝗿] changes introduced through rebase
Created using spr 1.3.4 [skip ci]
1 parent 545a98c commit de275f7

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -450,14 +450,6 @@ int DataAggregator::prepareToParse(StringRef Name, PerfProcessInfo &Process,
450450
Error DataAggregator::preprocessProfile(BinaryContext &BC) {
451451
this->BC = &BC;
452452

453-
if (std::optional<StringRef> FileBuildID = BC.getFileBuildID()) {
454-
outs() << "BOLT-INFO: binary build-id is: " << *FileBuildID << "\n";
455-
processFileBuildID(*FileBuildID);
456-
} else {
457-
errs() << "BOLT-WARNING: build-id will not be checked because we could "
458-
"not read one from input binary\n";
459-
}
460-
461453
auto ErrorCallback = [](int ReturnCode, StringRef ErrBuf) {
462454
errs() << "PERF-ERROR: return code " << ReturnCode << "\n" << ErrBuf;
463455
exit(1);
@@ -476,6 +468,14 @@ Error DataAggregator::preprocessProfile(BinaryContext &BC) {
476468
goto heatmap;
477469
}
478470

471+
if (std::optional<StringRef> FileBuildID = BC.getFileBuildID()) {
472+
outs() << "BOLT-INFO: binary build-id is: " << *FileBuildID << "\n";
473+
processFileBuildID(*FileBuildID);
474+
} else {
475+
errs() << "BOLT-WARNING: build-id will not be checked because we could "
476+
"not read one from input binary\n";
477+
}
478+
479479
if (BC.IsLinuxKernel) {
480480
// Current MMap parsing logic does not work with linux kernel.
481481
// MMap entries for linux kernel uses PERF_RECORD_MMAP
@@ -518,13 +518,12 @@ Error DataAggregator::preprocessProfile(BinaryContext &BC) {
518518
deleteTempFiles();
519519

520520
heatmap:
521-
if (opts::HeatmapMode) {
522-
if (std::error_code EC = printLBRHeatMap())
523-
return errorCodeToError(EC);
524-
exit(0);
525-
}
521+
if (!opts::HeatmapMode)
522+
return Error::success();
526523

527-
return Error::success();
524+
if (std::error_code EC = printLBRHeatMap())
525+
return errorCodeToError(EC);
526+
exit(0);
528527
}
529528

530529
Error DataAggregator::readProfile(BinaryContext &BC) {

0 commit comments

Comments
 (0)