111 // The card bitmap is task/worker specific => no need to use
112 // the 'par' BitMap routines.
113 // Set bits in the exclusive bit range [start_idx, end_idx).
114 set_card_bitmap_range(task_card_bm, start_idx, end_idx, false /* is_par */);
115 }
116
117 // Counts the given object in the given task/worker counting data structures.
118 inline void ConcurrentMark::count_object(oop obj,
119 HeapRegion* hr,
120 size_t* marked_bytes_array,
121 BitMap* task_card_bm,
122 size_t word_size) {
123 assert(!hr->is_continues_humongous(), "Cannot enter count_object with continues humongous");
124 if (!hr->is_starts_humongous()) {
125 MemRegion mr((HeapWord*)obj, word_size);
126 count_region(mr, hr, marked_bytes_array, task_card_bm);
127 } else {
128 do {
129 MemRegion mr(hr->bottom(), hr->top());
130 count_region(mr, hr, marked_bytes_array, task_card_bm);
131 hr = _g1h->next_humongous_region(hr);
132 } while (hr != NULL);
133 }
134 }
135
136 // Attempts to mark the given object and, if successful, counts
137 // the object in the given task/worker counting structures.
138 inline bool ConcurrentMark::par_mark_and_count(oop obj,
139 HeapRegion* hr,
140 size_t* marked_bytes_array,
141 BitMap* task_card_bm) {
142 if (_nextMarkBitMap->parMark((HeapWord*)obj)) {
143 // Update the task specific count data for the object.
144 count_object(obj, hr, marked_bytes_array, task_card_bm, obj->size());
145 return true;
146 }
147 return false;
148 }
149
150 // Attempts to mark the given object and, if successful, counts
151 // the object in the task/worker counting structures for the
|
111 // The card bitmap is task/worker specific => no need to use
112 // the 'par' BitMap routines.
113 // Set bits in the exclusive bit range [start_idx, end_idx).
114 set_card_bitmap_range(task_card_bm, start_idx, end_idx, false /* is_par */);
115 }
116
117 // Counts the given object in the given task/worker counting data structures.
118 inline void ConcurrentMark::count_object(oop obj,
119 HeapRegion* hr,
120 size_t* marked_bytes_array,
121 BitMap* task_card_bm,
122 size_t word_size) {
123 assert(!hr->is_continues_humongous(), "Cannot enter count_object with continues humongous");
124 if (!hr->is_starts_humongous()) {
125 MemRegion mr((HeapWord*)obj, word_size);
126 count_region(mr, hr, marked_bytes_array, task_card_bm);
127 } else {
128 do {
129 MemRegion mr(hr->bottom(), hr->top());
130 count_region(mr, hr, marked_bytes_array, task_card_bm);
131 hr = _g1h->next_region_in_humongous(hr);
132 } while (hr != NULL);
133 }
134 }
135
136 // Attempts to mark the given object and, if successful, counts
137 // the object in the given task/worker counting structures.
138 inline bool ConcurrentMark::par_mark_and_count(oop obj,
139 HeapRegion* hr,
140 size_t* marked_bytes_array,
141 BitMap* task_card_bm) {
142 if (_nextMarkBitMap->parMark((HeapWord*)obj)) {
143 // Update the task specific count data for the object.
144 count_object(obj, hr, marked_bytes_array, task_card_bm, obj->size());
145 return true;
146 }
147 return false;
148 }
149
150 // Attempts to mark the given object and, if successful, counts
151 // the object in the task/worker counting structures for the
|