// This kind of "BarrierSet" allows a "CollectedHeap" to detect and // enumerate ref fields that have been modified (since the last // enumeration.)
// As it currently stands, this barrier is *imprecise*: when a ref field in // an object "o" is modified, the card table entry for the card containing // the head of "o" is dirtied, not necessarily the card containing the // modified field itself. For object arrays, however, the barrier *is* // precise; only the card containing the modified element is dirtied. // Closures used to scan dirty cards should take these // considerations into account.
class CardTableBarrierSet: public ModRefBarrierSet { // Some classes get to look at some private stuff. friendclass VMStructs;
public:
typedef CardTable::CardValue CardValue; protected: // Used in support of ReduceInitialCardMarks; only consulted if COMPILER2 // or INCLUDE_JVMCI is being used bool _defer_initial_card_mark;
CardTable* _card_table;
public: // Record a reference update. Note that these versions are precise! // The scanning code has to handle the fact that the write barrier may be // either precise or imprecise. We make non-virtual inline variants of // these functions here for performance. template <DecoratorSet decorators, typename T> void write_ref_field_post(T* field, oop newVal);
// If the CollectedHeap was asked to defer a store barrier above, // this informs it to flush such a deferred store barrier to the // remembered set. void flush_deferred_card_mark_barrier(JavaThread* thread);
// If a compiler is eliding store barriers for TLAB-allocated objects, // we will be informed of a slow-path allocation by a call // to on_slowpath_allocation_exit() below. Such a call precedes the // initialization of the object itself, and no post-store-barriers will // be issued. Some heap types require that the barrier strictly follows // the initializing stores. (This is currently implemented by deferring the // barrier until the next slow-path allocation or gc-related safepoint.) // This interface answers whether a particular barrier type needs the card // mark to be thus strictly sequenced after the stores. virtualbool card_mark_must_follow_store() const;
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.