[foreign-abi] RFR: 8251047: GC stackwalking doesn't work when intrinsics are enabled [v2]
Jorn Vernee
jvernee at openjdk.java.net
Fri Aug 21 21:36:59 UTC 2020
> Hi,
>
> This patch fixes GC stack walking for optimized native calls.
>
> For calls in compiled frames, the callee argument oops are processed using special case code in
> `CompiledMethod::preserve_callee_argument_oops`. This code relies on the original bytecode to find the signature of the
> callee, but for optimized native calls this doesn't make sense, since the original call is replaced, and some of the
> arguments (notably some that are oops) are discarded. In the case of an optimized native call, we can skip all callee
> argument oop processing, since we can't pass any oops to native calls any ways. Since the current code was already
> looking at debug info to find the signature of the callee, I piggy-backed on that to add a flag for optimized native
> calls. If the flag is set, we return early, skipping any processing. (I left in the assert I used to debug this, since
> it gives the failure a better error message, should we run into this again in the future) Thanks, Jorn
Jorn Vernee has updated the pull request with a new target base due to a merge or a rebase. The pull request now
contains three commits:
- Explicitly save RBP location in thread anchor, so we can add it to the RegisterMap when jumping from the entry frame to
the last java frame during a GC stack walk.
- Skip optimized native calls when processing callee argument oops.
- Add an assert to check whether a RegisterMap entry is NULL or not
-------------
Changes: https://git.openjdk.java.net/panama-foreign/pull/279/files
Webrev: https://webrevs.openjdk.java.net/panama-foreign/279/webrev.01
Stats: 58 lines in 15 files changed: 47 ins; 1 del; 10 mod
Patch: https://git.openjdk.java.net/panama-foreign/pull/279.diff
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/279/head:pull/279
PR: https://git.openjdk.java.net/panama-foreign/pull/279
More information about the panama-dev
mailing list