JVMPI class load event problem

From: rohan (nrohan_at_gmail.com)
Date: 10/28/04


Date: 28 Oct 2004 06:59:07 -0700

Hi

I'm trying to write a simple profiler using JVM Profiler Interface to
display classes loaded while running my application.
For this, I have registered callback to notify two events
JVMPI_EVENT_CLASS_LOAD and JVMPI_EVENT_CLASS_LOAD_HOOK.
Now the problem is that, for some system classes which are loaded
initialy(during JVM initialization) I'm not getting
JVMPI_EVENT_CLASS_LOAD_HOOK event. However JVMPI_EVENT_CLASS_LOAD gets
called for each of them. ( I want .._LOAD_HOOK for all classes)

I gone through some documents/links which says that
JVMPI_EVENT_CLASS_LOAD_HOOK will be sent only after
JVMPI_EVENT_JVM_INIT_DONE event is sent.

I want JVMPI_EVENT_CLASS_LOAD_HOOK event for all classes, even they
are loaded before JVM initialization is complete.

Is there any way to achieve this? Any work arround?

I'm using Sun J2SDK 1.4.2.

Thanks in advance
Rohan