Hotspot Finalizations

Peng Du imdupeng at gmail.com
Fri Feb 27 19:18:33 PST 2009


Hello, everyone

Here is a newbie question: I've added instrumentation code to Hotspot which
will collect some runtime information and print them out before VM shuts
down. Intuitively, I thought "jni_DestroyJavaVM" is a good place to do the
printing. But it did not work as I expected that the printing routine runned
simultaneously while Hotspot was interpreting the Java program. And it kept
working like that even if I move the printing code to the end of that JNI
function. So, the results are obviously incorrect.

I know there are multiple threads in Hotspot. and they die one after another
upon completions of their work. But isn't jni_DestroyJavaVM the ultimate
exit of a VM execution? If not, where should I put my printing routine?
Thanks in advance!


Peng Du
02/27/2009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-dev/attachments/20090227/58445767/attachment.html 


More information about the hotspot-dev mailing list