打印进程、核心转储文件、远程调试服务的 so内存映射 或者 堆内存的详细信息。
**: jmap 版本要和 程序运行的版本相同，否则会返回类似的错误：
jmap [ options ] pid
jmap [ options ] executable core
jmap [ options ] [ pid ] server-id@ ] remote-hostname-or-IP
The jmap command prints shared object memory maps or heap memory details of a specified process, core file, or remote debug server.
If the specified process is running on a 64-bit Java Virtual Machine (JVM), then you might need to specify the -J-d64 option, for example: jmap -J-d64 -heap pid.
Note: This utility is unsupported and might not be available in future releases of the JDK. On Windows Systems where the dbgeng.dll file is not present, Debugging Tools For Windows must be installed to make these tools work. The PATH environment variable should contain the location of the jvm.dll file that is used by the target process or the location from which the crash dump file was produced, for example: set PATH=%JDK_HOME%\jre\bin\client;%PATH%.
no option is used, the jmap command
prints shared object mappings.
For each shared object loaded in the target JVM, the start address, size of the mapping, and the full path of the shared object file are printed.
This behavior is similar to the Oracle Solaris pmap utility.
-dump:[live,] format=b, file=filename
Java heap in
hprof binary format to filename.
The live suboption is optional, but when specified, only the
active objects in the heap are dumped.
browse the heap dump, you can use the
jhat(1) command to read the generated file.
In addition, the number and size of interned Strings are printed.
For each Java class, the number of objects, memory size in bytes, and the fully qualified class names are printed.
The JVM internal class names are printed with an asterisk (*) prefix.
If the live suboption is specified, then only active objects are counted.
For each class loader, its name, how active it is, address, parent class loader, and the number and size of classes it has loaded are printed.
-F: Force. Use this option with the jmap -dump or jmap -histo option when the pid does not respond. The live suboption is not supported in this mode.
-h/-help: Prints a help message.
-Jflag: Passes flag to the Java Virtual Machine where the jmap command is running.