Skip to content

Commit f6b275f

Browse files
committed
keep parsing build-id
Created using spr 1.3.4
1 parent 5ce09c0 commit f6b275f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,14 @@ 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+
453461
auto ErrorCallback = [](int ReturnCode, StringRef ErrBuf) {
454462
errs() << "PERF-ERROR: return code " << ReturnCode << "\n" << ErrBuf;
455463
exit(1);
@@ -468,14 +476,6 @@ Error DataAggregator::preprocessProfile(BinaryContext &BC) {
468476
goto heatmap;
469477
}
470478

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

0 commit comments

Comments
 (0)