long getID(long offset) { if (idSize == 4) { return ((long)getInt(offset)) & 0xFFFFFFFFL; } else if (idSize == 8) { return getLong(offset); } assert false; return -1; }
void readHeader() throws IOException { long[] offset = new long[1]; String magic = readStringNull(offset, MINIMAL_SIZE); if (DEBUG) { System.out.println("Magic " + magic); // NOI18N } if (magic1.equals(magic)) { version = JAVA_PROFILE_1_0_1; } else if (magic2.equals(magic)) { version = JAVA_PROFILE_1_0_2; } else { if (DEBUG) { System.out.println("Invalid version"); // NOI18N } String errText = ResourceBundle.getBundle("org/netbeans/lib/profiler/heap/Bundle") .getString("HprofByteBuffer_InvalidFormat"); throw new IOException(errText); } idSize = getInt(offset[0]); offset[0] += 4; time = getLong(offset[0]); offset[0] += 8; if (DEBUG) { System.out.println("ID " + idSize); // NOI18N } if (DEBUG) { System.out.println("Date " + new Date(time).toString()); // NOI18N } headerSize = offset[0]; }
Summary(HprofByteBuffer dumpBuffer, long startOffset) { assert dumpBuffer.get(startOffset) == HprofHeap.HEAP_SUMMARY; dumpBuffer.getInt(startOffset + 1); // time dumpBuffer.getInt(startOffset + 1 + 4); // tag length totalLiveBytes = dumpBuffer.getInt(startOffset + 1 + 4 + 4); totalLiveInstances = dumpBuffer.getInt(startOffset + 1 + 4 + 4 + 4); totalAllocatedBytes = dumpBuffer.getLong(startOffset + 1 + 4 + 4 + 4 + 4); totalAllocatedInstances = dumpBuffer.getLong(startOffset + 1 + 4 + 4 + 4 + 4 + 8); time = dumpBuffer.getTime(); }
case HprofHeap.LONG: long lg = dumpBuffer.getLong(position);
long getID(long offset) { if (idSize == 4) { return ((long)getInt(offset)) & 0xFFFFFFFFL; } else if (idSize == 8) { return getLong(offset); } assert false; return -1; }
long getID(long offset) { if (idSize == 4) { return ((long)getInt(offset)) & 0xFFFFFFFFL; } else if (idSize == 8) { return getLong(offset); } assert false; return -1; }
void readHeader() throws IOException { long[] offset = new long[1]; String magic = readStringNull(offset, MINIMAL_SIZE); if (DEBUG) { System.out.println("Magic " + magic); // NOI18N } if (magic1.equals(magic)) { version = JAVA_PROFILE_1_0_1; } else if (magic2.equals(magic)) { version = JAVA_PROFILE_1_0_2; } else { if (DEBUG) { System.out.println("Invalid version"); // NOI18N } String errText = ResourceBundle.getBundle("org/netbeans/lib/profiler/heap/Bundle") .getString("HprofByteBuffer_InvalidFormat"); throw new IOException(errText); } idSize = getInt(offset[0]); offset[0] += 4; time = getLong(offset[0]); offset[0] += 8; if (DEBUG) { System.out.println("ID " + idSize); // NOI18N } if (DEBUG) { System.out.println("Date " + new Date(time).toString()); // NOI18N } headerSize = offset[0]; }
void readHeader() throws IOException { long[] offset = new long[1]; String magic = readStringNull(offset, MINIMAL_SIZE); if (DEBUG) { System.out.println("Magic " + magic); // NOI18N } if (magic1.equals(magic)) { version = JAVA_PROFILE_1_0_1; } else if (magic2.equals(magic)) { version = JAVA_PROFILE_1_0_2; } else { if (DEBUG) { System.out.println("Invalid version"); // NOI18N } String errText = ResourceBundle.getBundle("org/netbeans/lib/profiler/heap/Bundle") .getString("HprofByteBuffer_InvalidFormat"); throw new IOException(errText); } idSize = getInt(offset[0]); offset[0] += 4; time = getLong(offset[0]); offset[0] += 8; if (DEBUG) { System.out.println("ID " + idSize); // NOI18N } if (DEBUG) { System.out.println("Date " + new Date(time).toString()); // NOI18N } headerSize = offset[0]; }
Summary(HprofByteBuffer dumpBuffer, long startOffset) { assert dumpBuffer.get(startOffset) == HprofHeap.HEAP_SUMMARY; dumpBuffer.getInt(startOffset + 1); // time dumpBuffer.getInt(startOffset + 1 + 4); // tag length totalLiveBytes = dumpBuffer.getInt(startOffset + 1 + 4 + 4); totalLiveInstances = dumpBuffer.getInt(startOffset + 1 + 4 + 4 + 4); totalAllocatedBytes = dumpBuffer.getLong(startOffset + 1 + 4 + 4 + 4 + 4); totalAllocatedInstances = dumpBuffer.getLong(startOffset + 1 + 4 + 4 + 4 + 4 + 8); time = dumpBuffer.getTime(); }
Summary(HprofByteBuffer dumpBuffer, long startOffset) { assert dumpBuffer.get(startOffset) == HprofHeap.HEAP_SUMMARY; dumpBuffer.getInt(startOffset + 1); // time dumpBuffer.getInt(startOffset + 1 + 4); // tag length totalLiveBytes = dumpBuffer.getInt(startOffset + 1 + 4 + 4); totalLiveInstances = dumpBuffer.getInt(startOffset + 1 + 4 + 4 + 4); totalAllocatedBytes = dumpBuffer.getLong(startOffset + 1 + 4 + 4 + 4 + 4); totalAllocatedInstances = dumpBuffer.getLong(startOffset + 1 + 4 + 4 + 4 + 4 + 8); time = dumpBuffer.getTime(); }
case HprofHeap.LONG: long lg = dumpBuffer.getLong(position);
case HprofHeap.LONG: long lg = dumpBuffer.getLong(position);