private void fillZeroLevel() throws IOException { Iterator<GCRoot> gcIt = heap.getGCRoots().iterator(); while (gcIt.hasNext()) { HprofGCRoot root = (HprofGCRoot) gcIt.next(); writeLong(root.getInstanceId()); } }
private boolean writeConnection(long instanceId, long refInstanceId, boolean addRefInstanceId) throws IOException { if (refInstanceId != 0) { LongMap.Entry entry = heap.idToOffsetMap.get(refInstanceId); if (entry != null && entry.getNearestGCRootPointer() == 0L && heap.getGCRoot(refInstanceId) == null) { writeLong(refInstanceId); if (addRefInstanceId) { if (!checkReferences(refInstanceId, instanceId)) { entry.addReference(instanceId); } } entry.setNearestGCRootPointer(instanceId); if (!entry.hasOnlyOneReference()) { multipleParents.writeLong(refInstanceId); //multiParentsCount++; } return true; } return !addRefInstanceId && entry != null; } return false; }
private void fillZeroLevel() throws IOException { Iterator gcIt = heap.getGCRoots().iterator(); while (gcIt.hasNext()) { HprofGCRoot root = (HprofGCRoot) gcIt.next(); writeLong(root.getInstanceId()); } }
private void fillZeroLevel() throws IOException { Iterator<GCRoot> gcIt = heap.getGCRoots().iterator(); while (gcIt.hasNext()) { HprofGCRoot root = (HprofGCRoot) gcIt.next(); writeLong(root.getInstanceId()); } }
private boolean writeConnection(long instanceId, long refInstanceId, boolean addRefInstanceId) throws IOException { if (refInstanceId != 0) { LongMap.Entry entry = heap.idToOffsetMap.get(refInstanceId); if (entry != null && entry.getNearestGCRootPointer() == 0L && heap.getGCRoot(refInstanceId) == null) { writeLong(refInstanceId); if (addRefInstanceId) { if (!checkReferences(refInstanceId, instanceId)) { entry.addReference(instanceId); } } entry.setNearestGCRootPointer(instanceId); if (!entry.hasOnlyOneReference()) { multipleParents.writeLong(refInstanceId); //multiParentsCount++; } return true; } return !addRefInstanceId && entry != null; } return false; }
private boolean writeConnection(long instanceId, long refInstanceId, boolean addRefInstanceId) throws IOException { if (refInstanceId != 0) { LongMap.Entry entry = heap.idToOffsetMap.get(refInstanceId); if (entry != null && entry.getNearestGCRootPointer() == 0L && heap.getGCRoot(refInstanceId) == null) { writeLong(refInstanceId); if (addRefInstanceId) { if (!checkReferences(refInstanceId, instanceId)) { entry.addReference(instanceId); } } entry.setNearestGCRootPointer(instanceId); if (!entry.hasOnlyOneReference()) { multipleParents.writeLong(refInstanceId); //multiParentsCount++; } return true; } return !addRefInstanceId && entry != null; } return false; }