360 template <typename OopClosureType> 361 void ContiguousSpace::oop_since_save_marks_iterate(OopClosureType* blk) { 362 HeapWord* t; 363 HeapWord* p = saved_mark_word(); 364 assert(p != NULL, "expected saved mark"); 365 366 const intx interval = PrefetchScanIntervalInBytes; 367 do { 368 t = top(); 369 while (p < t) { 370 Prefetch::write(p, interval); 371 debug_only(HeapWord* prev = p); 372 oop m = oop(p); 373 p += m->oop_iterate_size(blk); 374 } 375 } while (t < top()); 376 377 set_saved_mark_word(p); 378 } 379 380 #endif // SHARE_VM_GC_SHARED_SPACE_INLINE_HPP | 360 template <typename OopClosureType> 361 void ContiguousSpace::oop_since_save_marks_iterate(OopClosureType* blk) { 362 HeapWord* t; 363 HeapWord* p = saved_mark_word(); 364 assert(p != NULL, "expected saved mark"); 365 366 const intx interval = PrefetchScanIntervalInBytes; 367 do { 368 t = top(); 369 while (p < t) { 370 Prefetch::write(p, interval); 371 debug_only(HeapWord* prev = p); 372 oop m = oop(p); 373 p += m->oop_iterate_size(blk); 374 } 375 } while (t < top()); 376 377 set_saved_mark_word(p); 378 } 379 380 template <typename OopClosureType> 381 void ContiguousSpace::par_oop_iterate(MemRegion mr, OopClosureType* blk) { 382 HeapWord* obj_addr = mr.start(); 383 HeapWord* t = mr.end(); 384 while (obj_addr < t) { 385 assert(oopDesc::is_oop(oop(obj_addr)), "Should be an oop"); 386 obj_addr += oop(obj_addr)->oop_iterate_size(blk); 387 } 388 } 389 390 #endif // SHARE_VM_GC_SHARED_SPACE_INLINE_HPP |