Get a heap dump in HPROF binary format using jmap or the new HotSpotDiagnostic MBean through JConsole if your Java application is running on JDK 6 and then analyze it with the jhat tool in JDK 6 or the new HeapWalker in NetBeans 6. NetBeans 6 can also be used to get a heap dump.
For more detailed info have a look at the Hands-On Lab I presented at JavaOne 2007 about troubleshooting Java applications:
http://developers.sun.com/learning/javaoneonline/sessions/hol2007/1420/jmxjconsole/index.html#Exercise_2_5
Regards,
Luis-Miguel Alventosa
Java SE JMX/JConsole development team
Sun Microsystems, Inc.
http://blogs.sun.com/lmalventosa/
Hi lmalvent,
Thanks for your e-mail.
I heard about HPROF binary format and jmap tool in JDK6. Is it possible to use 100% pure java to track the size of objects in JVM. I use java interactive profiler (JIP) to track CPU usage of methods in a thread. Similarly, i want to see how objects in an applications uses memory in JVM.
Is this possible?