Hotspot Finalizations

Peng Du imdupeng at
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
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the hotspot-dev mailing list