Find long lived objects given two heap dumps

Questions about YourKit Java Profiler
Post Reply
gbatumbya
Posts: 1
Joined: Mon Sep 15, 2014 8:34 pm

Find long lived objects given two heap dumps

Post by gbatumbya »

Hi,
Given two memory dumps taken at different intervals, is it possible to see which instances exist in both dumps? (This instances would be considered long living)

I think this would be useful to investigate cases where the JVM keeps releasing less and less memory on subsequent GC cycles.

Thank you.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Find long lived objects given two heap dumps

Post by Anton Katilin »

You can compare two memory snapshots:
http://www.yourkit.com/docs/java/help/c ... pshots.jsp

Please note that the snapshot comparison will give only object difference statistics. There is no reliable way to identify objects across snapshots because there is no persistent object ID in JVM.

To identify particular objects please use the Generations feature instead:
http://www.yourkit.com/docs/java/help/generations.jsp
Post Reply