MCPcopy
hub / github.com/vipshop/vjtools / runHeapVisitor

Method runHeapVisitor

vjmap/src/main/java/com/vip/vjtools/vjmap/VJMap.java:31–42  ·  view source on GitHub ↗
(int pid, boolean orderByName, long minSize)

Source from the content-addressed store, hash-verified

29 private static HeapProcessor heapProcessor;
30
31 public static void runHeapVisitor(int pid, boolean orderByName, long minSize) {
32 ObjectHeap heap = VM.getVM().getObjectHeap();
33 heapProcessor = new HeapProcessor(orderByName, minSize);
34
35 tty.println("Iterating over heap. This may take a while...");
36 tty.println("Geting live regions...");
37
38 heap.iterate(heapProcessor.visitor);
39
40 heapProcessor.printResult();
41 heapProcessor = null;
42 }
43
44 public static class HeapProcessor {
45 HeapHistogramVisitor visitor = new HeapHistogramVisitor();

Callers 1

mainMethod · 0.95

Calls 2

getObjectHeapMethod · 0.80
printResultMethod · 0.45

Tested by

no test coverage detected