use of com.ibm.j9ddr.vm29.pointer.generated.MM_ParallelGlobalGCPointer 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");
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.MM_ParallelGlobalGCPointer in project openj9 by eclipse.
the class MarkMapCommand method showMarkMap.
protected void showMarkMap(String[] args, Context context, PrintStream out) throws DDRInteractiveCommandException {
showActiveMarkMap(out);
try {
out.format("\nKnown mark maps:\n");
MM_GCExtensionsPointer extensions = GCExtensions.getGCExtensionsPointer();
if (GCExtensions.isStandardGC()) {
MM_ParallelGlobalGCPointer pgc = MM_ParallelGlobalGCPointer.cast(extensions._globalCollector());
MM_MarkMapPointer markMap = pgc._markingScheme()._markMap();
out.format("\tactive: %s\n", markMap.getHexAddress());
} else if (GCExtensions.isVLHGC()) {
// probably needs a proper subclass
MM_IncrementalGenerationalGCPointer igc = MM_IncrementalGenerationalGCPointer.cast(extensions._globalCollector());
out.format("\tprevious: %s\n", igc._markMapManager()._previousMarkMap().getHexAddress());
out.format("\tnext: %s\n", igc._markMapManager()._nextMarkMap().getHexAddress());
} else if (GCExtensions.isMetronomeGC()) {
MM_HeapMapPointer markMap = extensions.realtimeGC()._markingScheme()._markMap();
out.format("\tactive: %s\n", markMap.getHexAddress());
} else {
out.format("\tUnrecognized GC policy!\n");
}
try {
if (extensions.referenceChainWalkerMarkMap().notNull()) {
out.format("\treference chain walker: %s\n", extensions.referenceChainWalkerMarkMap().getHexAddress());
}
} catch (NoSuchFieldError nsf) {
// guess we don't have one
}
} catch (CorruptDataException e) {
throw new DDRInteractiveCommandException(e);
}
}
Aggregations