Question regarding "native-compiled frame"
Felix Yang
felix.yang at linaro.org
Wed Sep 13 13:10:36 UTC 2017
On 7 September 2017 at 19:04, Andrew Dinn <adinn at redhat.com> wrote:
> 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.
>
Yes, that's the frame structure.
> 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.
>
True. And this is handled by the three IF statements of frame::sender
function.
It seems to me that the last return statement is not involved in the stack
walking process, isn't it?
Thanks for your help,
Felix
More information about the hotspot-dev
mailing list