Skip to content

Commit

Permalink
[perf2bolt] Fix processing of binaries with names over 15 chars long
Browse files Browse the repository at this point in the history
Summary:
Do not truncate the binary name for comparison purposes as the binary
name we are getting from "perf script" is no longer truncated.

(cherry picked from FBD9596409)
  • Loading branch information
maksfb committed Aug 30, 2018
1 parent d0a80b0 commit 69e6004
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bolt/src/DataAggregator.cpp
Expand Up @@ -1305,11 +1305,11 @@ std::error_code DataAggregator::parseMMapEvents() {
}
);

auto NameToUse = BinaryName.substr(0, 15);
auto NameToUse = BinaryName;
if (GlobalMMapInfo.count(NameToUse) == 0 && !BuildIDBinaryName.empty()) {
errs() << "PERF2BOLT-WARNING: using \"" << BuildIDBinaryName
<< "\" for profile matching\n";
NameToUse = BuildIDBinaryName.substr(0, 15);
NameToUse = BuildIDBinaryName;
}

auto Range = GlobalMMapInfo.equal_range(NameToUse);
Expand Down

0 comments on commit 69e6004

Please sign in to comment.