Name: yyT116575 Date: 12/21/2000
java version "1.3.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)
I'm using JVMPI interface and I discovered the following problem:
JVM_OnLoad function is called after the most of JDK classes are already loaded.
As a result during the application profiling I get JVMPI_EVENT_OBJECT_ALLOC
events which related to classes I can't recognize (I didn't get
JVMPI_EVENT_CLASS_LOAD event for them.
To reproduce the problem do the following:
1. create profiling dll, here the code of the simple profiling dll:
JNIEXPORT jint JNICALL JVM_OnLoad(JavaVM *jvm, char *options, void *reserved)
2. run java with your profiling dll (-Xrun... option) and with -verbose option.
You don't need even java application to be specified to see the problem.
> java -Xrun... -verbose
3. You will see that "Inside JVM_OnLoad..." message will appear after JDK
classes loading messages. Here is example of output:
[Opened C:\Program Files\JavaSoft\JRE\1.3.0_01\lib\rt.jar]
[Opened C:\Program Files\JavaSoft\JRE\1.3.0_01\lib\i18n.jar]
[Opened C:\Program Files\JavaSoft\JRE\1.3.0_01\lib\sunrsasign.jar]
[Loaded java.lang.Object from ...rt.jar]
[Loaded sun.misc.Launcher$3 from ...rt.jar]
[Loaded sun.net.www.protocol.file.Handler from ...rt.jar]
Usage: java [-options] class [args...]
(to execute a class)
or java -jar [-options] jarfile [args...]
(to execute a jar file)
where options include:
-cp -classpath <directories and zip/jar files separated by ;>
set search path for application classes and resources
set a system property
enable verbose output
-version print product version and exit
-showversion print product version and continue
-? -help print this help message
-X print help on non-standard options
[Loaded java.lang.Shutdown$Lock from ...rt.jar]
It's important to mention that "classic" JVM doesn't have this problem (It has
a lot of others :) ).
(Review ID: 114138)