jdk8静态变量存储在哪里(JDK8和JDK11)

JDK 11 中取消了jmap工具 -heap 参数该 jmap 命令行工具打印内存相关统计运行中的VM或核心文件JDK8是正常的如果直接使用jmap -heap 29982,将会得到如下错误:,接下来我们就来聊聊关于jdk8静态变量存储在哪里?以下内容大家不妨参考一二希望能帮到您!

jdk8静态变量存储在哪里(JDK8和JDK11)

jdk8静态变量存储在哪里

JDK 11 中取消了jmap工具 -heap 参数。该 jmap 命令行工具打印内存相关统计运行中的VM或核心文件。JDK8是正常的。如果直接使用jmap -heap 29982,将会得到如下错误:

[root@VM-0-6-centos ~]# jps -l 26363 jdk.jcmd/sun.tools.jps.Jps 29982 /usr/local/nacos/target/nacos-server.jar [root@VM-0-6-centos ~]# jmap -heap 29982 Error: -heap option used Cannot connect to core dump or remote debug server. Use jhsdb jmap instead

需要使用 jhsdb jmap --heap --pid 29982,则可以完整的查看到堆的分配和使用情况。

[root@VM-0-6-centos ~]# jhsdb jmap --heap --pid 29982 Attaching to process ID 29982, please wait... Debugger attached successfully. Server compiler detected. JVM version is 11.0.5 10-LTS using thread-local object allocation. Garbage-First (G1) GC with 4 thread(s) Heap Configuration: MinHeapFreeRatio = 40 MaxHeapFreeRatio = 70 MaxHeapSize = 536870912 (512.0MB) NewSize = 268435456 (256.0MB) MaxNewSize = 268435456 (256.0MB) OldSize = 5452592 (5.1999969482421875MB) NewRatio = 2 SurvivorRatio = 8 MetaspaceSize = 21807104 (20.796875MB) CompressedClassSpaceSize = 1073741824 (1024.0MB) MaxMetaspaceSize = 17592186044415 MB G1HeapRegionSize = 1048576 (1.0MB) Heap Usage: G1 Heap: regions = 512 capacity = 536870912 (512.0MB) used = 181053824 (172.6663818359375MB) free = 355817088 (339.3336181640625MB) 33.72390270233154% used G1 Young Generation: Eden Space: regions = 30 capacity = 281018368 (268.0MB) used = 31457280 (30.0MB) free = 249561088 (238.0MB) 11.194029850746269% used Survivor Space: regions = 1 capacity = 1048576 (1.0MB) used = 1048576 (1.0MB) free = 0 (0.0MB) 100.0% used G1 Old Generation: regions = 142 capacity = 254803968 (243.0MB) used = 148547968 (141.6663818359375MB) free = 106256000 (101.3336181640625MB) 58.29892256622942% used

,

免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

    分享
    投诉
    首页