Java Code Examples for sun.jvm.hotspot.debugger.Address#addOffsetTo()
The following examples show how to use
sun.jvm.hotspot.debugger.Address#addOffsetTo() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CompactibleFreeListSpace.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public long free() { // small chunks long size = 0; Address cur = addr.addOffsetTo( indexedFreeListField.getOffset() ); cur = cur.addOffsetTo(IndexSetStart*AdaptiveFreeList.sizeOf()); for (int i=IndexSetStart; i<IndexSetSize; i += IndexSetStride) { AdaptiveFreeList freeList = (AdaptiveFreeList) VMObjectFactory.newObject(AdaptiveFreeList.class, cur); size += i*freeList.count(); cur= cur.addOffsetTo(IndexSetStride*AdaptiveFreeList.sizeOf()); } // large block AFLBinaryTreeDictionary aflbd = (AFLBinaryTreeDictionary) VMObjectFactory.newObject(AFLBinaryTreeDictionary.class, dictionaryField.getValue(addr)); size += aflbd.size(); // linear block in TLAB LinearAllocBlock lab = (LinearAllocBlock) VMObjectFactory.newObject(LinearAllocBlock.class, addr.addOffsetTo(smallLinearAllocBlockFieldOffset)); size += lab.word_size(); return size*heapWordSize; }
Example 2
Source File: CompactibleFreeListSpace.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public long free() { // small chunks long size = 0; Address cur = addr.addOffsetTo( indexedFreeListField.getOffset() ); cur = cur.addOffsetTo(IndexSetStart*AdaptiveFreeList.sizeOf()); for (int i=IndexSetStart; i<IndexSetSize; i += IndexSetStride) { AdaptiveFreeList freeList = (AdaptiveFreeList) VMObjectFactory.newObject(AdaptiveFreeList.class, cur); size += i*freeList.count(); cur= cur.addOffsetTo(IndexSetStride*AdaptiveFreeList.sizeOf()); } // large block AFLBinaryTreeDictionary aflbd = (AFLBinaryTreeDictionary) VMObjectFactory.newObject(AFLBinaryTreeDictionary.class, dictionaryField.getValue(addr)); size += aflbd.size(); // linear block in TLAB LinearAllocBlock lab = (LinearAllocBlock) VMObjectFactory.newObject(LinearAllocBlock.class, addr.addOffsetTo(smallLinearAllocBlockFieldOffset)); size += lab.word_size(); return size*heapWordSize; }
Example 3
Source File: CompactibleFreeListSpace.java From hottub with GNU General Public License v2.0 | 6 votes |
public long free() { // small chunks long size = 0; Address cur = addr.addOffsetTo( indexedFreeListField.getOffset() ); cur = cur.addOffsetTo(IndexSetStart*AdaptiveFreeList.sizeOf()); for (int i=IndexSetStart; i<IndexSetSize; i += IndexSetStride) { AdaptiveFreeList freeList = (AdaptiveFreeList) VMObjectFactory.newObject(AdaptiveFreeList.class, cur); size += i*freeList.count(); cur= cur.addOffsetTo(IndexSetStride*AdaptiveFreeList.sizeOf()); } // large block AFLBinaryTreeDictionary aflbd = (AFLBinaryTreeDictionary) VMObjectFactory.newObject(AFLBinaryTreeDictionary.class, dictionaryField.getValue(addr)); size += aflbd.size(); // linear block in TLAB LinearAllocBlock lab = (LinearAllocBlock) VMObjectFactory.newObject(LinearAllocBlock.class, addr.addOffsetTo(smallLinearAllocBlockFieldOffset)); size += lab.word_size(); return size*heapWordSize; }
Example 4
Source File: CompactibleFreeListSpace.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public long free() { // small chunks long size = 0; Address cur = addr.addOffsetTo( indexedFreeListField.getOffset() ); cur = cur.addOffsetTo(IndexSetStart*AdaptiveFreeList.sizeOf()); for (int i=IndexSetStart; i<IndexSetSize; i += IndexSetStride) { AdaptiveFreeList freeList = (AdaptiveFreeList) VMObjectFactory.newObject(AdaptiveFreeList.class, cur); size += i*freeList.count(); cur= cur.addOffsetTo(IndexSetStride*AdaptiveFreeList.sizeOf()); } // large block AFLBinaryTreeDictionary aflbd = (AFLBinaryTreeDictionary) VMObjectFactory.newObject(AFLBinaryTreeDictionary.class, dictionaryField.getValue(addr)); size += aflbd.size(); // linear block in TLAB LinearAllocBlock lab = (LinearAllocBlock) VMObjectFactory.newObject(LinearAllocBlock.class, addr.addOffsetTo(smallLinearAllocBlockFieldOffset)); size += lab.word_size(); return size*heapWordSize; }
Example 5
Source File: CompactibleFreeListSpace.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public long free() { // small chunks long size = 0; Address cur = addr.addOffsetTo( indexedFreeListField.getOffset() ); cur = cur.addOffsetTo(IndexSetStart*AdaptiveFreeList.sizeOf()); for (int i=IndexSetStart; i<IndexSetSize; i += IndexSetStride) { AdaptiveFreeList freeList = (AdaptiveFreeList) VMObjectFactory.newObject(AdaptiveFreeList.class, cur); size += i*freeList.count(); cur= cur.addOffsetTo(IndexSetStride*AdaptiveFreeList.sizeOf()); } // large block AFLBinaryTreeDictionary aflbd = (AFLBinaryTreeDictionary) VMObjectFactory.newObject(AFLBinaryTreeDictionary.class, dictionaryField.getValue(addr)); size += aflbd.size(); // linear block in TLAB LinearAllocBlock lab = (LinearAllocBlock) VMObjectFactory.newObject(LinearAllocBlock.class, addr.addOffsetTo(smallLinearAllocBlockFieldOffset)); size += lab.word_size(); return size*heapWordSize; }
Example 6
Source File: CompactibleFreeListSpace.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public Address skipBlockSizeUsingPrintezisBits(Address pos) { CMSCollector collector = collector(); long size = 0; Address addr = null; if (collector != null) { size = collector.blockSizeUsingPrintezisBits(pos); if (size >= 3) { addr = pos.addOffsetTo(adjustObjectSizeInBytes(size)); } } return addr; }
Example 7
Source File: CompactibleFreeListSpace.java From hottub with GNU General Public License v2.0 | 5 votes |
public Address skipBlockSizeUsingPrintezisBits(Address pos) { CMSCollector collector = collector(); long size = 0; Address addr = null; if (collector != null) { size = collector.blockSizeUsingPrintezisBits(pos); if (size >= 3) { addr = pos.addOffsetTo(adjustObjectSizeInBytes(size)); } } return addr; }
Example 8
Source File: CompactibleFreeListSpace.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public Address skipBlockSizeUsingPrintezisBits(Address pos) { CMSCollector collector = collector(); long size = 0; Address addr = null; if (collector != null) { size = collector.blockSizeUsingPrintezisBits(pos); if (size >= 3) { addr = pos.addOffsetTo(adjustObjectSizeInBytes(size)); } } return addr; }
Example 9
Source File: CompactibleFreeListSpace.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public Address skipBlockSizeUsingPrintezisBits(Address pos) { CMSCollector collector = collector(); long size = 0; Address addr = null; if (collector != null) { size = collector.blockSizeUsingPrintezisBits(pos); if (size >= 3) { addr = pos.addOffsetTo(adjustObjectSizeInBytes(size)); } } return addr; }
Example 10
Source File: CompactibleFreeListSpace.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public Address skipBlockSizeUsingPrintezisBits(Address pos) { CMSCollector collector = collector(); long size = 0; Address addr = null; if (collector != null) { size = collector.blockSizeUsingPrintezisBits(pos); if (size >= 3) { addr = pos.addOffsetTo(adjustObjectSizeInBytes(size)); } } return addr; }
Example 11
Source File: CommandProcessor.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public void doit(Tokens t) { if (t.countTokens() != 1) { usage(); } else { String arg = t.nextToken(); Matcher m1 = args1.matcher(arg); Matcher m2 = args2.matcher(arg); Address start = null; Address end = null; String format = ""; int formatSize = (int)VM.getVM().getAddressSize(); if (m1.matches()) { start = VM.getVM().getDebugger().parseAddress(m1.group(1)); int count = 1; if (m1.group(2) != null) { count = Integer.parseInt(m1.group(3)); } end = start.addOffsetTo(count * formatSize); } else if (m2.matches()) { start = VM.getVM().getDebugger().parseAddress(m2.group(1)); end = VM.getVM().getDebugger().parseAddress(m2.group(2)); } else { usage(); return; } int line = 80; int formatWidth = formatSize * 8 / 4 + 2; out.print(fill(start, formatWidth)); out.print(": "); int width = line - formatWidth - 2; boolean needsPrintln = true; while (start != null && start.lessThan(end)) { Address val = start.getAddressAt(0); out.print(fill(val, formatWidth)); needsPrintln = true; width -= formatWidth; start = start.addOffsetTo(formatSize); if (width <= formatWidth) { out.println(); needsPrintln = false; if (start.lessThan(end)) { out.print(fill(start, formatWidth)); out.print(": "); width = line - formatWidth - 2; } } else { out.print(" "); width -= 1; } } if (needsPrintln) { out.println(); } } }
Example 12
Source File: CommandProcessor.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public void doit(Tokens t) { if (t.countTokens() != 1) { usage(); } else { String arg = t.nextToken(); Matcher m1 = args1.matcher(arg); Matcher m2 = args2.matcher(arg); Address start = null; Address end = null; String format = ""; int formatSize = (int)VM.getVM().getAddressSize(); if (m1.matches()) { start = VM.getVM().getDebugger().parseAddress(m1.group(1)); int count = 1; if (m1.group(2) != null) { count = Integer.parseInt(m1.group(3)); } end = start.addOffsetTo(count * formatSize); } else if (m2.matches()) { start = VM.getVM().getDebugger().parseAddress(m2.group(1)); end = VM.getVM().getDebugger().parseAddress(m2.group(2)); } else { usage(); return; } int line = 80; int formatWidth = formatSize * 8 / 4 + 2; out.print(fill(start, formatWidth)); out.print(": "); int width = line - formatWidth - 2; boolean needsPrintln = true; while (start != null && start.lessThan(end)) { Address val = start.getAddressAt(0); out.print(fill(val, formatWidth)); needsPrintln = true; width -= formatWidth; start = start.addOffsetTo(formatSize); if (width <= formatWidth) { out.println(); needsPrintln = false; if (start.lessThan(end)) { out.print(fill(start, formatWidth)); out.print(": "); width = line - formatWidth - 2; } } else { out.print(" "); width -= 1; } } if (needsPrintln) { out.println(); } } }
Example 13
Source File: CommandProcessor.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public void doit(Tokens t) { if (t.countTokens() != 1) { usage(); } else { String arg = t.nextToken(); Matcher m1 = args1.matcher(arg); Matcher m2 = args2.matcher(arg); Address start = null; Address end = null; String format = ""; int formatSize = (int)VM.getVM().getAddressSize(); if (m1.matches()) { start = VM.getVM().getDebugger().parseAddress(m1.group(1)); int count = 1; if (m1.group(2) != null) { count = Integer.parseInt(m1.group(3)); } end = start.addOffsetTo(count * formatSize); } else if (m2.matches()) { start = VM.getVM().getDebugger().parseAddress(m2.group(1)); end = VM.getVM().getDebugger().parseAddress(m2.group(2)); } else { usage(); return; } int line = 80; int formatWidth = formatSize * 8 / 4 + 2; out.print(fill(start, formatWidth)); out.print(": "); int width = line - formatWidth - 2; boolean needsPrintln = true; while (start != null && start.lessThan(end)) { Address val = start.getAddressAt(0); out.print(fill(val, formatWidth)); needsPrintln = true; width -= formatWidth; start = start.addOffsetTo(formatSize); if (width <= formatWidth) { out.println(); needsPrintln = false; if (start.lessThan(end)) { out.print(fill(start, formatWidth)); out.print(": "); width = line - formatWidth - 2; } } else { out.print(" "); width -= 1; } } if (needsPrintln) { out.println(); } } }
Example 14
Source File: CommandProcessor.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public void doit(Tokens t) { if (t.countTokens() != 1) { usage(); } else { String arg = t.nextToken(); Matcher m1 = args1.matcher(arg); Matcher m2 = args2.matcher(arg); Address start = null; Address end = null; String format = ""; int formatSize = (int)VM.getVM().getAddressSize(); if (m1.matches()) { start = VM.getVM().getDebugger().parseAddress(m1.group(1)); int count = 1; if (m1.group(2) != null) { count = Integer.parseInt(m1.group(3)); } end = start.addOffsetTo(count * formatSize); } else if (m2.matches()) { start = VM.getVM().getDebugger().parseAddress(m2.group(1)); end = VM.getVM().getDebugger().parseAddress(m2.group(2)); } else { usage(); return; } int line = 80; int formatWidth = formatSize * 8 / 4 + 2; out.print(fill(start, formatWidth)); out.print(": "); int width = line - formatWidth - 2; boolean needsPrintln = true; while (start != null && start.lessThan(end)) { Address val = start.getAddressAt(0); out.print(fill(val, formatWidth)); needsPrintln = true; width -= formatWidth; start = start.addOffsetTo(formatSize); if (width <= formatWidth) { out.println(); needsPrintln = false; if (start.lessThan(end)) { out.print(fill(start, formatWidth)); out.print(": "); width = line - formatWidth - 2; } } else { out.print(" "); width -= 1; } } if (needsPrintln) { out.println(); } } }
Example 15
Source File: CommandProcessor.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public void doit(Tokens t) { if (t.countTokens() != 1) { usage(); } else { String arg = t.nextToken(); Matcher m1 = args1.matcher(arg); Matcher m2 = args2.matcher(arg); Address start = null; Address end = null; String format = ""; int formatSize = (int)VM.getVM().getAddressSize(); if (m1.matches()) { start = VM.getVM().getDebugger().parseAddress(m1.group(1)); int count = 1; if (m1.group(2) != null) { count = Integer.parseInt(m1.group(3)); } end = start.addOffsetTo(count * formatSize); } else if (m2.matches()) { start = VM.getVM().getDebugger().parseAddress(m2.group(1)); end = VM.getVM().getDebugger().parseAddress(m2.group(2)); } else { usage(); return; } int line = 80; int formatWidth = formatSize * 8 / 4 + 2; out.print(fill(start, formatWidth)); out.print(": "); int width = line - formatWidth - 2; boolean needsPrintln = true; while (start != null && start.lessThan(end)) { Address val = start.getAddressAt(0); out.print(fill(val, formatWidth)); needsPrintln = true; width -= formatWidth; start = start.addOffsetTo(formatSize); if (width <= formatWidth) { out.println(); needsPrintln = false; if (start.lessThan(end)) { out.print(fill(start, formatWidth)); out.print(": "); width = line - formatWidth - 2; } } else { out.print(" "); width -= 1; } } if (needsPrintln) { out.println(); } } }
Example 16
Source File: CommandProcessor.java From hottub with GNU General Public License v2.0 | 4 votes |
public void doit(Tokens t) { if (t.countTokens() != 1) { usage(); } else { String arg = t.nextToken(); Matcher m1 = args1.matcher(arg); Matcher m2 = args2.matcher(arg); Address start = null; Address end = null; String format = ""; int formatSize = (int)VM.getVM().getAddressSize(); if (m1.matches()) { start = VM.getVM().getDebugger().parseAddress(m1.group(1)); int count = 1; if (m1.group(2) != null) { count = Integer.parseInt(m1.group(3)); } end = start.addOffsetTo(count * formatSize); } else if (m2.matches()) { start = VM.getVM().getDebugger().parseAddress(m2.group(1)); end = VM.getVM().getDebugger().parseAddress(m2.group(2)); } else { usage(); return; } int line = 80; int formatWidth = formatSize * 8 / 4 + 2; out.print(fill(start, formatWidth)); out.print(": "); int width = line - formatWidth - 2; boolean needsPrintln = true; while (start != null && start.lessThan(end)) { Address val = start.getAddressAt(0); out.print(fill(val, formatWidth)); needsPrintln = true; width -= formatWidth; start = start.addOffsetTo(formatSize); if (width <= formatWidth) { out.println(); needsPrintln = false; if (start.lessThan(end)) { out.print(fill(start, formatWidth)); out.print(": "); width = line - formatWidth - 2; } } else { out.print(" "); width -= 1; } } if (needsPrintln) { out.println(); } } }
Example 17
Source File: CommandProcessor.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public void doit(Tokens t) { if (t.countTokens() != 1) { usage(); } else { String arg = t.nextToken(); Matcher m1 = args1.matcher(arg); Matcher m2 = args2.matcher(arg); Address start = null; Address end = null; String format = ""; int formatSize = (int)VM.getVM().getAddressSize(); if (m1.matches()) { start = VM.getVM().getDebugger().parseAddress(m1.group(1)); int count = 1; if (m1.group(2) != null) { count = Integer.parseInt(m1.group(3)); } end = start.addOffsetTo(count * formatSize); } else if (m2.matches()) { start = VM.getVM().getDebugger().parseAddress(m2.group(1)); end = VM.getVM().getDebugger().parseAddress(m2.group(2)); } else { usage(); return; } int line = 80; int formatWidth = formatSize * 8 / 4 + 2; out.print(fill(start, formatWidth)); out.print(": "); int width = line - formatWidth - 2; boolean needsPrintln = true; while (start != null && start.lessThan(end)) { Address val = start.getAddressAt(0); out.print(fill(val, formatWidth)); needsPrintln = true; width -= formatWidth; start = start.addOffsetTo(formatSize); if (width <= formatWidth) { out.println(); needsPrintln = false; if (start.lessThan(end)) { out.print(fill(start, formatWidth)); out.print(": "); width = line - formatWidth - 2; } } else { out.print(" "); width -= 1; } } if (needsPrintln) { out.println(); } } }
Example 18
Source File: CommandProcessor.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public void doit(Tokens t) { if (t.countTokens() != 1) { usage(); } else { String arg = t.nextToken(); Matcher m1 = args1.matcher(arg); Matcher m2 = args2.matcher(arg); Address start = null; Address end = null; String format = ""; int formatSize = (int)VM.getVM().getAddressSize(); if (m1.matches()) { start = VM.getVM().getDebugger().parseAddress(m1.group(1)); int count = 1; if (m1.group(2) != null) { count = Integer.parseInt(m1.group(3)); } end = start.addOffsetTo(count * formatSize); } else if (m2.matches()) { start = VM.getVM().getDebugger().parseAddress(m2.group(1)); end = VM.getVM().getDebugger().parseAddress(m2.group(2)); } else { usage(); return; } int line = 80; int formatWidth = formatSize * 8 / 4 + 2; out.print(fill(start, formatWidth)); out.print(": "); int width = line - formatWidth - 2; boolean needsPrintln = true; while (start != null && start.lessThan(end)) { Address val = start.getAddressAt(0); out.print(fill(val, formatWidth)); needsPrintln = true; width -= formatWidth; start = start.addOffsetTo(formatSize); if (width <= formatWidth) { out.println(); needsPrintln = false; if (start.lessThan(end)) { out.print(fill(start, formatWidth)); out.print(": "); width = line - formatWidth - 2; } } else { out.print(" "); width -= 1; } } if (needsPrintln) { out.println(); } } }