HP (Hewlett-Packard) 5992-1918 TV Antenna User Manual


 
Figure 1-19 visualgc
Survivor Age Histogram
Window
When the Java VM is started with the Parallel Young GC option (-XX:+UseParallelGC), the
Survivor Age Histogram window is not displayed because the Parallel Young collector does not
maintain a survivor age histogram since it applies a different policy for maintaining objects in
the survivor spaces.
1.24 -Xcheck:jni
The -Xcheck:jni option is useful when trying to diagnose problems with applications that
use the Java Native Interface (JNI). Sometimes there are bugs in the native code that cause the
Java VM to crash or behave incorrectly. Add the -Xcheck:jni option to the command line
when starting the application. For example:
java -Xcheck:jni MyApplication
The -Xcheck:jni tells the Java VM to do additional validation on the arguments passed to JNI
functions. This option may not find all invalid arguments or diagnose logic bugs in the application
code; however, it can help diagnose these types of problems.
When an invalid argument is detected, the Java VM prints a message to the application console
(standard output), prints the stack trace of the offending thread, and aborts the Java VM. Following
is an example where a NULL is incorrectly passed to a JNI function that does not allow NULL:
FATAL ERROR in native method: Null object passed to JNI
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:343)
- locked <0x450b9f70> (a java.net.PlainSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:439)
at java.net.ServerSocket.accept(ServerSocket.java:410)
at org.apache.tomcat.service.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:286)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:402)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:536)
Following is another example of output that is displayed when something other than a jfieldID
is provided to a JNI function that expects a jfieldID:
FATAL ERROR in native method: Instance field not found in JNI get/set field operations
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
- locked <0xf082f290> (a java.net.PlainSocketImpl)
at java.net.ServerSocket.bind(ServerSocket.java:318)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at jvm003a.<init>(jvm003.java:190)
at jvm003a.<init>(jvm003.java:151)
at jvm003.run(jvm003.java:51)
at jvm003.main(jvm003.java:30)
Following are some types of problems that -Xcheck:jni can help diagnose:
The JNI environment for the wrong thread is used
An invalid JNI reference is used
A reference to a non-array type is provided to a function that requires an array type
A non-static field ID is provided to a function that expects a static field ID
A JNI call is made with an exception pending
1.24 -Xcheck:jni 45