I am using Mustang(jdk6) to do heap walking, could anyone give some idear:)

I would like to get all the objects in the current heap of JVM, I can connect to the vm, but I checked the api of jdk6(jdi), I could not find any methods which can do this. Looking for your help....
[205 byte] By [ChinaGirla] at [2007-10-3 9:37:12]
# 1
I doubt you can do that directly in java. But I haven't researched it.You can start here.... http://java.sun.com/j2se/1.5.0/docs/guide/jpda/index.html
jschella at 2007-7-15 4:52:48 > top of Java-index,Archived Forums,Debugging Tools and Techniques...
# 2
we should be able to do that in java, see the following link, http://download.java.net/jdk6/docs/technotes/guides/jpda/enhancements.htmljust wonder if anybody could give me a example
ChinaGirla at 2007-7-15 4:52:48 > top of Java-index,Archived Forums,Debugging Tools and Techniques...
# 3

Since jdk6, JDI has some limited heap walking capabilities. If you are looking to build a memory profiler then you probably should be looking at JVM TI:

http://download.java.net/jdk6/docs/platform/jvmti/jvmti.html#Heap

Alternatively, you are looking for a tool to view the objects then jmap utility in jdk6 might be useful. The -histo option will give you a class-wise histogram of the options in the heap, and the -dump option allows you to take a heap dump.

alan.batemana at 2007-7-15 4:52:48 > top of Java-index,Archived Forums,Debugging Tools and Techniques...