java - Tool to view objects in permgen -
i have problems permgen overflow. tools can use view classes loaded permgen , how memory use? thanks.
maybe have large code base or interning lots of strings.
try jmap
:
jmap -permstat <pid>
(note: permstat
option not available in windows)
example:
$ jmap -permstat 22982 attaching process id 22982, please wait... debugger attached successfully. server compiler detected. jvm version 17.0-b16 100691 intern strings occupying 5641096 bytes. finding class loader instances ..finding object size using printezis bits , skipping over... done. computing per loader stat ..done. please wait.. computing liveness..done. class_loader classes bytes parent_loader alive? type <bootstrap> 303 1355992 null live <internal> 0xdd159fe8 9 94104 0xdd153c30 live sun/misc/launcher$appclassloader@0xae7fcfa0 0xdd153c30 0 0 null live sun/misc/launcher$extclassloader@0xae7b0178 total = 3 312 1450096 n/a alive=3, dead=0 n/a
you can try dumping heap file , loading eclipse memory analyser, give useful information such leak suspects report , dominator tree.
jmap -dump:format=b,file=heap.bin 22982
if necessary, can increase permgen space using -xx:maxpermsize
jvm option.
Comments
Post a Comment