Search in sources :

Example 1 with GCRememberedSetSlotIterator

use of com.ibm.j9ddr.vm29.j9.gc.GCRememberedSetSlotIterator in project openj9 by eclipse.

the class RootScanner method scanRememberedSet.

protected void scanRememberedSet() throws CorruptDataException {
    if (!J9BuildFlags.gc_modronScavenger)
        return;
    setReachability(Reachability.WEAK);
    GCRememberedSetIterator rememberedSetIterator = GCRememberedSetIterator.from();
    while (rememberedSetIterator.hasNext()) {
        MM_SublistPuddlePointer puddle = rememberedSetIterator.next();
        GCRememberedSetSlotIterator rememberedSetSlotIterator = GCRememberedSetSlotIterator.fromSublistPuddle(puddle);
        GCRememberedSetSlotIterator addressIterator = GCRememberedSetSlotIterator.fromSublistPuddle(puddle);
        while (rememberedSetSlotIterator.hasNext()) {
            doRememberedSlot(rememberedSetSlotIterator.next(), addressIterator.nextAddress());
        }
    }
}
Also used : GCRememberedSetSlotIterator(com.ibm.j9ddr.vm29.j9.gc.GCRememberedSetSlotIterator) GCRememberedSetIterator(com.ibm.j9ddr.vm29.j9.gc.GCRememberedSetIterator) MM_SublistPuddlePointer(com.ibm.j9ddr.vm29.pointer.generated.MM_SublistPuddlePointer)

Example 2 with GCRememberedSetSlotIterator

use of com.ibm.j9ddr.vm29.j9.gc.GCRememberedSetSlotIterator in project openj9 by eclipse.

the class CheckRememberedSet method print.

@Override
public void print() {
    try {
        GCRememberedSetIterator remSetIterator = GCRememberedSetIterator.from();
        ScanFormatter formatter = new ScanFormatter(this, "RememberedSet Sublist", getGCExtensions().rememberedSetEA());
        while (remSetIterator.hasNext()) {
            MM_SublistPuddlePointer puddle = remSetIterator.next();
            formatter.section("puddle", puddle);
            GCRememberedSetSlotIterator remSetSlotIterator = GCRememberedSetSlotIterator.fromSublistPuddle(puddle);
            while (remSetSlotIterator.hasNext()) {
                formatter.entry(remSetSlotIterator.next());
            }
            formatter.endSection();
        }
        formatter.end("RememberedSet Sublist", getGCExtensions().rememberedSetEA());
    } catch (CorruptDataException e) {
    // TODO: handle exception
    }
}
Also used : GCRememberedSetSlotIterator(com.ibm.j9ddr.vm29.j9.gc.GCRememberedSetSlotIterator) GCRememberedSetIterator(com.ibm.j9ddr.vm29.j9.gc.GCRememberedSetIterator) MM_SublistPuddlePointer(com.ibm.j9ddr.vm29.pointer.generated.MM_SublistPuddlePointer) CorruptDataException(com.ibm.j9ddr.CorruptDataException)

Example 3 with GCRememberedSetSlotIterator

use of com.ibm.j9ddr.vm29.j9.gc.GCRememberedSetSlotIterator in project openj9 by eclipse.

the class CheckRememberedSet method check.

@Override
public void check() {
    try {
        /* no point checking if the scavenger wasn't turned on */
        if (!J9BuildFlags.gc_modronScavenger || !_extensions.scavengerEnabled()) {
            return;
        }
        GCRememberedSetIterator remSetIterator = GCRememberedSetIterator.from();
        while (remSetIterator.hasNext()) {
            MM_SublistPuddlePointer puddle = remSetIterator.next();
            GCRememberedSetSlotIterator remSetSlotIterator = GCRememberedSetSlotIterator.fromSublistPuddle(puddle);
            while (remSetSlotIterator.hasNext()) {
                PointerPointer objectIndirect = PointerPointer.cast(remSetSlotIterator.nextAddress());
                if (_engine.checkSlotRememberedSet(objectIndirect, puddle) != J9MODRON_SLOT_ITERATOR_OK) {
                    return;
                }
            }
        }
    } catch (CorruptDataException e) {
    // TODO: handle exception
    }
}
Also used : PointerPointer(com.ibm.j9ddr.vm29.pointer.PointerPointer) GCRememberedSetSlotIterator(com.ibm.j9ddr.vm29.j9.gc.GCRememberedSetSlotIterator) GCRememberedSetIterator(com.ibm.j9ddr.vm29.j9.gc.GCRememberedSetIterator) MM_SublistPuddlePointer(com.ibm.j9ddr.vm29.pointer.generated.MM_SublistPuddlePointer) CorruptDataException(com.ibm.j9ddr.CorruptDataException)

Aggregations

GCRememberedSetIterator (com.ibm.j9ddr.vm29.j9.gc.GCRememberedSetIterator)3 GCRememberedSetSlotIterator (com.ibm.j9ddr.vm29.j9.gc.GCRememberedSetSlotIterator)3 MM_SublistPuddlePointer (com.ibm.j9ddr.vm29.pointer.generated.MM_SublistPuddlePointer)3 CorruptDataException (com.ibm.j9ddr.CorruptDataException)2 PointerPointer (com.ibm.j9ddr.vm29.pointer.PointerPointer)1