Options and default values |
Default and limit |
Description |
-XX:-CITime |
1.4. Enabled by default |
Print the JIT compiler Compilation Time. |
-XX: ErrorFile =./hs_err_pid <pid>. log |
Java 6 Introduction. |
If JVM crashed is used, the error log is output to the specified file path. |
-XX:-ExtendedDTraceProbes |
Introduced in Java 6, limited to solaris Disabled by default |
Enable dtrace diagnosis. |
-XX: HeapDumpPath =./java_pid <pid>. hprof |
The default value is the java Process startup location, that is, user. dir. |
Path of the storage file of the heap memory snapshot. What is a heap memory snapshot? When the java Process is forcibly terminated by OS due to OOM or crash, a Heap memory snapshot file in hprof (Heap PROFling) format is generated. This file is used for offline debugging, diagnosis, and troubleshooting. The file name is generally Java _ <pid >_< date >_< time> _ heapDump. hprof You can use tools such as jhat, eclipse mat, and GDB to parse snapshot files. |
-XX:-heapdumponoutofmemoryerror |
1.4.2 update12 and 5.0 Update 7 are introduced. Disabled by default |
At Oom, a dump. Core File is output to record the current heap memory snapshot (what is a heap memory snapshot? See-XX: Description of heapdumppath ). |
-XX: onerror = "<cmd ARGs>; <cmd ARGs>" |
1.4.2 update 9 Introduction |
When Java throws an error, it runs the specified command line instruction set. The Instruction Set is related to the OS environment. In Linux, most of them are Bash scripts and DOS batch processing in windows. |
-XX: onoutofmemoryerror = "<cmd ARGs>; <Cmd ARGs>" |
1.4.2 introduced during update 12 and java6 |
When OOM occurs for the first time, run the specified command line instruction set. The Instruction Set is related to the OS environment. In Linux, most of them are Bash scripts and DOS batch processing in windows. |
-XX:-printclasshistogram |
Disabled by default |
In Windows, press Ctrl-break or run kill-3 in Linux to print the class bar chart when the sigquit signal is sent. Jmap-histo PID also implements the same function. See http://java.sun.com/javase/6/docs/technotes/tools/share/jmap.html |
-XX:-printconcurrentlocks |
Disabled by default |
Print the lock status of Java. util. Concurrent while thread dump. Jstack-l PID also implements the same function. See http://java.sun.com/javase/6/docs/technotes/tools/share/jstack.html |
-XX:-printcommandlineflags |
5.0 introduced. disabled by default |
When Java is started, it prints the currently enabled non-steady JVM options to stdout. For example: -XX: + useconcmarksweepgc-XX: + heapdumponoutofmemoryerror-XX: + doescapeanalysis |
-XX:-printcompilation |
Disabled by default |
Print the information of the stdout method during JIT compilation. For example: 1 java. Lang. String: charat (33 bytes) |
-XX:-printgc |
Disabled by default |
Enable GC log printing. The print format is as follows: [Full GC 131115 K-> 7482 K (1015808 K), 0.1633180 secs] This option can be dynamically enabled through COM. Sun. Management. hotspotdiagnosticmxbean API and jconsole. See http://java.sun.com/developer/technicalArticles/J2SE/monitoring/#Heap_Dump |
-XX:-printgcdetails |
Introduced in 1.4.0, disabled by default |
Print GC recovery details. The print format is as follows: [Full GC (system) [tenured: 0 k-> 2394 K (466048 K), 0.0624140 secs] 30822 K-> 2394 K (518464 K), [perm: 10443 K-> 10443 K (16384 K)], 0.0625410 secs] [times: User = 0.05 sys = 0.01, real = 0.06 secs] This option can be dynamically enabled through COM. Sun. Management. hotspotdiagnosticmxbean API and jconsole. See http://java.sun.com/developer/technicalArticles/J2SE/monitoring/#Heap_Dump |
-XX:-printgctimestamps |
Disabled by default |
Print GC pause time. The print format is as follows: 2.744: [Full GC (System) 2.744: [Tenured: 0 K-> 2441 K (466048 K), 0.0598400 secs] 31754 K-> 2441 K (518464 K), [Perm: 10717 K-> 10717 K (16384 K)], 0.0599570 secs] [Times: user = 0.06 sys = 0.00, real = 0.06 Secs] This option can be dynamically enabled through com. sun. management. HotSpotDiagnosticMXBean API and Jconsole. See http://java.sun.com/developer/technicalArticles/J2SE/monitoring/#Heap_Dump |
-XX:-PrintTenuringDistribution |
Disabled by default |
Prints the object lifecycle information. The print format is as follows: [GC Desired primary vor size 4653056 bytes, new threshold 32 (max 32) -Age 1: 2330640 bytes, 2330640 total -Age 2: 9520 bytes, 2340160 total 204009 K-> 21850 K (515200 K), 0.1563482 secs] Age1 2 indicates the size of objects that survive after GC of 1st and 2. |
-XX:-TraceClassLoading |
Disabled by default |
Print the class load information to stdout. Record the Loaded status. For example: [Loaded java. lang. Object from/opt/taobao/install/jdk1.6.0 _ 07/jre/lib/rt. jar] |
-XX:-TraceClassLoadingPreorder |
1.4.2 introduced, disabled by default |
Print the class loading information to stdout according to the class reference/dependency sequence. Unlike TraceClassLoading, this option only records the Loading status. For example: [Loading java. lang. Object from/home/confsrv/jdk1.6.0 _ 14/jre/lib/rt. jar] |
-XX:-TraceClassResolution |
1.4.2 introduced, disabled by default |
Print the reference positions of all static classes and constants. Used for debug. For example: RESOLVE java. util. HashMap java. util. HashMap $ Entry HashMap. java: 209 The 209 rows of the HashMap class reference the static class java. util. HashMap $ Entry. |
-XX:-TraceClassUnloading |
Disabled by default |
Print the uninstall information of the class to stdout. Unloaded status. |
-XX:-TraceLoaderConstraints |
Introduced in Java 6, disabled by default |
Print the information about the class loading policy changes to stdout. For example: [Adding new constraint for name: java/lang/String, loader [0]: sun/misc/Launcher $ ExtClassLoader, loader [1]: <bootloader>] [Setting class object in existing constraint for name: [Ljava/lang/Object; and loader sun/misc/Launcher $ ExtClassLoader] [Updating constraint for name org/xml/sax/InputSource, loader <bootloader>, by setting class object] [Extending constraint for name java/lang/Object by adding loader [15]: sun/reflect/DelegatingClassLoader] Loading policy changes are key technologies for implementing classloader isolation/namespace consistency. For more information, see contraint rules in http://kenwublog.com/docs/Dynamic+Class+Loading+in+the+Java+Virtual+Machine.pdf. |
-XX: + PerfSaveDataToFile |
Enabled by default |
When the java Process is forcibly terminated due to OOM or crashed, a heap snapshot file is generated (what is a heap memory snapshot? See-XX: Description of HeapDumpPath ). |