src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
changeset 49727 2bbd5117d91a
parent 49672 f1d2b6c0693b
child 49751 c3a10df652c0
equal deleted inserted replaced
49726:4ae63fcabe2e 49727:2bbd5117d91a
   528   } else {
   528   } else {
   529     clear_statistics_in_region(region_idx);
   529     clear_statistics_in_region(region_idx);
   530   }
   530   }
   531 }
   531 }
   532 
   532 
       
   533 static void clear_mark_if_set(G1CMBitMap* bitmap, HeapWord* addr) {
       
   534   if (bitmap->is_marked(addr)) {
       
   535     bitmap->clear(addr);
       
   536   }
       
   537 }
       
   538 
   533 void G1ConcurrentMark::humongous_object_eagerly_reclaimed(HeapRegion* r) {
   539 void G1ConcurrentMark::humongous_object_eagerly_reclaimed(HeapRegion* r) {
   534   assert_at_safepoint_on_vm_thread();
   540   assert_at_safepoint_on_vm_thread();
   535 
   541 
   536   // Need to clear mark bit of the humongous object.
   542   // Need to clear all mark bits of the humongous object.
   537   if (_next_mark_bitmap->is_marked(r->bottom())) {
   543   clear_mark_if_set(_prev_mark_bitmap, r->bottom());
   538     _next_mark_bitmap->clear(r->bottom());
   544   clear_mark_if_set(_next_mark_bitmap, r->bottom());
   539   }
       
   540 
   545 
   541   if (!_g1h->collector_state()->mark_or_rebuild_in_progress()) {
   546   if (!_g1h->collector_state()->mark_or_rebuild_in_progress()) {
   542     return;
   547     return;
   543   }
   548   }
   544 
   549