sun.jvm.hotspot.oops.UnknownOopException Java Examples
The following examples show how to use
sun.jvm.hotspot.oops.UnknownOopException.
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: OldgenAccessor.java From vjtools with Apache License 2.0 | 5 votes |
private void continueNextAddress(CMSCollector cmsCollector) { long size = cmsCollector.blockSizeUsingPrintezisBits(cur); if (size <= 0L) { throw new UnknownOopException(); } cur = cur.addOffsetTo(CompactibleFreeListSpace.adjustObjectSizeInBytes(size)); }
Example #2
Source File: OldgenAccessor.java From vjtools with Apache License 2.0 | 4 votes |
public void caculateHistogram() { ObjectHeap objectHeap = HeapUtils.getObjectHeap(); CollectedHeap heap = checkHeapType(); ConcurrentMarkSweepGeneration cmsGen = HeapUtils.getOldGenForCMS(heap); CompactibleFreeListSpace cmsSpace = cmsGen.cmsSpace(); CMSCollector cmsCollector = cmsSpace.collector(); cur = cmsSpace.bottom(); regionStart = cur; Address limit = cmsSpace.end(); printGenSummary(cmsGen); ProgressNotifier progressNotifier = new ProgressNotifier(cmsGen.used()); progressNotifier.printHead(); final long addressSize = VM.getVM().getAddressSize(); for (; cur.lessThan(limit);) { Address k = cur.getAddressAt(addressSize); if (FreeChunk.indicatesFreeChunk(cur)) { skipFreeChunk(addressSize); } else if (k != null) { Oop obj = null; try { obj = objectHeap.newOop(cur.addOffsetToAsOopHandle(0)); } catch (UnknownOopException ignored) { // ignored } if (obj == null) { continueNextAddress(cmsCollector); continue; } long objectSize = obj.getObjectSize(); ClassStats stats = HeapUtils.getClassStats(obj.getKlass(), classStatsMap); stats.oldCount++; stats.oldSize += objectSize; progressNotifier.processingSize += objectSize; if (progressNotifier.processingSize > progressNotifier.nextNotificationSize) { progressNotifier.printProgress(); } cur = cur.addOffsetTo(CompactibleFreeListSpace.adjustObjectSizeInBytes(objectSize)); } else { continueNextAddress(cmsCollector); } } tty.println("\ntotal live regions:" + liveRegions); }