The use of Jmap can be used to:
Official Document Http://docs.oracle.com/javase/6/docs/technotes/tools/share/jmap.html
and this blog http://blog.csdn.net/fenglibing/article/details/6411953
This article is mainly about the Jmap often use several of the parameters as their own memo. Note that if you are using a 64-bit JVM, you need to add-j-d64 when using Jmap
1. Print the number of instances of each class, memory consumption, class full name information. Live sub-parameters, counting only the number of live objects.
> Jmap-histo:live 6824
Num #instances #bytes class name---------------------------------------------- 1: 1232 238144 [C 2: 414 48184 <constMethodKlass> 3: 32712 [B ] 4: 414 29864 <methodKlass> 5: 29512 <constantPoolKlass> 6: 1084 26016 java.lang.String
2, print the permanent generation of ClassLoader related information
>jmap-permstat 6824
Class_loader Classes bytes Parent_loader alive? type<bootstrap> 382 1684072 null live <internal>0x2a3a7fe0 0 0 Null live sun/misc/[email protected]0x2a3aa748 6 51592 0x2a3a7fe0 Live sun/ Misc/[email protected]
3, display of memory allocation and usage, for understanding the JVM memory allocation is very practical,displays information about the memory of the young generation, the old age, and the permanent generation.
>jmap-heap 6824
Using Thread-local object allocation. Mark Sweep Compact gcheap Configuration: minheapfreeratio = 40
4, the most frequently used to get memory dump
Can participate in http://blog.csdn.net/aitangyong/article/details/24012535 this blog
Use of the Jmap command (Java Memory Map)