[PATCH] D110271: [llvm-profgen] Fix an out-of-range error during unwinding
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 22 17:21:18 PDT 2021
wenlei accepted this revision.
wenlei added a comment.
lgtm, thanks.
================
Comment at: llvm/tools/llvm-profgen/PerfReader.cpp:81
+ if (!SameInlinee) {
+ State.switchToFrame(End);
State.CurrentLeafFrame->recordRangeCount(PrevIP, End, Repeat);
----------------
wlei wrote:
> wenlei wrote:
> > This is a change beyond refactoring? Before, we use last address of old frame as frame address, but now it's going to be the first address of old frame.
> >
> > `State.switchToFrame(LeafAddr);`
> > ->
> > `State.switchToFrame(End);`
> >
> > Or do did you actually meant `State.switchToFrame(PrevIP);`?
> >
> >
> It won't affect the result. I think any address in [PrevIP, End] is good for the leaf frame because we will trim the location info of the last frame. Using `End` is because `End` is also used out of the loop(just for readability).
Ok, so it changes what's used in the frame trie, but as long as we use a consistent address to represent frame, changes there won't affect output, correct?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110271/new/
https://reviews.llvm.org/D110271
More information about the llvm-commits
mailing list