From 8626a0c49fcb5f22b9052d827ab5cafa69f699ac Mon Sep 17 00:00:00 2001
Date: Mon, 11 May 2026 14:34:23 +0800
Subject: 8319948: jcmd man page needs to be updated
src/jdk.jcmd/share/man/jcmd.1 | 313 +++++++++++++++++++++++-----------
1 file changed, 216 insertions(+), 97 deletions(-)
@@ -164,6 +164,23 @@ The following \f[I]options\f[R] must be specified using either
\f[V]-all\f[R]: (Optional) Show help for all commands (BOOLEAN, false) .
.RE
.TP
+\f[V]Compiler.CodeHeap_Analytics\f[R] [\f[I]function\f[R]] [\f[I]granularity\f[R]]
+Print CodeHeap analytics
+.RS
+.PP
+Impact: Low: Depends on code heap size and content.
+Holds CodeCache_lock during analysis step, usually sub-second duration.
+.PP
+\f[I]arguments\f[R]:
+.PP
+\f[I]function\f[R]: (Optional) Function to be performed (aggregate,
+UsedSpace, FreeSpace, MethodCount, MethodSpace, MethodAge, MethodNames,
+discard (STRING, all)
+.PP
+\f[I]granularity\f[R]: (Optional) Detail level - smaller value -> more
+detail (INT, 4096)
+.RE
+.TP
\f[V]Compiler.codecache\f[R]
Prints code cache layout and bounds.
.RS
@@ -178,58 +195,71 @@ Prints all compiled methods in code cache that are alive.
Impact: Medium
.RE
.TP
-\f[V]Compiler.perfmap\f[R] [\f[I]arguments\f[R]] (Linux only)
-Write map file for Linux perf tool.
+\f[V]Compiler.directives_add\f[R] \f[I]arguments\f[R]
+Adds compiler directives from a file.
.RS
.PP
Impact: Low
.PP
\f[I]arguments\f[R]:
-.IP \[bu] 2
-\f[V]filename\f[R]: (Optional) Name of the map file (STRING, no default
-value)
.PP
-If \f[V]filename\f[R] is not specified, a default file name is chosen
-using the pid of the target JVM process.
-For example, if the pid is \f[V]12345\f[R], then the default
-\f[V]filename\f[R] will be \f[V]/tmp/perf-12345.map\f[R].
+\f[I]filename\f[R]: The name of the directives file (STRING, no default
+value)
.RE
.TP
-\f[V]Compiler.queue\f[R]
-Prints methods queued for compilation.
+\f[V]Compiler.directives_clear\f[R]
+Remove all compiler directives.
.RS
.PP
Impact: Low
.RE
.TP
-\f[V]Compiler.directives_add *filename* *arguments*\f[R]
-Adds compiler directives from a file.
+\f[V]Compiler.directives_print\f[R]
+Prints all active compiler directives.
.RS
.PP
Impact: Low
-.PP
-\f[I]arguments\f[R]:
-.PP
-\f[I]filename\f[R]: The name of the directives file (STRING, no default
-value)
.RE
.TP
-\f[V]Compiler.directives_clear\f[R]
-Remove all compiler directives.
+\f[V]Compiler.directives_remove\f[R]
+Remove latest added compiler directive.
.RS
.PP
Impact: Low
.RE
.TP
-\f[V]Compiler.directives_print\f[R]
-Prints all active compiler directives.
+\f[V]Compiler.memory\f[R] [\f[I]options\f[R]]
+Print compilation footprint
+.RS
+.PP
+Impact: Medium: Pause time depends on number of compiled methods
+.PP
+\f[B]Note:\f[R]
+.PP
+The \f[I]options\f[R] must be specified using either \f[I]key\f[R] or
+\f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax.
+.PP
+\f[I]options\f[R]:
+.IP \[bu] 2
+\f[V]-H\f[R]: (Optional) Human readable format (BOOLEAN, false)
+.IP \[bu] 2
+\f[V]-s\f[R]: (Optional) Minimum memory size (MEMORY SIZE, 0)
+.RE
+.TP
+\f[V]Compiler.perfmap\f[R] [\f[I]arguments\f[R]] (Linux only)
+Write map file for Linux perf tool.
.RS
.PP
Impact: Low
+.PP
+\f[I]arguments\f[R]:
+.PP
+\f[I]filename\f[R]: (Optional) The name of the map file (STRING, no
+default value)
.RE
.TP
-\f[V]Compiler.directives_remove\f[R]
-Remove latest added compiler directive.
+\f[V]Compiler.queue\f[R]
+Prints methods queued for compilation.
.RS
.PP
Impact: Low
@@ -291,6 +321,12 @@ gzipped format using the given compression level.
.IP \[bu] 2
\f[V]-overwrite\f[R]: (Optional) If specified, the dump file will be
overwritten if it exists (BOOLEAN, false)
+.IP \[bu] 2
+\f[V]-parallel\f[R]: (Optional) Number of parallel threads to use for
+heap dump.
+The VM will try to use the specified number of threads, but might use
+fewer.
+(INT, 1)
.PP
\f[I]arguments\f[R]:
.IP \[bu] 2
@@ -354,6 +390,11 @@ If no parameters are entered, the current settings are displayed.
.PP
\f[I]options\f[R]:
.IP \[bu] 2
+\f[V]dumppath\f[R]: (Optional) Path to the location where a recording
+file is written in case the VM runs into a critical error, such as a
+system crash.
+(STRING, The default location is the current directory)
+.IP \[bu] 2
\f[V]globalbuffercount\f[R]: (Optional) Number of global buffers.
This option is a legacy option: change the \f[V]memorysize\f[R]
parameter to alter the number of global buffers.
@@ -700,7 +741,7 @@ Impact: Low
.RE
.TP
\f[V]JVMTI.data_dump\f[R]
-Signals the JVM to do a data-dump request for JVMTI.
+Signal the JVM to do a data-dump request for JVMTI.
.RS
.PP
Impact: High
@@ -816,8 +857,45 @@ Stops the remote management agent.
Impact: Low --- no impact
.RE
.TP
+\f[V]System.dump_map\f[R] [\f[I]options\f[R]] (Linux only)
+Dumps an annotated process memory map to an output file.
+.RS
+.PP
+Impact: Low
+.PP
+\f[B]Note:\f[R]
+.PP
+The following \f[I]options\f[R] must be specified using either
+\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax.
+.PP
+\f[I]options\f[R]:
+.IP \[bu] 2
+\f[V]-H\f[R]: (Optional) Human readable format (BOOLEAN, false)
+.IP \[bu] 2
+\f[V]-F\f[R]: (Optional) File path (STRING,
+\[dq]vm_memory_map_.txt\[dq])
+.RE
+.TP
+\f[V]System.map\f[R] [\f[I]options\f[R]] (Linux only)
+Prints an annotated process memory map of the VM process.
+.RS
+.PP
+Impact: Low
+.PP
+\f[B]Note:\f[R]
+.PP
+The following \f[I]options\f[R] must be specified using either
+\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax.
+.PP
+\f[I]options\f[R]:
+.IP \[bu] 2
+\f[V]-H\f[R]: (Optional) Human readable format (BOOLEAN, false)
+.RE
+.TP
\f[V]System.native_heap_info\f[R] (Linux only)
-Prints information about native heap usage through malloc_info(3).
+Attempts to output information regarding native heap usage through
+malloc_info(3).
+If unsuccessful outputs \[dq]Error: \[dq] and a reason.
.RS
.PP
Impact: Low
@@ -830,6 +908,31 @@ Attempts to free up memory by trimming the C-heap.
Impact: Low
.RE
.TP
+\f[V]Thread.dump_to_file\f[R] [\f[I]options\f[R]] \f[I]filepath\f[R]
+Dump threads, with stack traces, to a file in plain text or JSON format.
+.RS
+.PP
+Impact: Medium: Depends on the number of threads.
+.PP
+\f[B]Note:\f[R]
+.PP
+The following \f[I]options\f[R] must be specified using either
+\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax.
+.PP
+\f[I]options\f[R]:
+.IP \[bu] 2
+\f[V]-overwrite\f[R]: (Optional) May overwrite existing file (BOOLEAN,
+false)
+.IP \[bu] 2
+\f[V]-format\f[R]: (Optional) Output format (\[dq]plain\[dq] or
+\[dq]json\[dq]) (STRING, plain)
+.PP
+\f[I]arguments\f[R]:
+.IP \[bu] 2
+\f[V]filepath\f[R]: The file path to the output file (STRING, no default
+value)
+.RE
+.TP
\f[V]Thread.print\f[R] [\f[I]options\f[R]]
Prints all threads with stacktraces.
.RS
@@ -851,7 +954,7 @@ false)
.RE
.TP
\f[V]VM.cds\f[R] [\f[I]arguments\f[R]]
-Dumps a static or dynamic shared archive that includes all currently
+Dump a static or dynamic shared archive that includes all currently
loaded classes.
.RS
.PP
@@ -877,78 +980,98 @@ If \f[V]dynamic_dump\f[R] is specified, the target JVM must be started
with the JVM option \f[V]-XX:+RecordDynamicDumpInfo\f[R].
.RE
.TP
-\f[V]VM.classloaders\f[R] [\f[I]options\f[R]]
-Prints classloader hierarchy.
+\f[V]VM.class_hierarchy\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]]
+Print a list of all loaded classes, indented to show the class
+hierarchy.
+The name of each class is followed by the ClassLoaderData* of its
+ClassLoader, or \[dq]null\[dq] if it is loaded by the bootstrap class
+loader.
.RS
.PP
-Impact: Medium --- Depends on number of class loaders and classes
-loaded.
+Impact: Medium --- depends on the number of loaded classes.
+.PP
+\f[B]Note:\f[R]
.PP
The following \f[I]options\f[R] must be specified using either
\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax.
.PP
\f[I]options\f[R]:
.IP \[bu] 2
-\f[V]show-classes\f[R]: (Optional) Print loaded classes.
+\f[V]-i\f[R]: (Optional) Inherited interfaces should be printed.
(BOOLEAN, false)
.IP \[bu] 2
-\f[V]verbose\f[R]: (Optional) Print detailed information.
+\f[V]-s\f[R]: (Optional) If a classname is specified, print its
+subclasses in addition to its superclasses.
+Without this option only the superclasses will be printed.
(BOOLEAN, false)
+.PP
+\f[I]arguments\f[R]:
.IP \[bu] 2
-\f[V]fold\f[R]: (Optional) Show loaders of the same name and class as
-one.
-(BOOLEAN, true)
+\f[I]classname\f[R]: (Optional) The name of the class whose hierarchy
+should be printed.
+If not specified, all class hierarchies are printed.
+(STRING, no default value)
+.RE
+.TP
+\f[V]VM.classes\f[R] [\f[I]options\f[R]]
+Print all loaded classes
+.RS
+.PP
+Impact: Medium: Depends on number of loaded classes.
+.PP
+The following \f[I]options\f[R] must be specified using either
+\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax.
+.PP
+\f[I]options\f[R]:
+.IP \[bu] 2
+\f[V]-verbose\f[R]: (Optional) Dump the detailed content of a Java
+class.
+Some classes are annotated with flags: \f[V]F\f[R] = has, or inherits, a
+non-empty finalize method, \f[V]f\f[R] = has final method, \f[V]W\f[R] =
+methods rewritten, \f[V]C\f[R] = marked with \f[V]\[at]Contended\f[R]
+annotation, \f[V]R\f[R] = has been redefined, \f[V]S\f[R] = is shared
+class (BOOLEAN, false)
.RE
.TP
\f[V]VM.classloader_stats\f[R]
-Prints statistics about all ClassLoaders.
+Print statistics about all ClassLoaders.
.RS
.PP
Impact: Low
.RE
.TP
-\f[V]VM.class_hierarchy\f[R] [\f[I]options\f[R]] [\f[I]arguments\f[R]]
-Prints a list of all loaded classes, indented to show the class
-hierarchy.
-The name of each class is followed by the ClassLoaderData* of its
-ClassLoader, or \[dq]null\[dq] if it is loaded by the bootstrap class
-loader.
+\f[V]VM.classloaders\f[R] [\f[I]options\f[R]]
+Prints classloader hierarchy.
.RS
.PP
-Impact: Medium --- depends on the number of loaded classes.
-.PP
-\f[B]Note:\f[R]
+Impact: Medium --- Depends on number of class loaders and classes
+loaded.
.PP
The following \f[I]options\f[R] must be specified using either
\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax.
.PP
\f[I]options\f[R]:
.IP \[bu] 2
-\f[V]-i\f[R]: (Optional) Inherited interfaces should be printed.
+\f[V]show-classes\f[R]: (Optional) Print loaded classes.
(BOOLEAN, false)
.IP \[bu] 2
-\f[V]-s\f[R]: (Optional) If a classname is specified, print its
-subclasses in addition to its superclasses.
-Without this option only the superclasses will be printed.
+\f[V]verbose\f[R]: (Optional) Print detailed information.
(BOOLEAN, false)
-.PP
-\f[I]arguments\f[R]:
.IP \[bu] 2
-\f[I]classname\f[R]: (Optional) The name of the class whose hierarchy
-should be printed.
-If not specified, all class hierarchies are printed.
-(STRING, no default value)
+\f[V]fold\f[R]: (Optional) Show loaders of the same name and class as
+one.
+(BOOLEAN, true)
.RE
.TP
\f[V]VM.command_line\f[R]
-Prints the command line used to start this VM instance.
+Print the command line used to start this VM instance.
.RS
.PP
Impact: Low
.RE
.TP
\f[V]VM.dynlibs\f[R]
-Prints the loaded dynamic libraries.
+Print loaded dynamic libraries.
.RS
.PP
Impact: Low
@@ -977,8 +1100,25 @@ If omitted, all events are printed.
(STRING, no default value)
.RE
.TP
+\f[V]VM.flags\f[R] [\f[I]options\f[R]]
+Print the VM flag options and their current values.
+.RS
+.PP
+Impact: Low
+.PP
+\f[B]Note:\f[R]
+.PP
+The following \f[I]options\f[R] must be specified using either
+\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax.
+.PP
+\f[I]options\f[R]:
+.IP \[bu] 2
+\f[V]-all\f[R]: (Optional) Prints all flags supported by the VM
+(BOOLEAN, false).
+.RE
+.TP
\f[V]VM.info\f[R]
-Prints information about the JVM environment and status.
+Print information about the JVM environment and status.
.RS
.PP
Impact: Low
@@ -1023,23 +1163,6 @@ configuration.
(BOOLEAN, no default value)
.RE
.TP
-\f[V]VM.flags\f[R] [\f[I]options\f[R]]
-Prints the VM flag options and their current values.
-.RS
-.PP
-Impact: Low
-.PP
-\f[B]Note:\f[R]
-.PP
-The following \f[I]options\f[R] must be specified using either
-\f[I]key\f[R] or \f[I]key\f[R]\f[V]=\f[R]\f[I]value\f[R] syntax.
-.PP
-\f[I]options\f[R]:
-.IP \[bu] 2
-\f[V]-all\f[R]: (Optional) Prints all flags supported by the VM
-(BOOLEAN, false).
-.RE
-.TP
\f[V]VM.metaspace\f[R] [\f[I]options\f[R]]
Prints the statistics for the metaspace
.RS
@@ -1074,6 +1197,10 @@ classes for each loader.
space.
(BOOLEAN, false)
.IP \[bu] 2
+\f[V]chunkfreelist\f[R]: (Optional) Shows details about global chunk
+free lists (ChunkManager).
+(BOOLEAN, false)
+.IP \[bu] 2
\f[V]scale\f[R]: (Optional) Memory usage in which to scale.
Valid values are: 1, KB, MB or GB (fixed scale) or \[dq]dynamic\[dq] for
a dynamically chosen scale.
@@ -1081,7 +1208,7 @@ a dynamically chosen scale.
.RE
.TP
\f[V]VM.native_memory\f[R] [\f[I]options\f[R]]
-Prints native memory usage
+Print native memory usage
.RS
.PP
Impact: Medium
@@ -1123,16 +1250,8 @@ purpose.
(STRING, KB)
.RE
.TP
-\f[V]VM.print_touched_methods\f[R]
-Prints all methods that have ever been touched during the lifetime of
-this JVM.
-.RS
-.PP
-Impact: Medium --- depends on Java content.
-.RE
-.TP
\f[V]VM.set_flag\f[R] [\f[I]arguments\f[R]]
-Sets the VM flag option by using the provided value.
+Sets VM flag option using the provided value.
.RS
.PP
Impact: Low
@@ -1147,7 +1266,7 @@ no default value)
.RE
.TP
\f[V]VM.stringtable\f[R] [\f[I]options\f[R]]
-Dumps the string table.
+Dump string table.
.RS
.PP
Impact: Medium --- depends on the Java content.
@@ -1164,7 +1283,7 @@ table (BOOLEAN, false)
.RE
.TP
\f[V]VM.symboltable\f[R] [\f[I]options\f[R]]
-Dumps the symbol table.
+Dump symbol table.
.RS
.PP
Impact: Medium --- depends on the Java content.
@@ -1180,6 +1299,13 @@ The following \f[I]options\f[R] must be specified using either
table (BOOLEAN, false)
.RE
.TP
+\f[V]VM.system_properties\f[R]
+Print system properties.
+.RS
+.PP
+Impact: Low
+.RE
+.TP
\f[V]VM.systemdictionary\f[R]
Prints the statistics for dictionary hashtable sizes and bucket length.
.RS
@@ -1197,15 +1323,8 @@ The following \f[I]options\f[R] must be specified using either
for all class loaders (BOOLEAN, false) .
.RE
.TP
-\f[V]VM.system_properties\f[R]
-Prints the system properties.
-.RS
-.PP
-Impact: Low
-.RE
-.TP
\f[V]VM.uptime\f[R] [\f[I]options\f[R]]
-Prints the VM uptime.
+Print VM uptime.
.RS
.PP
Impact: Low
@@ -1222,7 +1341,7 @@ The following \f[I]options\f[R] must be specified using either
.RE
.TP
\f[V]VM.version\f[R]
-Prints JVM version information.
+Print JVM version information.
.RS
.PP
Impact: Low
--
2.17.1