< prev index next >

src/hotspot/share/gc/g1/g1BarrierSet.inline.hpp

Print this page
rev 55404 : 8226197: Reducing G1?s CPU cost with simplified write post-barrier and disabling concurrent refinement
Summary: A prototype to add a mode for G1 to use a simplified write post-barrier. Guarded by new flag G1FastWriteBarrier.

@@ -46,10 +46,14 @@
 }
 
 template <DecoratorSet decorators, typename T>
 inline void G1BarrierSet::write_ref_field_post(T* field, oop new_val) {
   volatile CardValue* byte = _card_table->byte_for(field);
+  if (G1FastWriteBarrier) {
+    *byte = G1CardTable::dirty_card_val();
+    return;
+  }
   if (*byte != G1CardTable::g1_young_card_val()) {
     // Take a slow path for cards in old
     write_ref_field_post_slow(byte);
   }
 }
< prev index next >