src/hotspot/share/gc/shared/cardTableModRefBS.inline.hpp
changeset 47609 a1f68e415b48
parent 47216 71c04702a3d5
child 47998 fb0275c320a0
equal deleted inserted replaced
47608:9d337e48b178 47609:a1f68e415b48
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    28 #include "gc/shared/cardTableModRefBS.hpp"
    28 #include "gc/shared/cardTableModRefBS.hpp"
    29 #include "oops/oopsHierarchy.hpp"
    29 #include "oops/oopsHierarchy.hpp"
    30 #include "runtime/orderAccess.inline.hpp"
    30 #include "runtime/orderAccess.inline.hpp"
    31 
    31 
    32 template <class T> inline void CardTableModRefBS::inline_write_ref_field(T* field, oop newVal, bool release) {
    32 template <class T> inline void CardTableModRefBS::inline_write_ref_field(T* field, oop newVal, bool release) {
    33   jbyte* byte = byte_for((void*)field);
    33   volatile jbyte* byte = byte_for((void*)field);
    34   if (release) {
    34   if (release) {
    35     // Perform a releasing store if requested.
    35     // Perform a releasing store if requested.
    36     OrderAccess::release_store((volatile jbyte*) byte, dirty_card);
    36     OrderAccess::release_store(byte, jbyte(dirty_card));
    37   } else {
    37   } else {
    38     *byte = dirty_card;
    38     *byte = dirty_card;
    39   }
    39   }
    40 }
    40 }
    41 
    41