Package com.jalios.jcms.test
Class HeapDumper
- java.lang.Object
-
- com.jalios.jcms.test.HeapDumper
-
public class HeapDumper extends java.lang.ObjectUtiliy class to dump the HEAP memory of the current JVM for easier debugging of memory related problems (eg : memory leak)
-
-
Constructor Summary
Constructors Constructor Description HeapDumper()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voiddumpHeap(java.io.File file)Deprecated.usedumpHeap(String, boolean)insteadstatic voiddumpHeap(java.lang.String fileName, boolean live)Call this method from your application whenever you want to dump the heap snapshot into a file.static voidmain(java.lang.String[] args)
-
-
-
Method Detail
-
dumpHeap
@Deprecated public static void dumpHeap(java.io.File file) throws java.lang.ExceptionDeprecated.usedumpHeap(String, boolean)insteadCall this method you want to dump the heap snapshot into a file.- Parameters:
file- a File in which to do the heap dump, must not be null- Throws:
java.lang.Exception- if the dump could not be performed
-
dumpHeap
public static void dumpHeap(java.lang.String fileName, boolean live)Call this method from your application whenever you want to dump the heap snapshot into a file.- Parameters:
fileName- name of the heap dump filelive- flag that tells whether to dump only the live objects
-
main
public static void main(java.lang.String[] args)
-
-