diff --git a/src/hotspot/share/gc/shared/cardTableBarrierSet.inline.hpp b/src/hotspot/share/gc/shared/cardTableBarrierSet.inline.hpp index abdc7e9..5d66748 100644 --- a/src/hotspot/share/gc/shared/cardTableBarrierSet.inline.hpp +++ b/src/hotspot/share/gc/shared/cardTableBarrierSet.inline.hpp @@ -32,7 +32,7 @@ template inline void CardTableBarrierSet::write_ref_field_post(T* field, oop newVal) { volatile jbyte* byte = _card_table->byte_for(field); - if (UseConcMarkSweepGC) { + if (_card_table->scanned_concurrently()) { // Perform a releasing store if using CMS so that it may // scan and clear the cards concurrently during pre-cleaning. OrderAccess::release_store(byte, CardTable::dirty_card_val());