[RFC] JVMTI CLASS_PREPARE event

Keith Seitz keiths@redhat.com
Wed Jan 24 22:53:00 GMT 2007


Tom Tromey wrote:

> Keith> I welcome suggestions, advice, comments, etc.
> 
> This looks good to me.
> 
> What is it you need to capture here?  Maybe we can suggest a better
> spot.  Though, almost all state transitions happen here, so this is
> pretty good.

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

> Maybe wrap the condition in a builtin_expect?

I'll do that.

> Keith> +	  java::lang::Thread *thread = java::lang::Thread::currentThread ();
> 
> You could hoist the local variable 'self' outside the new scope and
> reuse it.  If you're into micro-optimization and all.

Done.

Keith



More information about the Java-patches mailing list