It would be better to use profiler or similar software for this purpose. You can begin with JVisualVM which is included in JDK or JProfiler. You can also use "Java Mission Control" (newer version of JVisualVM), which allows you to take snapshots of your memory. Add these parameters at startup of your program:
-XX:+UnlockCommercialFeatures
-XX:+FlightRecorder
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010
-Dcom.sun.management.jmxremote.local.only=true
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
It is in the "bin" folder of your JDK 7 too, called: "jmc.exe"