268 } else if (to > sp_top) { 269 to = sp_top; 270 } 271 272 // we know which cards to scan, now clear them 273 if (first_unclean_card <= worker_start_card+1) 274 first_unclean_card = worker_start_card+1; 275 if (following_clean_card >= worker_end_card-1) 276 following_clean_card = worker_end_card-1; 277 278 while (first_unclean_card < following_clean_card) { 279 *first_unclean_card++ = clean_card; 280 } 281 282 const int interval = PrefetchScanIntervalInBytes; 283 // scan all objects in the range 284 if (interval != 0) { 285 while (p < to) { 286 Prefetch::write(p, interval); 287 oop m = oop(p); 288 assert(m->is_oop_or_null(), err_msg("Expected an oop or NULL for header field at " PTR_FORMAT, p2i(m))); 289 pm->push_contents(m); 290 p += m->size(); 291 } 292 pm->drain_stacks_cond_depth(); 293 } else { 294 while (p < to) { 295 oop m = oop(p); 296 assert(m->is_oop_or_null(), err_msg("Expected an oop or NULL for header field at " PTR_FORMAT, p2i(m))); 297 pm->push_contents(m); 298 p += m->size(); 299 } 300 pm->drain_stacks_cond_depth(); 301 } 302 last_scanned = p; 303 } 304 // "current_card" is still the "following_clean_card" or 305 // the current_card is >= the worker_end_card so the 306 // loop will not execute again. 307 assert((current_card == following_clean_card) || 308 (current_card >= worker_end_card), 309 "current_card should only be incremented if it still equals " 310 "following_clean_card"); 311 // Increment current_card so that it is not processed again. 312 // It may now be dirty because a old-to-young pointer was 313 // found on it an updated. If it is now dirty, it cannot be 314 // be safely cleaned in the next iteration. 315 current_card++; 316 } | 268 } else if (to > sp_top) { 269 to = sp_top; 270 } 271 272 // we know which cards to scan, now clear them 273 if (first_unclean_card <= worker_start_card+1) 274 first_unclean_card = worker_start_card+1; 275 if (following_clean_card >= worker_end_card-1) 276 following_clean_card = worker_end_card-1; 277 278 while (first_unclean_card < following_clean_card) { 279 *first_unclean_card++ = clean_card; 280 } 281 282 const int interval = PrefetchScanIntervalInBytes; 283 // scan all objects in the range 284 if (interval != 0) { 285 while (p < to) { 286 Prefetch::write(p, interval); 287 oop m = oop(p); 288 assert(m->is_oop_or_null(), "Expected an oop or NULL for header field at " PTR_FORMAT, p2i(m)); 289 pm->push_contents(m); 290 p += m->size(); 291 } 292 pm->drain_stacks_cond_depth(); 293 } else { 294 while (p < to) { 295 oop m = oop(p); 296 assert(m->is_oop_or_null(), "Expected an oop or NULL for header field at " PTR_FORMAT, p2i(m)); 297 pm->push_contents(m); 298 p += m->size(); 299 } 300 pm->drain_stacks_cond_depth(); 301 } 302 last_scanned = p; 303 } 304 // "current_card" is still the "following_clean_card" or 305 // the current_card is >= the worker_end_card so the 306 // loop will not execute again. 307 assert((current_card == following_clean_card) || 308 (current_card >= worker_end_card), 309 "current_card should only be incremented if it still equals " 310 "following_clean_card"); 311 // Increment current_card so that it is not processed again. 312 // It may now be dirty because a old-to-young pointer was 313 // found on it an updated. If it is now dirty, it cannot be 314 // be safely cleaned in the next iteration. 315 current_card++; 316 } |