use of com.ibm.j9ddr.vm29.j9.gc.GCHeapRegionDescriptor in project openj9 by eclipse.
the class GCCardTable method cleanCardsInRegion.
public void cleanCardsInRegion(GCHeapRegionDescriptor region, GCCardCleaner cardCleaner) throws CorruptDataException {
U8Pointer lowCard = heapAddrToCardAddr(region.getLowAddress());
U8Pointer highCard = heapAddrToCardAddr(region.getHighAddress());
cleanRange(lowCard, highCard, cardCleaner);
}
use of com.ibm.j9ddr.vm29.j9.gc.GCHeapRegionDescriptor in project openj9 by eclipse.
the class GCHeapRegionManager method initializeAuxRegionDescriptors.
protected void initializeAuxRegionDescriptors() throws CorruptDataException {
GCHeapRegionDescriptor[] auxRegions = new GCHeapRegionDescriptor[_auxRegionCount];
if (auxRegions.length > 0) {
MM_HeapRegionDescriptorPointer current = _heapRegionManager._auxRegionDescriptorList();
for (int i = 0; i < _auxRegionCount; i++) {
auxRegions[i] = GCHeapRegionDescriptor.fromHeapRegionDescriptor(current);
current = current._nextRegion();
}
}
_auxRegionDescriptorList = auxRegions;
}
use of com.ibm.j9ddr.vm29.j9.gc.GCHeapRegionDescriptor in project openj9 by eclipse.
the class GCMemoryPool method freeEntryCheckGeneric.
/**
* Check individual entries. This check is the same for ALL collectors
* @param freeListEntry A structure to a free entry for all collectors (except Balanced)
* @throws CorruptFreeEntryException This needs to be caught by a listener to be of any use
* @return None. This function throws exceptions which are caught by the listener in checkFreeLists()
*/
protected void freeEntryCheckGeneric(GCHeapLinkedFreeHeader freeListEntry) throws CorruptDataException, CorruptFreeEntryException {
MM_HeapLinkedFreeHeaderPointer freeListEntryAddress = freeListEntry.getHeader();
UDATA size = freeListEntry.getSize();
GCHeapRegionDescriptor region = getRegion();
U8Pointer entryEndingAddressInclusive = U8Pointer.cast(freeListEntry.getHeader()).add(size.sub(1));
if (freeListEntry.getHeader().isNull()) {
throw new CorruptFreeEntryException("freeEntryCorrupt", freeListEntryAddress);
}
/* Make sure its a multi-slot dead object */
if (!(ObjectModel.isDeadObject(freeListEntry.getObject()) && !ObjectModel.isSingleSlotDeadObject(freeListEntry.getObject()))) {
throw new CorruptFreeEntryException("freeEntryCorrupt", freeListEntryAddress);
}
/* Self checks */
if (!region.isAddressInRegion(VoidPointer.cast(freeListEntryAddress))) {
throw new CorruptFreeEntryException("freeEntryCorrupt", freeListEntryAddress);
}
if (!region.isAddressInRegion(VoidPointer.cast(entryEndingAddressInclusive))) {
throw new CorruptFreeEntryException("sizeFieldInvalid", freeListEntryAddress);
}
}
use of com.ibm.j9ddr.vm29.j9.gc.GCHeapRegionDescriptor in project openj9 by eclipse.
the class GCMemoryPool method fromMemoryPoolPointerInRegion.
public static GCMemoryPool fromMemoryPoolPointerInRegion(GCHeapRegionDescriptor region, MM_MemoryPoolPointer memoryPool) throws CorruptDataException {
MM_GCExtensionsPointer gcExtensions = GCBase.getExtensions();
boolean splitFreeListsEnabled = gcExtensions.splitFreeListSplitAmount().gt(1);
boolean isConcurrentSweepEnabled = gcExtensions.concurrentSweep();
if (GCExtensions.isSegregatedHeap()) {
/* Segregated heap may be used with a standard collector. This check must be done first. */
return new GCMemoryPoolAggregatedCellList(region, memoryPool);
} else if (GCExtensions.isStandardGC()) {
String poolName = memoryPool._poolName().getCStringAtOffset(0);
if (poolName.equals("Allocate/Survivor1") || poolName.equals("Allocate/Survivor2")) {
return new GCMemoryPoolAddressOrderedList(region, memoryPool);
}
/* This can be done without comparing poolName to the names but for consistency sake, compare them */
if (poolName.equals("Unknown") || poolName.equals("LOA") || poolName.equals("Tenure")) {
if (splitFreeListsEnabled) {
if (isConcurrentSweepEnabled) {
return new GCMemoryPoolAddressOrderedList(region, memoryPool);
} else {
return new GCMemoryPoolSplitAddressOrderedList(region, memoryPool);
}
} else {
return new GCMemoryPoolAddressOrderedList(region, memoryPool);
}
}
throw new CorruptDataException("Unreachable");
} else if (GCExtensions.isVLHGC()) {
throw new UnsupportedOperationException("Balanced GC not supported");
}
throw new CorruptDataException("Unreachable");
}
use of com.ibm.j9ddr.vm29.j9.gc.GCHeapRegionDescriptor in project openj9 by eclipse.
the class HeapWalker method initializeFlatLockedMonitors.
private static void initializeFlatLockedMonitors() throws CorruptDataException {
J9JavaVMPointer vm = J9RASHelper.getVM(DataType.getJ9RASPointer());
MM_GCExtensionsPointer gcext = GCExtensions.getGCExtensionsPointer();
MM_HeapRegionManagerPointer hrm = gcext.heapRegionManager();
flatLockedMonitors = new TreeSet<ObjectMonitor>();
GCHeapRegionIterator regions = GCHeapRegionIterator.fromMMHeapRegionManager(hrm, true, true);
while (regions.hasNext()) {
GCHeapRegionDescriptor region = regions.next();
if (!flatLockedMonitorsByRegion.containsKey(region)) {
runFlatLockMonitorRegionWalk(vm, region);
}
/* Running the walk should have populated the flatLockedMonitors map */
assert (flatLockedMonitorsByRegion.containsKey(region));
flatLockedMonitors.addAll(flatLockedMonitorsByRegion.get(region));
}
}
Aggregations