< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp

Print this page
rev 59179 : 8244551: Shenandoah: Fix racy update of update_watermark


 347     case _cset:
 348       st->print("|CS ");
 349       break;
 350     case _trash:
 351       st->print("|T  ");
 352       break;
 353     case _pinned:
 354       st->print("|P  ");
 355       break;
 356     case _pinned_cset:
 357       st->print("|CSP");
 358       break;
 359     default:
 360       ShouldNotReachHere();
 361   }
 362   st->print("|BTE " INTPTR_FORMAT_W(12) ", " INTPTR_FORMAT_W(12) ", " INTPTR_FORMAT_W(12),
 363             p2i(bottom()), p2i(top()), p2i(end()));
 364   st->print("|TAMS " INTPTR_FORMAT_W(12),
 365             p2i(ShenandoahHeap::heap()->marking_context()->top_at_mark_start(const_cast<ShenandoahHeapRegion*>(this))));
 366   st->print("|UWM " INTPTR_FORMAT_W(12),
 367             p2i(_update_watermark));
 368   st->print("|U " SIZE_FORMAT_W(5) "%1s", byte_size_in_proper_unit(used()),                proper_unit_for_byte_size(used()));
 369   st->print("|T " SIZE_FORMAT_W(5) "%1s", byte_size_in_proper_unit(get_tlab_allocs()),     proper_unit_for_byte_size(get_tlab_allocs()));
 370   st->print("|G " SIZE_FORMAT_W(5) "%1s", byte_size_in_proper_unit(get_gclab_allocs()),    proper_unit_for_byte_size(get_gclab_allocs()));
 371   st->print("|S " SIZE_FORMAT_W(5) "%1s", byte_size_in_proper_unit(get_shared_allocs()),   proper_unit_for_byte_size(get_shared_allocs()));
 372   st->print("|L " SIZE_FORMAT_W(5) "%1s", byte_size_in_proper_unit(get_live_data_bytes()), proper_unit_for_byte_size(get_live_data_bytes()));
 373   st->print("|CP " SIZE_FORMAT_W(3), pin_count());
 374   st->cr();
 375 }
 376 
 377 void ShenandoahHeapRegion::oop_iterate(OopIterateClosure* blk) {
 378   if (!is_active()) return;
 379   if (is_humongous()) {
 380     oop_iterate_humongous(blk);
 381   } else {
 382     oop_iterate_objects(blk);
 383   }
 384 }
 385 
 386 void ShenandoahHeapRegion::oop_iterate_objects(OopIterateClosure* blk) {
 387   assert(! is_humongous(), "no humongous region here");




 347     case _cset:
 348       st->print("|CS ");
 349       break;
 350     case _trash:
 351       st->print("|T  ");
 352       break;
 353     case _pinned:
 354       st->print("|P  ");
 355       break;
 356     case _pinned_cset:
 357       st->print("|CSP");
 358       break;
 359     default:
 360       ShouldNotReachHere();
 361   }
 362   st->print("|BTE " INTPTR_FORMAT_W(12) ", " INTPTR_FORMAT_W(12) ", " INTPTR_FORMAT_W(12),
 363             p2i(bottom()), p2i(top()), p2i(end()));
 364   st->print("|TAMS " INTPTR_FORMAT_W(12),
 365             p2i(ShenandoahHeap::heap()->marking_context()->top_at_mark_start(const_cast<ShenandoahHeapRegion*>(this))));
 366   st->print("|UWM " INTPTR_FORMAT_W(12),
 367             p2i(const_cast<HeapWord*>(_update_watermark)));
 368   st->print("|U " SIZE_FORMAT_W(5) "%1s", byte_size_in_proper_unit(used()),                proper_unit_for_byte_size(used()));
 369   st->print("|T " SIZE_FORMAT_W(5) "%1s", byte_size_in_proper_unit(get_tlab_allocs()),     proper_unit_for_byte_size(get_tlab_allocs()));
 370   st->print("|G " SIZE_FORMAT_W(5) "%1s", byte_size_in_proper_unit(get_gclab_allocs()),    proper_unit_for_byte_size(get_gclab_allocs()));
 371   st->print("|S " SIZE_FORMAT_W(5) "%1s", byte_size_in_proper_unit(get_shared_allocs()),   proper_unit_for_byte_size(get_shared_allocs()));
 372   st->print("|L " SIZE_FORMAT_W(5) "%1s", byte_size_in_proper_unit(get_live_data_bytes()), proper_unit_for_byte_size(get_live_data_bytes()));
 373   st->print("|CP " SIZE_FORMAT_W(3), pin_count());
 374   st->cr();
 375 }
 376 
 377 void ShenandoahHeapRegion::oop_iterate(OopIterateClosure* blk) {
 378   if (!is_active()) return;
 379   if (is_humongous()) {
 380     oop_iterate_humongous(blk);
 381   } else {
 382     oop_iterate_objects(blk);
 383   }
 384 }
 385 
 386 void ShenandoahHeapRegion::oop_iterate_objects(OopIterateClosure* blk) {
 387   assert(! is_humongous(), "no humongous region here");


< prev index next >