equal
deleted
inserted
replaced
25 |
25 |
26 #include "gc/shenandoah/shenandoahHeap.inline.hpp" |
26 #include "gc/shenandoah/shenandoahHeap.inline.hpp" |
27 #include "gc/shenandoah/shenandoahSATBMarkQueueSet.hpp" |
27 #include "gc/shenandoah/shenandoahSATBMarkQueueSet.hpp" |
28 #include "gc/shenandoah/shenandoahThreadLocalData.hpp" |
28 #include "gc/shenandoah/shenandoahThreadLocalData.hpp" |
29 |
29 |
30 ShenandoahSATBMarkQueueSet::ShenandoahSATBMarkQueueSet() : |
30 ShenandoahSATBMarkQueueSet::ShenandoahSATBMarkQueueSet(BufferNode::Allocator* allocator) : |
31 _heap(NULL), |
31 SATBMarkQueueSet(allocator) |
32 _satb_mark_queue_buffer_allocator("SATB Buffer Allocator", ShenandoahSATBBufferSize) |
|
33 {} |
32 {} |
34 |
|
35 void ShenandoahSATBMarkQueueSet::initialize(ShenandoahHeap* const heap, |
|
36 Monitor* cbl_mon, |
|
37 int process_completed_threshold, |
|
38 uint buffer_enqueue_threshold_percentage) { |
|
39 SATBMarkQueueSet::initialize(cbl_mon, |
|
40 &_satb_mark_queue_buffer_allocator, |
|
41 process_completed_threshold, |
|
42 buffer_enqueue_threshold_percentage); |
|
43 _heap = heap; |
|
44 } |
|
45 |
33 |
46 SATBMarkQueue& ShenandoahSATBMarkQueueSet::satb_queue_for_thread(Thread* const t) const { |
34 SATBMarkQueue& ShenandoahSATBMarkQueueSet::satb_queue_for_thread(Thread* const t) const { |
47 return ShenandoahThreadLocalData::satb_mark_queue(t); |
35 return ShenandoahThreadLocalData::satb_mark_queue(t); |
48 } |
36 } |
49 |
37 |
60 return !_heap->requires_marking<RESOLVE>(entry); |
48 return !_heap->requires_marking<RESOLVE>(entry); |
61 } |
49 } |
62 }; |
50 }; |
63 |
51 |
64 void ShenandoahSATBMarkQueueSet::filter(SATBMarkQueue* queue) { |
52 void ShenandoahSATBMarkQueueSet::filter(SATBMarkQueue* queue) { |
65 assert(_heap != NULL, "SATB queue set not initialized"); |
53 ShenandoahHeap* heap = ShenandoahHeap::heap(); |
66 if (_heap->has_forwarded_objects()) { |
54 if (heap->has_forwarded_objects()) { |
67 apply_filter(ShenandoahSATBMarkQueueFilterFn<true>(_heap), queue); |
55 apply_filter(ShenandoahSATBMarkQueueFilterFn<true>(heap), queue); |
68 } else { |
56 } else { |
69 apply_filter(ShenandoahSATBMarkQueueFilterFn<false>(_heap), queue); |
57 apply_filter(ShenandoahSATBMarkQueueFilterFn<false>(heap), queue); |
70 } |
58 } |
71 } |
59 } |
72 |
60 |
73 void ShenandoahSATBMarkQueue::handle_completed_buffer() { |
61 void ShenandoahSATBMarkQueue::handle_completed_buffer() { |
74 SATBMarkQueue::handle_completed_buffer(); |
62 SATBMarkQueue::handle_completed_buffer(); |