hotspot/src/share/vm/memory/cardTableModRefBS.hpp

Print this page




  27 // enumeration.)
  28 
  29 // As it currently stands, this barrier is *imprecise*: when a ref field in
  30 // an object "o" is modified, the card table entry for the card containing
  31 // the head of "o" is dirtied, not necessarily the card containing the
  32 // modified field itself.  For object arrays, however, the barrier *is*
  33 // precise; only the card containing the modified element is dirtied.
  34 // Any MemRegionClosures used to scan dirty cards should take these
  35 // considerations into account.
  36 
  37 class Generation;
  38 class OopsInGenClosure;
  39 class DirtyCardToOopClosure;
  40 
  41 class CardTableModRefBS: public ModRefBarrierSet {
  42   // Some classes get to look at some private stuff.
  43   friend class BytecodeInterpreter;
  44   friend class VMStructs;
  45   friend class CardTableRS;
  46   friend class CheckForUnmarkedOops; // Needs access to raw card bytes.

  47 #ifndef PRODUCT
  48   // For debugging.
  49   friend class GuaranteeNotModClosure;
  50 #endif
  51  protected:
  52 
  53   enum CardValues {
  54     clean_card                  = -1,
  55     // The mask contains zeros in places for all other values.
  56     clean_card_mask             = clean_card - 31,
  57 
  58     dirty_card                  =  0,
  59     precleaned_card             =  1,
  60     claimed_card                =  2,
  61     deferred_card               =  4,
  62     last_card                   =  8,
  63     CT_MR_BS_last_reserved      = 16
  64   };
  65 
  66   // dirty and precleaned are equivalent wrt younger_refs_iter.




  27 // enumeration.)
  28 
  29 // As it currently stands, this barrier is *imprecise*: when a ref field in
  30 // an object "o" is modified, the card table entry for the card containing
  31 // the head of "o" is dirtied, not necessarily the card containing the
  32 // modified field itself.  For object arrays, however, the barrier *is*
  33 // precise; only the card containing the modified element is dirtied.
  34 // Any MemRegionClosures used to scan dirty cards should take these
  35 // considerations into account.
  36 
  37 class Generation;
  38 class OopsInGenClosure;
  39 class DirtyCardToOopClosure;
  40 
  41 class CardTableModRefBS: public ModRefBarrierSet {
  42   // Some classes get to look at some private stuff.
  43   friend class BytecodeInterpreter;
  44   friend class VMStructs;
  45   friend class CardTableRS;
  46   friend class CheckForUnmarkedOops; // Needs access to raw card bytes.
  47   friend class SharkBuilder;
  48 #ifndef PRODUCT
  49   // For debugging.
  50   friend class GuaranteeNotModClosure;
  51 #endif
  52  protected:
  53 
  54   enum CardValues {
  55     clean_card                  = -1,
  56     // The mask contains zeros in places for all other values.
  57     clean_card_mask             = clean_card - 31,
  58 
  59     dirty_card                  =  0,
  60     precleaned_card             =  1,
  61     claimed_card                =  2,
  62     deferred_card               =  4,
  63     last_card                   =  8,
  64     CT_MR_BS_last_reserved      = 16
  65   };
  66 
  67   // dirty and precleaned are equivalent wrt younger_refs_iter.