harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weldon Washburn" <weldon...@gmail.com>
Subject [drlvm][threading] H3289 -- some JVMTI questions
Date Fri, 16 Mar 2007 06:45:36 GMT
I thought it would be good to discuss H3289 on dev list instead of buried
inside of the JIRA.  Gregory mentioned in the JIRA that JVMTI needs to be
able to grab the "Lock" instance in Thread.java, do some work, then release
the instance of "Lock".  I think this would require native JVMTI code to
upcall to java code that would do something like:

//java code
void synchronized upcall (int command)  {
    downcall_into_native_C_code_to_do some_JVMTI(command);

The above is rather convoluted.  Maybe a simpler approach would be to use
java.util.concurrent.locks.  The code would look something like:

//native code

upcall java code ---->>    java.util.concurrent.locks.Lock();

----  normal JVMTI C code ----

upcall java code ---->>    java.util.concurrent.locks.Unlock();

Comments on the above?

On another topic, do we really have to use Thread.stop() in the
implementation of vm_shutdown_stop_java_threads() ?  This seems way
too hard.   All we really want to do is give back all the OS resources.  We
could simply call OS kill on each specific thread, return all memory via
"free()", return all file handles, etc.  Note if there was no need to allow
multiple JVMs in a single address space to come and go, we could simplify
the above and basically just call process exit().
Weldon Washburn
Intel Enterprise Solutions Software Division

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message