[RFC] JVMTI CLASS_PREPARE event

Tom Tromey tromey@redhat.com
Wed Jan 24 23:10:00 GMT 2007


>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> We need to be able to report when the VM has prepared a class. My
Keith> biggest concern about this patch is if any class runs through
Keith> _Jv_Linker::wait_for_state without ever "stopping" at JV_STATE_LINKED,
Keith> i.e., it goes to JV_STATE_DONE. I don't know if this is even possible,
Keith> though. If it can't happen, then this should work just fine.

I think it isn't really possible.  wait_for_state is not used for the
final transition to DONE; that is only done by the class
initialization code (plus the predictable special case for array
classes, which are born DONE).  However, all earlier transitions are
handled via wait_for_state.

If you want extra checking I think adding an '&& state >= JV_STATE_LINKED'
would do it.  We know that the original klass->state is '< state'
at the point where your code is added, due to the check at the top of
the function.

Tom



More information about the Java-patches mailing list