public Collection<GCRoot> getGCRoots() { synchronized (gcRootLock) { if (heapDumpSegment == null) { return Collections.emptyList(); } if (gcRoots == null) { gcRoots = computeGCRootsFor(heapTagBounds[ROOT_UNKNOWN]); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_JNI_GLOBAL])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_JNI_LOCAL])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_JAVA_FRAME])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_NATIVE_STACK])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_STICKY_CLASS])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_THREAD_BLOCK])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_MONITOR_USED])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_THREAD_OBJECT])); } return gcRoots.values(); } }
public Collection getGCRoots() { synchronized (gcRootLock) { if (heapDumpSegment == null) { return Collections.EMPTY_LIST; } if (gcRoots == null) { gcRoots = computeGCRootsFor(heapTagBounds[ROOT_UNKNOWN]); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_JNI_GLOBAL])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_JNI_LOCAL])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_JAVA_FRAME])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_NATIVE_STACK])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_STICKY_CLASS])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_THREAD_BLOCK])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_MONITOR_USED])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_THREAD_OBJECT])); } return gcRoots.values(); } }
public Collection<GCRoot> getGCRoots() { synchronized (gcRootLock) { if (heapDumpSegment == null) { return Collections.emptyList(); } if (gcRoots == null) { gcRoots = computeGCRootsFor(heapTagBounds[ROOT_UNKNOWN]); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_JNI_GLOBAL])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_JNI_LOCAL])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_JAVA_FRAME])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_NATIVE_STACK])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_STICKY_CLASS])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_THREAD_BLOCK])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_MONITOR_USED])); gcRoots.putAll(computeGCRootsFor(heapTagBounds[ROOT_THREAD_OBJECT])); } return gcRoots.values(); } }