21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc/g1/g1CollectedHeap.inline.hpp"
27 #include "gc/g1/g1SATBMarkQueueSet.hpp"
28 #include "gc/g1/g1ThreadLocalData.hpp"
29 #include "gc/g1/heapRegion.hpp"
30 #include "gc/shared/satbMarkQueue.hpp"
31 #include "oops/oop.hpp"
32 #include "utilities/debug.hpp"
33 #include "utilities/globalDefinitions.hpp"
34
35 G1SATBMarkQueueSet::G1SATBMarkQueueSet() : _g1h(NULL) {}
36
37 void G1SATBMarkQueueSet::initialize(G1CollectedHeap* g1h,
38 Monitor* cbl_mon,
39 BufferNode::Allocator* allocator,
40 size_t process_completed_buffers_threshold,
41 uint buffer_enqueue_threshold_percentage,
42 Mutex* lock) {
43 SATBMarkQueueSet::initialize(cbl_mon,
44 allocator,
45 process_completed_buffers_threshold,
46 buffer_enqueue_threshold_percentage,
47 lock);
48 _g1h = g1h;
49 }
50
51 void G1SATBMarkQueueSet::handle_zero_index_for_thread(JavaThread* t) {
52 G1ThreadLocalData::satb_mark_queue(t).handle_zero_index();
53 }
54
55 SATBMarkQueue& G1SATBMarkQueueSet::satb_queue_for_thread(JavaThread* const t) const{
56 return G1ThreadLocalData::satb_mark_queue(t);
57 }
58
59 // Return true if a SATB buffer entry refers to an object that
60 // requires marking.
61 //
62 // The entry must point into the G1 heap. In particular, it must not
63 // be a NULL pointer. NULL pointers are pre-filtered and never
64 // inserted into a SATB buffer.
65 //
66 // An entry that is below the NTAMS pointer for the containing heap
67 // region requires marking. Such an entry must point to a valid object.
68 //
69 // An entry that is at least the NTAMS pointer for the containing heap
70 // region might be any of the following, none of which should be marked.
71 //
72 // * A reference to an object allocated since marking started.
73 // According to SATB, such objects are implicitly kept live and do
74 // not need to be dealt with via SATB buffer processing.
75 //
|
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc/g1/g1CollectedHeap.inline.hpp"
27 #include "gc/g1/g1SATBMarkQueueSet.hpp"
28 #include "gc/g1/g1ThreadLocalData.hpp"
29 #include "gc/g1/heapRegion.hpp"
30 #include "gc/shared/satbMarkQueue.hpp"
31 #include "oops/oop.hpp"
32 #include "utilities/debug.hpp"
33 #include "utilities/globalDefinitions.hpp"
34
35 G1SATBMarkQueueSet::G1SATBMarkQueueSet() : _g1h(NULL) {}
36
37 void G1SATBMarkQueueSet::initialize(G1CollectedHeap* g1h,
38 Monitor* cbl_mon,
39 BufferNode::Allocator* allocator,
40 size_t process_completed_buffers_threshold,
41 uint buffer_enqueue_threshold_percentage) {
42 SATBMarkQueueSet::initialize(cbl_mon,
43 allocator,
44 process_completed_buffers_threshold,
45 buffer_enqueue_threshold_percentage);
46 _g1h = g1h;
47 }
48
49 void G1SATBMarkQueueSet::handle_zero_index_for_thread(Thread* t) {
50 G1ThreadLocalData::satb_mark_queue(t).handle_zero_index();
51 }
52
53 SATBMarkQueue& G1SATBMarkQueueSet::satb_queue_for_thread(Thread* const t) const{
54 return G1ThreadLocalData::satb_mark_queue(t);
55 }
56
57 // Return true if a SATB buffer entry refers to an object that
58 // requires marking.
59 //
60 // The entry must point into the G1 heap. In particular, it must not
61 // be a NULL pointer. NULL pointers are pre-filtered and never
62 // inserted into a SATB buffer.
63 //
64 // An entry that is below the NTAMS pointer for the containing heap
65 // region requires marking. Such an entry must point to a valid object.
66 //
67 // An entry that is at least the NTAMS pointer for the containing heap
68 // region might be any of the following, none of which should be marked.
69 //
70 // * A reference to an object allocated since marking started.
71 // According to SATB, such objects are implicitly kept live and do
72 // not need to be dealt with via SATB buffer processing.
73 //
|