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

Vladimir Ivanov vlivanov at openjdk.java.net
Mon Apr 19 21:10:04 UTC 2021


On Mon, 19 Apr 2021 19:56:49 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> As opposed to "current C frame", it is about "caller's C frame" ;-)
>> 
>> I'll think about a way to make the comment less ambiguous.
>
> It's always difficult to document a call to `os::current_frame()`.
> I ran into this all the time when working with `AsyncGetCallTrace()`...
> 
> When I see the comment that you wrote here:
> 
> - I expect that comment to apply to the context in which I find that comment.
> - In this case, I expect the `os::current_frame()` to return the caller's frame and since that comment is in `trace_method_handle_stub` AND that's the code that's calling `os::current_frame()`, I expect the "caller's frame" to mean `trace_method_handle_stub`.
> 
> If that's what you mean, then we're okay from my POV. If that's not what  you mean, then I'm confused.

I can completely remove the comment. It turns out any reference to "current"/"caller"/"callee" doesn't make much sense.

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

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


More information about the hotspot-runtime-dev mailing list