-
Bug
-
Resolution: Won't Fix
-
P4
-
1.3.0, 1.4.0
-
generic, x86
-
generic, windows_2000
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:
#include <jvmpi.h>
#include <jni.h>
JNIEXPORT jint JNICALL JVM_OnLoad(JavaVM *jvm, char *options, void *reserved)
{
printf("Inside JVM_OnLoad...");
return JNI_OK;
}
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]
Inside JVM_OnLoad...
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
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
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)
======================================================================
- relates to
-
CODETOOLS-7900452 JCOV: java.util.EmptyStackException when ec option is 'on' (1.4.0-b90)
-
- Closed
-
-
JDK-4384403 CLASS_LOAD_HOOK events missing for early classes
-
- Closed
-
-
JDK-4288713 JVMPI: DisableGC() in JVM_OnLoad causes VM crash
-
- Closed
-