private long readStringTag(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.STRING) { return 0; } return getDumpBuffer().getID(start + stringIDOffset); }
private long readStackFrameTag(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.STACK_FRAME) { return 0; } return getDumpBuffer().getID(start + stackFrameIDOffset); } }
private int readLoadClassSerialNumber(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.LOAD_CLASS) { return 0; } return getDumpBuffer().getInt(start + classSerialNumberOffset); }
private long readLoadClassID(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.LOAD_CLASS) { return 0; } return getDumpBuffer().getID(start + classIDOffset); } }
private int readStackTraceTag(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.STACK_TRACE) { return 0; } return getDumpBuffer().getInt(start + stackTraceSerialNumberOffset); } }
private TagBounds computeHeapDumpStart() throws IOException { TagBounds heapDumpBounds = tagBounds[HEAP_DUMP]; if (heapDumpBounds != null) { long start = heapDumpBounds.startOffset; long[] offset = new long[] { start }; for (int i = 0; (i <= segment) && (start < heapDumpBounds.endOffset);) { int tag = readTag(offset); if (tag == HEAP_DUMP) { if (i == segment) { return new TagBounds(HEAP_DUMP, start, offset[0]); } else { i++; } } start = offset[0]; } throw new IOException("Invalid segment " + segment); // NOI18N } else { TagBounds heapDumpSegmentBounds = tagBounds[HEAP_DUMP_SEGMENT]; if (heapDumpSegmentBounds != null) { long start = heapDumpSegmentBounds.startOffset; long end = heapDumpSegmentBounds.endOffset; return new TagBounds(HEAP_DUMP, start, end); } } return null; }
private void fillTagBounds(long tagStart) { long[] offset = new long[] { tagStart }; while (offset[0] < dumpBuffer.capacity()) { long start = offset[0]; int tag = readTag(offset); TagBounds bounds = tagBounds[tag]; long end = offset[0]; if (bounds == null) { TagBounds newBounds; if (tag == LOAD_CLASS) { newBounds = new LoadClassSegment(this, start, end); } else if (tag == STRING) { newBounds = new StringSegment(this, start, end); } else if (tag == STACK_TRACE) { newBounds = new StackTraceSegment(this, start, end); } else if (tag == STACK_FRAME) { newBounds = new StackFrameSegment(this, start, end); } else { newBounds = new TagBounds(tag, start, end); } tagBounds[tag] = newBounds; } else { bounds.endOffset = end; } } }
private long readStackFrameTag(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.STACK_FRAME) { return 0; } return getDumpBuffer().getID(start + stackFrameIDOffset); } }
private int readLoadClassSerialNumber(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.LOAD_CLASS) { return 0; } return getDumpBuffer().getInt(start + classSerialNumberOffset); }
private int readStackTraceTag(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.STACK_TRACE) { return 0; } return getDumpBuffer().getInt(start + stackTraceSerialNumberOffset); } }
private long readLoadClassID(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.LOAD_CLASS) { return 0; } return getDumpBuffer().getID(start + classIDOffset); } }
private long readStringTag(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.STRING) { return 0; } return getDumpBuffer().getID(start + stringIDOffset); }
private long readStringTag(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.STRING) { return 0; } return getDumpBuffer().getID(start + stringIDOffset); }
private long readStackFrameTag(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.STACK_FRAME) { return 0; } return getDumpBuffer().getID(start + stackFrameIDOffset); } }
private int readLoadClassSerialNumber(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.LOAD_CLASS) { return 0; } return getDumpBuffer().getInt(start + classSerialNumberOffset); }
private long readLoadClassID(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.LOAD_CLASS) { return 0; } return getDumpBuffer().getID(start + classIDOffset); } }
private int readStackTraceTag(long[] offset) { long start = offset[0]; if (hprofHeap.readTag(offset) != HprofHeap.STACK_TRACE) { return 0; } return getDumpBuffer().getInt(start + stackTraceSerialNumberOffset); } }
private TagBounds computeHeapDumpStart() throws IOException { TagBounds heapDumpBounds = tagBounds[HEAP_DUMP]; if (heapDumpBounds != null) { long start = heapDumpBounds.startOffset; long[] offset = new long[] { start }; for (int i = 0; (i <= segment) && (start < heapDumpBounds.endOffset);) { int tag = readTag(offset); if (tag == HEAP_DUMP) { if (i == segment) { return new TagBounds(HEAP_DUMP, start, offset[0]); } else { i++; } } start = offset[0]; } throw new IOException("Invalid segment " + segment); // NOI18N } else { TagBounds heapDumpSegmentBounds = tagBounds[HEAP_DUMP_SEGMENT]; if (heapDumpSegmentBounds != null) { long start = heapDumpSegmentBounds.startOffset; long end = heapDumpSegmentBounds.endOffset; return new TagBounds(HEAP_DUMP, start, end); } } return null; }
private void fillTagBounds(long tagStart) { long[] offset = new long[] { tagStart }; while (offset[0] < dumpBuffer.capacity()) { long start = offset[0]; int tag = readTag(offset); TagBounds bounds = tagBounds[tag]; long end = offset[0]; if (bounds == null) { TagBounds newBounds; if (tag == LOAD_CLASS) { newBounds = new LoadClassSegment(this, start, end); } else if (tag == STRING) { newBounds = new StringSegment(this, start, end); } else if (tag == STACK_TRACE) { newBounds = new StackTraceSegment(this, start, end); } else if (tag == STACK_FRAME) { newBounds = new StackFrameSegment(this, start, end); } else { newBounds = new TagBounds(tag, start, end); } tagBounds[tag] = newBounds; } else { bounds.endOffset = end; } } }
private void fillTagBounds(long tagStart) { long[] offset = new long[] { tagStart }; while (offset[0] < dumpBuffer.capacity()) { long start = offset[0]; int tag = readTag(offset); TagBounds bounds = tagBounds[tag]; long end = offset[0]; if (bounds == null) { TagBounds newBounds; if (tag == LOAD_CLASS) { newBounds = new LoadClassSegment(this, start, end); } else if (tag == STRING) { newBounds = new StringSegment(this, start, end); } else if (tag == STACK_TRACE) { newBounds = new StackTraceSegment(this, start, end); } else if (tag == STACK_FRAME) { newBounds = new StackFrameSegment(this, start, end); } else { newBounds = new TagBounds(tag, start, end); } tagBounds[tag] = newBounds; } else { bounds.endOffset = end; } } }