Is there a way to see what specific objects are in which specific generation (eden, old, etc) in JVM? I am trying to figure out a way to see where exactly which objects are being problematic. I am using JProfiler, recording memory will tell you the live and GCed objects at any point of time, but doesn't tell you which generations the objects are in. Any other tool that tells this? I can't seem to find any such GC debug option also.
On a side note, recording memory with JProfiler seems to be having too much overhead on the application so either I am unable to record memory for a long time (reaches peak memory quickly) or the overhead somehow interferes with/affects the application behavior. Also, recording memory. Any suggestions on this (Am I missing switch to avoid this)? I generally Dynamic Instrumentation option, but as far as I can remember the couple of times I used Sampling also had the same effect.