33 class CardTable;
34 class G1CardTable;
35
36 // This barrier is specialized to use a logging barrier to support
37 // snapshot-at-the-beginning marking.
38
39 class G1BarrierSet: public CardTableBarrierSet {
40 friend class VMStructs;
41 private:
42 static SATBMarkQueueSet _satb_mark_queue_set;
43 static DirtyCardQueueSet _dirty_card_queue_set;
44
45 public:
46 G1BarrierSet(G1CardTable* table);
47 ~G1BarrierSet() { }
48
49 // Add "pre_val" to a set of objects that may have been disconnected from the
50 // pre-marking object graph.
51 static void enqueue(oop pre_val);
52
53 static void enqueue_if_weak_or_archive(DecoratorSet decorators, oop value);
54
55 template <class T> void write_ref_array_pre_work(T* dst, size_t count);
56 virtual void write_ref_array_pre(oop* dst, size_t count, bool dest_uninitialized);
57 virtual void write_ref_array_pre(narrowOop* dst, size_t count, bool dest_uninitialized);
58
59 template <DecoratorSet decorators, typename T>
60 void write_ref_field_pre(T* field);
61
62 // NB: if you do a whole-heap invalidation, the "usual invariant" defined
63 // above no longer applies.
64 void invalidate(MemRegion mr);
65
66 void write_region(MemRegion mr) { invalidate(mr); }
67 void write_ref_array_work(MemRegion mr) { invalidate(mr); }
68
69 template <DecoratorSet decorators, typename T>
70 void write_ref_field_post(T* field, oop new_val);
71 void write_ref_field_post_slow(volatile jbyte* byte);
72
73 virtual void on_thread_create(Thread* thread);
|
33 class CardTable;
34 class G1CardTable;
35
36 // This barrier is specialized to use a logging barrier to support
37 // snapshot-at-the-beginning marking.
38
39 class G1BarrierSet: public CardTableBarrierSet {
40 friend class VMStructs;
41 private:
42 static SATBMarkQueueSet _satb_mark_queue_set;
43 static DirtyCardQueueSet _dirty_card_queue_set;
44
45 public:
46 G1BarrierSet(G1CardTable* table);
47 ~G1BarrierSet() { }
48
49 // Add "pre_val" to a set of objects that may have been disconnected from the
50 // pre-marking object graph.
51 static void enqueue(oop pre_val);
52
53 static void enqueue_if_weak(DecoratorSet decorators, oop value);
54
55 template <class T> void write_ref_array_pre_work(T* dst, size_t count);
56 virtual void write_ref_array_pre(oop* dst, size_t count, bool dest_uninitialized);
57 virtual void write_ref_array_pre(narrowOop* dst, size_t count, bool dest_uninitialized);
58
59 template <DecoratorSet decorators, typename T>
60 void write_ref_field_pre(T* field);
61
62 // NB: if you do a whole-heap invalidation, the "usual invariant" defined
63 // above no longer applies.
64 void invalidate(MemRegion mr);
65
66 void write_region(MemRegion mr) { invalidate(mr); }
67 void write_ref_array_work(MemRegion mr) { invalidate(mr); }
68
69 template <DecoratorSet decorators, typename T>
70 void write_ref_field_post(T* field, oop new_val);
71 void write_ref_field_post_slow(volatile jbyte* byte);
72
73 virtual void on_thread_create(Thread* thread);
|