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