-
Sub-task
-
Resolution: Unresolved
-
P4
-
17
-
x86
When the signal sent for AsyncGetCallTrace or JFR would land on a stub
(like arraycopy), it wouldn't be able to detect the sender (caller)
frame because `_cb->frame_size() == 0`.
Because we fully control how the prolog and epilog of stub code is
generated, we know there are two cases:
1. A stack frame is allocated via macroAssembler->enter(), and consists
in `push rbp; mov rsp, rbp;`.
2. No stack frames are allocated and rbp is left unchanged and rsp is
decremented with the `call` instruction that push the return `pc` on the
stack.
For case 1., we can easily know the sender frame by simply looking at
rbp, especially since we know that all stubs preserve the frame pointer
(on x86 at least).
For case 2., we end up returning the sender's sender, but that already
gives us more information than what we have today.
(like arraycopy), it wouldn't be able to detect the sender (caller)
frame because `_cb->frame_size() == 0`.
Because we fully control how the prolog and epilog of stub code is
generated, we know there are two cases:
1. A stack frame is allocated via macroAssembler->enter(), and consists
in `push rbp; mov rsp, rbp;`.
2. No stack frames are allocated and rbp is left unchanged and rsp is
decremented with the `call` instruction that push the return `pc` on the
stack.
For case 1., we can easily know the sender frame by simply looking at
rbp, especially since we know that all stubs preserve the frame pointer
(on x86 at least).
For case 2., we end up returning the sender's sender, but that already
gives us more information than what we have today.
- links to
-
Review openjdk/jdk/4274