233 if (card_will_be_scanned(val)) {
234 first_dirty_card = cur; break;
235 } else {
236 assert(!card_may_have_been_dirty(val), "Error");
237 }
238 }
239 if (first_dirty_card != NULL) {
240 NOISY(tty->print_cr(" LNC: Found a dirty card at " PTR_FORMAT " in current chunk",
241 first_dirty_card);)
242 assert(0 <= cur_chunk_index && cur_chunk_index < lowest_non_clean_chunk_size,
243 "Bounds error.");
244 assert(lowest_non_clean[cur_chunk_index] == NULL,
245 "Write exactly once : value should be stable hereafter for this round");
246 lowest_non_clean[cur_chunk_index] = first_dirty_card;
247 } NOISY(else {
248 tty->print_cr(" LNC: Found no dirty card in current chunk; leaving LNC entry NULL");
249 // In the future, we could have this thread look for a non-NULL value to copy from its
250 // right neighbor (up to the end of the first object).
251 if (last_card_of_cur_chunk < last_card_of_first_obj) {
252 tty->print_cr(" LNC: BEWARE!!! first obj straddles past right end of chunk:\n"
253 " might be efficient to get value from right neighbour?");
254 }
255 })
256 } else {
257 // In this case we can help our neighbor by just asking them
258 // to stop at our first card (even though it may not be dirty).
259 NOISY(tty->print_cr(" LNC: first block is not a non-array object; setting LNC to first card of current chunk");)
260 assert(lowest_non_clean[cur_chunk_index] == NULL, "Write once : value should be stable hereafter");
261 jbyte* first_card_of_cur_chunk = byte_for(chunk_mr.start());
262 lowest_non_clean[cur_chunk_index] = first_card_of_cur_chunk;
263 }
264 NOISY(tty->print_cr(" process_chunk_boundary: lowest_non_clean[" INTPTR_FORMAT "] = " PTR_FORMAT
265 " which corresponds to the heap address " PTR_FORMAT,
266 cur_chunk_index, lowest_non_clean[cur_chunk_index],
267 (lowest_non_clean[cur_chunk_index] != NULL)
268 ? addr_for(lowest_non_clean[cur_chunk_index])
269 : NULL);)
270 NOISY(tty->print_cr("---------------------------------------------------------------------------");)
271
272 // Next, set our own max_to_do, which will strictly/exclusively bound
273 // the highest address that we will scan past the right end of our chunk.
|
233 if (card_will_be_scanned(val)) {
234 first_dirty_card = cur; break;
235 } else {
236 assert(!card_may_have_been_dirty(val), "Error");
237 }
238 }
239 if (first_dirty_card != NULL) {
240 NOISY(tty->print_cr(" LNC: Found a dirty card at " PTR_FORMAT " in current chunk",
241 first_dirty_card);)
242 assert(0 <= cur_chunk_index && cur_chunk_index < lowest_non_clean_chunk_size,
243 "Bounds error.");
244 assert(lowest_non_clean[cur_chunk_index] == NULL,
245 "Write exactly once : value should be stable hereafter for this round");
246 lowest_non_clean[cur_chunk_index] = first_dirty_card;
247 } NOISY(else {
248 tty->print_cr(" LNC: Found no dirty card in current chunk; leaving LNC entry NULL");
249 // In the future, we could have this thread look for a non-NULL value to copy from its
250 // right neighbor (up to the end of the first object).
251 if (last_card_of_cur_chunk < last_card_of_first_obj) {
252 tty->print_cr(" LNC: BEWARE!!! first obj straddles past right end of chunk:\n"
253 " might be efficient to get value from right neighbor?");
254 }
255 })
256 } else {
257 // In this case we can help our neighbor by just asking them
258 // to stop at our first card (even though it may not be dirty).
259 NOISY(tty->print_cr(" LNC: first block is not a non-array object; setting LNC to first card of current chunk");)
260 assert(lowest_non_clean[cur_chunk_index] == NULL, "Write once : value should be stable hereafter");
261 jbyte* first_card_of_cur_chunk = byte_for(chunk_mr.start());
262 lowest_non_clean[cur_chunk_index] = first_card_of_cur_chunk;
263 }
264 NOISY(tty->print_cr(" process_chunk_boundary: lowest_non_clean[" INTPTR_FORMAT "] = " PTR_FORMAT
265 " which corresponds to the heap address " PTR_FORMAT,
266 cur_chunk_index, lowest_non_clean[cur_chunk_index],
267 (lowest_non_clean[cur_chunk_index] != NULL)
268 ? addr_for(lowest_non_clean[cur_chunk_index])
269 : NULL);)
270 NOISY(tty->print_cr("---------------------------------------------------------------------------");)
271
272 // Next, set our own max_to_do, which will strictly/exclusively bound
273 // the highest address that we will scan past the right end of our chunk.
|