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.
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-dev