5

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...

Apurv
  • 3,723
  • 3
  • 30
  • 51
Cowboy
  • 515
  • 1
  • 6
  • 13

1 Answers1

4

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

Community
  • 1
  • 1
Imposter
  • 2,666
  • 1
  • 21
  • 31