< prev index next >

src/share/vm/gc/parallel/cardTableExtension.cpp

Print this page




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




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


< prev index next >