Hotspot Finalizations

Peng Du imdupeng at gmail.com
Fri Feb 27 20:24:02 PST 2009


Never mind. For the record, before_exit() in java.cpp is the right place.

Thanks

Peng Du


On Fri, Feb 27, 2009 at 9:18 PM, Peng Du <imdupeng at gmail.com> wrote:

> 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/f74735de/attachment.html 


More information about the hotspot-dev mailing list