[all-commits] [llvm/llvm-project] 77b75c: [BOLT][perf2bolt] Fix base address calculation for...
maksfb via All-commits
all-commits at lists.llvm.org
Thu Apr 14 10:30:28 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 77b75ca53f464d4400d0b86458f97037b35a4999
https://github.com/llvm/llvm-project/commit/77b75ca53f464d4400d0b86458f97037b35a4999
Author: Maksim Panchenko <maks at fb.com>
Date: 2022-04-14 (Thu, 14 Apr 2022)
Changed paths:
M bolt/include/bolt/Core/BinaryContext.h
M bolt/include/bolt/Profile/DataAggregator.h
M bolt/lib/Core/BinaryContext.cpp
M bolt/lib/Profile/DataAggregator.cpp
A bolt/unittests/Core/BinaryContext.cpp
M bolt/unittests/Core/CMakeLists.txt
Log Message:
-----------
[BOLT][perf2bolt] Fix base address calculation for shared objects
When processing profile data for shared object or PIE, perf2bolt needs
to calculate base address of the binary based on the map info reported
by the perf tool. When the mapping data provided is for the second
(or any other than the first) segment and the segment's file offset
does not match its memory offset, perf2bolt uses wrong assumption
about the binary base address.
Add a function to calculate binary base address using the reported
memory mapping and use the returned base for further address
adjustments.
Reviewed By: yota9
Differential Revision: https://reviews.llvm.org/D123755
More information about the All-commits
mailing list