RFR: 8265218: trace_method_handle_stub fails to find calling frame on x86

Daniel D.Daugherty dcubed at openjdk.java.net
Mon Apr 19 22:10:07 UTC 2021


On Mon, 19 Apr 2021 21:22:53 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> I can completely remove the comment. It turns out any reference to "current"/"caller"/"callee" doesn't make much sense.
>
> Why I thought that explicitly calling that it's the "caller's frame" makes things clearer: 
>   (1) the code explicitly is written in such a way to skip any intermediate frames;
>   (2) all users are in generated code.
> 
> So, we know for sure there's a separate frame on the stack (which contains register values) and it differs from the top one. The bug is that we can't skip the frame returned by `os::current_frame()` because it doesn't return the top frame on the stack, but the next one.

Removing the comment doesn't help the reader understand the code.
Please replace the comment with something that accurately explains
what happens from this `os::current_frame()` call site.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3554


More information about the hotspot-runtime-dev mailing list