hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp
changeset 9179 6db9c9dffe1f
parent 8921 14bfe81f2a9d
parent 9176 42d9d1010f38
child 15482 470d0b0c09f1
equal deleted inserted replaced
8932:a676b28e2093 9179:6db9c9dffe1f
    35 
    35 
    36 // This barrier is specialized to use a logging barrier to support
    36 // This barrier is specialized to use a logging barrier to support
    37 // snapshot-at-the-beginning marking.
    37 // snapshot-at-the-beginning marking.
    38 
    38 
    39 class G1SATBCardTableModRefBS: public CardTableModRefBSForCTRS {
    39 class G1SATBCardTableModRefBS: public CardTableModRefBSForCTRS {
    40 private:
    40 public:
    41   // Add "pre_val" to a set of objects that may have been disconnected from the
    41   // Add "pre_val" to a set of objects that may have been disconnected from the
    42   // pre-marking object graph.
    42   // pre-marking object graph.
    43   static void enqueue(oop pre_val);
    43   static void enqueue(oop pre_val);
    44 
    44 
    45 public:
       
    46   G1SATBCardTableModRefBS(MemRegion whole_heap,
    45   G1SATBCardTableModRefBS(MemRegion whole_heap,
    47                           int max_covered_regions);
    46                           int max_covered_regions);
    48 
    47 
    49   bool is_a(BarrierSet::Name bsn) {
    48   bool is_a(BarrierSet::Name bsn) {
    50     return bsn == BarrierSet::G1SATBCT || CardTableModRefBS::is_a(bsn);
    49     return bsn == BarrierSet::G1SATBCT || CardTableModRefBS::is_a(bsn);
    58     T heap_oop = oopDesc::load_heap_oop(field);
    57     T heap_oop = oopDesc::load_heap_oop(field);
    59     if (!oopDesc::is_null(heap_oop)) {
    58     if (!oopDesc::is_null(heap_oop)) {
    60       enqueue(oopDesc::decode_heap_oop(heap_oop));
    59       enqueue(oopDesc::decode_heap_oop(heap_oop));
    61     }
    60     }
    62   }
    61   }
    63 
       
    64   // When we know the current java thread:
       
    65   template <class T> static void write_ref_field_pre_static(T* field, oop newVal,
       
    66                                                             JavaThread* jt);
       
    67 
    62 
    68   // We export this to make it available in cases where the static
    63   // We export this to make it available in cases where the static
    69   // type of the barrier set is known.  Note that it is non-virtual.
    64   // type of the barrier set is known.  Note that it is non-virtual.
    70   template <class T> inline void inline_write_ref_field_pre(T* field, oop newVal) {
    65   template <class T> inline void inline_write_ref_field_pre(T* field, oop newVal) {
    71     write_ref_field_pre_static(field, newVal);
    66     write_ref_field_pre_static(field, newVal);