void add(Instance i) { ++instanceCount; totalSize += i.getSize(); }
protected void updateKnownMap(Cluster cluster) { RefSet marked = cluster.objects; for(Long id: marked.ones()) { if (knownRefs.getAndSet(id, true)) { try { Instance i = heap.getInstanceByID(id); sharedErrorMargin += i.getSize(); if (!sharedRefs.getAndSet(id, true)) { sharedErrorMargin += i.getSize(); sharedSummary.accumulate(i); } } catch(IllegalInstanceIDException e) { System.err.println("Object missing in dump: " + id); } } } }
public void accumulate(Instance i) { if (known != null) { if (known.getAndSet(i.getInstanceId(), true)) { // already accumulated return; } } total.add(i); String cn = i.getJavaClass().getName(); ClassRecord cr = classes.get(cn); if (cr == null) { cr = new ClassRecord(cn); classes.put(cn, cr); } ++cr.instanceCount; cr.totalSize += i.getSize(); }
private boolean processInstance(Instance instance, long size, long retainedSize) throws IOException { if (size != -1) { LongMap.Entry entry = heap.idToOffsetMap.get(instance.getInstanceId()); entry.setRetainedSize((int)(instance.getSize()+retainedSize)); entry.setTreeObj(); if (entry.hasOnlyOneReference()) { long gcRootPointer = entry.getNearestGCRootPointer(); if (gcRootPointer != 0) { if (!unique.contains(gcRootPointer)) { unique.add(gcRootPointer); writeLong(gcRootPointer); } } } return true; } return false; }
long origSize = instanceEntry.getRetainedSize(); if (origSize < 0) origSize = 0; instSize = getInstanceByID(instanceId).getSize(); instanceEntry.setRetainedSize(origSize + instSize);
void add(Instance i) { ++instanceCount; totalSize += i.getSize(); }
protected void updateKnownMap(Cluster cluster) { RefSet marked = cluster.objects; for(Long id: marked.ones()) { if (knownRefs.getAndSet(id, true)) { try { Instance i = heap.getInstanceByID(id); sharedErrorMargin += i.getSize(); if (!sharedRefs.getAndSet(id, true)) { sharedErrorMargin += i.getSize(); sharedSummary.accumulate(i); } } catch(IllegalInstanceIDException e) { System.err.println("Object missing in dump: " + id); } } } }
public void accumulate(Instance i) { if (known != null) { if (known.getAndSet(i.getInstanceId(), true)) { // already accumulated return; } } total.add(i); String cn = i.getJavaClass().getName(); ClassRecord cr = classes.get(cn); if (cr == null) { cr = new ClassRecord(cn); classes.put(cn, cr); } ++cr.instanceCount; cr.totalSize += i.getSize(); }
private boolean processInstance(Instance instance, long size, long retainedSize) throws IOException { if (size != -1) { LongMap.Entry entry = heap.idToOffsetMap.get(instance.getInstanceId()); entry.setRetainedSize((int)(instance.getSize()+retainedSize)); entry.setTreeObj(); if (entry.hasOnlyOneReference()) { long gcRootPointer = entry.getNearestGCRootPointer(); if (gcRootPointer != 0) { if (!unique.contains(gcRootPointer)) { unique.add(gcRootPointer); writeLong(gcRootPointer); } } } return true; } return false; }
private boolean processInstance(Instance instance, long size, long retainedSize) throws IOException { if (size != -1) { LongMap.Entry entry = heap.idToOffsetMap.get(instance.getInstanceId()); entry.setRetainedSize((int)(instance.getSize()+retainedSize)); entry.setTreeObj(); if (entry.hasOnlyOneReference()) { long gcRootPointer = entry.getNearestGCRootPointer(); if (gcRootPointer != 0) { if (!unique.contains(gcRootPointer)) { unique.add(gcRootPointer); writeLong(gcRootPointer); } } } return true; } return false; }
long origSize = instanceEntry.getRetainedSize(); if (origSize < 0) origSize = 0; instSize = getInstanceByID(instanceId).getSize(); instanceEntry.setRetainedSize(origSize + instSize);
long origSize = instanceEntry.getRetainedSize(); if (origSize < 0) origSize = 0; instSize = getInstanceByID(instanceId).getSize(); instanceEntry.setRetainedSize(origSize + instSize);