Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Statistics of objects in old generation?

Is there any tool to view object statistics on the different generations of a JVM Heap? I'm looking into a potential memory leak and need some data over the different generations. The use case I have is to take a snapshot over object in old generations, wait, and then take another snapshot to compare.

JVisualVM offers statistics over created object, but that doesn't help me much as I don't see whether or not a particular object is being promoted or tenured faster than it should.

Jmap offers statistics over the different generations, but not on an object basis. In that tool I can only see that the old generation is growing...

like image 203
Cowboy Avatar asked Oct 04 '22 21:10

Cowboy


1 Answers

Run your app on Yourkit .It has got generation view tab.You can take snapshots of your heap and compare what objects are still alive between snapshots .

Documentation

Here is an useful answer by @JT .

For more info check this link

like image 177
Imposter Avatar answered Oct 13 '22 12:10

Imposter