use of com.ibm.j9ddr.vm29.pointer.generated.MM_GCExtensionsPointer in project openj9 by eclipse.
the class GCHeapRegionIterator method from.
public static GCHeapRegionIterator from() throws CorruptDataException {
J9JavaVMPointer vm = J9RASHelper.getVM(DataType.getJ9RASPointer());
MM_GCExtensionsPointer gcext = GCExtensions.getGCExtensionsPointer();
MM_HeapRegionManagerPointer hrm = gcext.heapRegionManager();
return fromMMHeapRegionManager(hrm, true, true);
}
use of com.ibm.j9ddr.vm29.pointer.generated.MM_GCExtensionsPointer in project openj9 by eclipse.
the class DTFJJavaHeap method initRegions.
@SuppressWarnings("unchecked")
private void initRegions() throws com.ibm.j9ddr.CorruptDataException {
MM_GCExtensionsPointer gcext = GCExtensions.getGCExtensionsPointer();
MM_HeapRegionManagerPointer hrm = gcext.heapRegionManager();
regions = IteratorHelpers.toList(GCHeapRegionIterator.fromMMHeapRegionManager(hrm, space, true, true));
}
use of com.ibm.j9ddr.vm29.pointer.generated.MM_GCExtensionsPointer in project openj9 by eclipse.
the class GCCardTable method from.
public static GCCardTable from() throws CorruptDataException {
J9JavaVMPointer vm = J9RASHelper.getVM(DataType.getJ9RASPointer());
MM_GCExtensionsPointer extensions = GCExtensions.getGCExtensionsPointer();
MM_CardTablePointer cardTable = extensions.cardTable();
return new GCCardTable(cardTable);
}
use of com.ibm.j9ddr.vm29.pointer.generated.MM_GCExtensionsPointer 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.pointer.generated.MM_GCExtensionsPointer in project openj9 by eclipse.
the class GCHeapMap method from.
public static GCHeapMap from() throws CorruptDataException {
MM_GCExtensionsPointer extensions = GCExtensions.getGCExtensionsPointer();
if (GCExtensions.isStandardGC()) {
if (!GCExtensions.isSegregatedHeap()) {
MM_ParallelGlobalGCPointer pgc = MM_ParallelGlobalGCPointer.cast(extensions._globalCollector());
MM_MarkMapPointer markMap = pgc._markingScheme()._markMap();
return new GCMarkMapStandard(markMap);
} else {
MM_SegregatedGCPointer sgc = MM_SegregatedGCPointer.cast(extensions._globalCollector());
MM_MarkMapPointer markMap = sgc._markingScheme()._markMap();
return new GCMarkMap(markMap);
}
} else if (GCExtensions.isVLHGC()) {
// probably needs a proper subclass
MM_IncrementalGenerationalGCPointer igc = MM_IncrementalGenerationalGCPointer.cast(extensions._globalCollector());
MM_MarkMapPointer markMap = igc._markMapManager()._previousMarkMap();
return new GCMarkMap(markMap);
} else if (GCExtensions.isMetronomeGC()) {
MM_MarkMapPointer markMap = extensions.realtimeGC()._markingScheme()._markMap();
return new GCMarkMap(markMap);
} else {
throw new UnsupportedOperationException("GC policy not supported");
}
}
Aggregations