src/hotspot/share/gc/shared/cardTableModRefBS.inline.hpp
changeset 47998 fb0275c320a0
parent 47609 a1f68e415b48
child 49164 7e958a8ebcd3
equal deleted inserted replaced
47997:55c43e677ded 47998:fb0275c320a0
    24 
    24 
    25 #ifndef SHARE_VM_GC_SHARED_CARDTABLEMODREFBS_INLINE_HPP
    25 #ifndef SHARE_VM_GC_SHARED_CARDTABLEMODREFBS_INLINE_HPP
    26 #define SHARE_VM_GC_SHARED_CARDTABLEMODREFBS_INLINE_HPP
    26 #define SHARE_VM_GC_SHARED_CARDTABLEMODREFBS_INLINE_HPP
    27 
    27 
    28 #include "gc/shared/cardTableModRefBS.hpp"
    28 #include "gc/shared/cardTableModRefBS.hpp"
    29 #include "oops/oopsHierarchy.hpp"
       
    30 #include "runtime/orderAccess.inline.hpp"
    29 #include "runtime/orderAccess.inline.hpp"
    31 
    30 
    32 template <class T> inline void CardTableModRefBS::inline_write_ref_field(T* field, oop newVal, bool release) {
    31 template <DecoratorSet decorators, typename T>
    33   volatile jbyte* byte = byte_for((void*)field);
    32 inline void CardTableModRefBS::write_ref_field_post(T* field, oop newVal) {
    34   if (release) {
    33   volatile jbyte* byte = byte_for(field);
    35     // Perform a releasing store if requested.
    34   if (UseConcMarkSweepGC) {
       
    35     // Perform a releasing store if using CMS so that it may
       
    36     // scan and clear the cards concurrently during pre-cleaning.
    36     OrderAccess::release_store(byte, jbyte(dirty_card));
    37     OrderAccess::release_store(byte, jbyte(dirty_card));
    37   } else {
    38   } else {
    38     *byte = dirty_card;
    39     *byte = dirty_card;
    39   }
    40   }
    40 }
    41 }