This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] JVMTI CLASS_PREPARE event


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]