Package com.ibm.wala.util.heapTrace
Class HeapTracer
- java.lang.Object
-
- com.ibm.wala.util.heapTrace.HeapTracer
-
public class HeapTracer extends Object
Simple utility that uses reflection to trace memory
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classHeapTracer.Result
-
Constructor Summary
Constructors Constructor Description HeapTracer(Collection<?> c, boolean traceStatics)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidanalyzeLeaks()static voidanalyzeLeaks(boolean traceStatics)Trace the heap and dump the output to the tracefilestatic voidmain(String[] args)HeapTracer.Resultperform()Trace the heap and return the resultsstatic HeapTracer.ResulttraceHeap(Collection<?> instances, boolean traceStatics)Trace the heap and dump the output to the tracefile
-
-
-
Constructor Detail
-
HeapTracer
public HeapTracer(Collection<?> c, boolean traceStatics)
-
-
Method Detail
-
main
public static void main(String[] args)
-
perform
public HeapTracer.Result perform() throws ClassNotFoundException, IllegalArgumentException, IllegalAccessException
Trace the heap and return the results
-
analyzeLeaks
public static void analyzeLeaks()
-
analyzeLeaks
public static void analyzeLeaks(boolean traceStatics)
Trace the heap and dump the output to the tracefile- Parameters:
traceStatics- should all static fields be considered roots?
-
traceHeap
@NullUnmarked public static HeapTracer.Result traceHeap(Collection<?> instances, boolean traceStatics)
Trace the heap and dump the output to the tracefile- Parameters:
instances- instances to be considered roots of the heap traversaltraceStatics- should all static fields be considered roots?
-
-