Search in sources :

Example 1 with MM_GCExtensionsPointer

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);
}
Also used : MM_HeapRegionManagerPointer(com.ibm.j9ddr.vm29.pointer.generated.MM_HeapRegionManagerPointer) J9JavaVMPointer(com.ibm.j9ddr.vm29.pointer.generated.J9JavaVMPointer) MM_GCExtensionsPointer(com.ibm.j9ddr.vm29.pointer.generated.MM_GCExtensionsPointer)

Example 2 with MM_GCExtensionsPointer

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));
}
Also used : MM_HeapRegionManagerPointer(com.ibm.j9ddr.vm29.pointer.generated.MM_HeapRegionManagerPointer) MM_GCExtensionsPointer(com.ibm.j9ddr.vm29.pointer.generated.MM_GCExtensionsPointer)

Example 3 with MM_GCExtensionsPointer

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);
}
Also used : MM_CardTablePointer(com.ibm.j9ddr.vm29.pointer.generated.MM_CardTablePointer) J9JavaVMPointer(com.ibm.j9ddr.vm29.pointer.generated.J9JavaVMPointer) MM_GCExtensionsPointer(com.ibm.j9ddr.vm29.pointer.generated.MM_GCExtensionsPointer)

Example 4 with MM_GCExtensionsPointer

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");
}
Also used : MM_GCExtensionsPointer(com.ibm.j9ddr.vm29.pointer.generated.MM_GCExtensionsPointer) CorruptDataException(com.ibm.j9ddr.CorruptDataException)

Example 5 with MM_GCExtensionsPointer

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");
    }
}
Also used : MM_SegregatedGCPointer(com.ibm.j9ddr.vm29.pointer.generated.MM_SegregatedGCPointer) MM_IncrementalGenerationalGCPointer(com.ibm.j9ddr.vm29.pointer.generated.MM_IncrementalGenerationalGCPointer) MM_ParallelGlobalGCPointer(com.ibm.j9ddr.vm29.pointer.generated.MM_ParallelGlobalGCPointer) MM_GCExtensionsPointer(com.ibm.j9ddr.vm29.pointer.generated.MM_GCExtensionsPointer) MM_MarkMapPointer(com.ibm.j9ddr.vm29.pointer.generated.MM_MarkMapPointer)

Aggregations

MM_GCExtensionsPointer (com.ibm.j9ddr.vm29.pointer.generated.MM_GCExtensionsPointer)10 J9JavaVMPointer (com.ibm.j9ddr.vm29.pointer.generated.J9JavaVMPointer)5 CorruptDataException (com.ibm.j9ddr.CorruptDataException)4 MM_HeapRegionManagerPointer (com.ibm.j9ddr.vm29.pointer.generated.MM_HeapRegionManagerPointer)4 DDRInteractiveCommandException (com.ibm.j9ddr.tools.ddrinteractive.DDRInteractiveCommandException)3 MM_IncrementalGenerationalGCPointer (com.ibm.j9ddr.vm29.pointer.generated.MM_IncrementalGenerationalGCPointer)3 MM_HeapMapPointer (com.ibm.j9ddr.vm29.pointer.generated.MM_HeapMapPointer)2 MM_MarkMapPointer (com.ibm.j9ddr.vm29.pointer.generated.MM_MarkMapPointer)2 MM_ParallelGlobalGCPointer (com.ibm.j9ddr.vm29.pointer.generated.MM_ParallelGlobalGCPointer)2 ObjectMonitor (com.ibm.j9ddr.vm29.j9.ObjectMonitor)1 GCHeapMap (com.ibm.j9ddr.vm29.j9.gc.GCHeapMap)1 GCHeapRegionDescriptor (com.ibm.j9ddr.vm29.j9.gc.GCHeapRegionDescriptor)1 GCHeapRegionIterator (com.ibm.j9ddr.vm29.j9.gc.GCHeapRegionIterator)1 J9ObjectPointer (com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer)1 J9VMGCSegregatedAllocationCacheEntryPointer (com.ibm.j9ddr.vm29.pointer.generated.J9VMGCSegregatedAllocationCacheEntryPointer)1 J9VMGCSizeClassesPointer (com.ibm.j9ddr.vm29.pointer.generated.J9VMGCSizeClassesPointer)1 J9VMThreadPointer (com.ibm.j9ddr.vm29.pointer.generated.J9VMThreadPointer)1 MM_AllocationContextPointer (com.ibm.j9ddr.vm29.pointer.generated.MM_AllocationContextPointer)1 MM_CardTablePointer (com.ibm.j9ddr.vm29.pointer.generated.MM_CardTablePointer)1 MM_HeapRegionListPointer (com.ibm.j9ddr.vm29.pointer.generated.MM_HeapRegionListPointer)1