Search code examples
jvmti

Finding which code allocated large objects in Sun JVM


Is there a feature like Finding which methods allocated large objects for Sun JAVA?

-Xdump:stack:events=allocation,filter=#1k

or

-Xdump:stack:events=allocation,filter=#2m..4m

Solution

  • Also a native way to do this exists via Java agent: code.google.com/p/java-allocation-instrumenter – Martin Jun 6 '13 at 3:26 see also How to find all referrers of an object in Java?