HprofHeap(HprofByteBuffer buffer, int seg) throws FileNotFoundException, IOException { dumpBuffer = buffer; segment = seg; fillTagBounds(dumpBuffer.getHeaderSize()); heapDumpSegment = computeHeapDumpStart(); if (heapDumpSegment != null) { fillHeapTagBounds(); } idToOffsetMap = initIdMap(); nearestGCRoot = new NearestGCRoot(this); }
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; }
LongBuffer getLeaves() { computeGCRoots(); //System.out.println("Multi par. "+multiParentsCount); //System.out.println("Leaves "+leavesCount); //System.out.println("Tree obj. "+heap.idToOffsetMap.treeObj); //System.out.println("First level "+firstLevel); return leaves; }
referentFiled = computeReferentFiled(); createBuffers(); fillZeroLevel(); switchBuffers(); computeOneLevel(processedClasses); } while (hasMoreLevels()); } catch (IOException ex) { ex.printStackTrace(); deleteBuffers(); heap.idToOffsetMap.flush(); HeapProgress.progressFinish();
return; new TreeObject(this,nearestGCRoot.getLeaves()).computeTrees(); domTree = new DominatorTree(this,nearestGCRoot.getMultipleParents()); domTree.computeDominators(); long[] offset = new long[] { allInstanceDumpBounds.startOffset };
referentFiled = computeReferentFiled(); createBuffers(); fillZeroLevel(); switchBuffers(); computeOneLevel(processedClasses); } while (hasMoreLevels()); } catch (IOException ex) { ex.printStackTrace(); deleteBuffers(); heap.idToOffsetMap.flush(); HeapProgress.progressFinish();
return; new TreeObject(this,nearestGCRoot.getLeaves()).computeTrees(); domTree = new DominatorTree(this,nearestGCRoot.getMultipleParents()); domTree.computeDominators(); long[] offset = new long[] { allInstanceDumpBounds.startOffset };
referentFiled = computeReferentFiled(); createBuffers(); fillZeroLevel(); switchBuffers(); computeOneLevel(processedClasses); } while (hasMoreLevels()); } catch (IOException ex) { ex.printStackTrace(); deleteBuffers(); heap.idToOffsetMap.flush(); HeapProgress.progressFinish();
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; }
return; new TreeObject(this,nearestGCRoot.getLeaves()).computeTrees(); domTree = new DominatorTree(this,nearestGCRoot.getMultipleParents()); domTree.computeDominators(); long[] offset = new long[] { allInstanceDumpBounds.startOffset };
LongBuffer getMultipleParents() { computeGCRoots(); return multipleParents; } }
HprofHeap(File dumpFile, int seg) throws FileNotFoundException, IOException { dumpBuffer = HeapFactory.createHprofByteBuffer(dumpFile, HeapFactory.DEFAULT_BUFFER); segment = seg; fillTagBounds(dumpBuffer.getHeaderSize()); heapDumpSegment = computeHeapDumpStart(); if (heapDumpSegment != null) { fillHeapTagBounds(); } idToOffsetMap = initIdMap(); nearestGCRoot = new NearestGCRoot(this); }
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; }
Instance getNearestGCRootPointer(Instance instance) { if (heap.getGCRoot(instance) != null) { return instance; } computeGCRoots(); long nextGCPathId = heap.idToOffsetMap.get(instance.getInstanceId()).getNearestGCRootPointer(); return heap.getInstanceByID(nextGCPathId); }
HprofHeap(HprofByteBuffer buffer, int seg) throws FileNotFoundException, IOException { dumpBuffer = buffer; segment = seg; fillTagBounds(dumpBuffer.getHeaderSize()); heapDumpSegment = computeHeapDumpStart(); if (heapDumpSegment != null) { fillHeapTagBounds(); } idToOffsetMap = initIdMap(); nearestGCRoot = new NearestGCRoot(this); }
LongBuffer getMultipleParents() { computeGCRoots(); return multipleParents; } }
HprofHeap(File dumpFile, int seg) throws FileNotFoundException, IOException { dumpBuffer = HeapFactory.createHprofByteBuffer(dumpFile, HeapFactory.DEFAULT_BUFFER); segment = seg; fillTagBounds(dumpBuffer.getHeaderSize()); heapDumpSegment = computeHeapDumpStart(); if (heapDumpSegment != null) { fillHeapTagBounds(); } idToOffsetMap = initIdMap(); nearestGCRoot = new NearestGCRoot(this); }
LongBuffer getLeaves() { computeGCRoots(); //System.out.println("Multi par. "+multiParentsCount); //System.out.println("Leaves "+leavesCount); //System.out.println("Tree obj. "+heap.idToOffsetMap.treeObj); //System.out.println("First level "+firstLevel); return leaves; }
HprofHeap(File dumpFile, int seg) throws FileNotFoundException, IOException { dumpBuffer = HprofByteBuffer.createHprofByteBuffer(dumpFile); segment = seg; fillTagBounds(dumpBuffer.getHeaderSize()); heapDumpSegment = computeHeapDumpStart(); if (heapDumpSegment != null) { fillHeapTagBounds(); } idToOffsetMap = new LongMap(idMapSize,dumpBuffer.getIDSize(),dumpBuffer.getFoffsetSize()); nearestGCRoot = new NearestGCRoot(this); }
LongBuffer getMultipleParents() { computeGCRoots(); return multipleParents; } }