// Return true if a SATB buffer entry refers to an object that // requires marking. // // The entry must point into the G1 heap. In particular, it must not // be a NULL pointer. NULL pointers are pre-filtered and never // inserted into a SATB buffer. // // An entry that is below the TAMS pointer for the containing heap // region requires marking. Such an entry must point to a valid object. // // An entry that is at least the TAMS pointer for the containing heap // region might be any of the following, none of which should be marked. // // * A reference to an object allocated since marking started. // According to SATB, such objects are implicitly kept live and do // not need to be dealt with via SATB buffer processing. // // * A reference to a young generation object. Young objects are // handled separately and are not marked by concurrent marking. // // * A stale reference to a young generation object. If a young // generation object reference is recorded and not filtered out // before being moved by a young collection, the reference becomes // stale. // // * A stale reference to an eagerly reclaimed humongous object. If a // humongous object is recorded and then reclaimed, the reference // becomes stale. // // The stale reference cases are implicitly handled by the TAMS // comparison. Because of the possibility of stale references, buffer // processing must be somewhat circumspect and not assume entries // in an unfiltered buffer refer to valid objects.
staticinlinebool requires_marking(constvoid* entry, G1CollectedHeap* g1h) { // Includes rejection of NULL pointers.
assert(g1h->is_in_reserved(entry), "Non-heap pointer in SATB buffer: " PTR_FORMAT, p2i(entry));
HeapRegion* region = g1h->heap_region_containing(entry); if (entry >= region->top_at_mark_start()) { returnfalse;
}
assert(oopDesc::is_oop(cast_to_oop(entry), true/* ignore mark word */), "Invalid oop in SATB buffer: " PTR_FORMAT, p2i(entry));
// Return true if entry should be filtered out (removed), false if // it should be retained. booloperator()(constvoid* entry) const { return discard_entry(entry, _g1h);
}
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.