Question regarding "native-compiled frame"
Andrew Dinn
adinn at redhat.com
Thu Sep 7 11:04:46 UTC 2017
On 07/09/17 11:35, Felix Yang wrote:
> Thanks for the reply.
> Then when will the last return statement of frame::sender got a chance to
> be executed?
> As I see it, when JVM does something in safepoint state and need to
> traverse Java thread stack, we never calculate the sender of a
> native-compiled frame.
It is possible for Java to call out into the JVM and then for the JVM to
call back into Java. For example, when a class is loaded the JVM calls
into Java to run the class initializer. This re-entry may happen
multiple times.
In that case a stack walk under the re-entry may find a Java start fame
and it's parent frame will be the native frame where Java entered the VM.
Note that the native frame will always be returned by the call to
sender_for_entry_frame(map). That method skips all the C frames between
the Java entry frame and the native frame which exited Java.
regards,
Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
More information about the hotspot-dev
mailing list