annotate src/hotspot/share/gc/shared/cardTableBarrierSet.inline.hpp @ 52321:31b159f30fb2

8180193: Make marking bitmap code available to other GCs Reviewed-by: shade, stefank
author rkennke
date Wed, 29 Aug 2018 20:15:09 +0200
parents bcf41be8ea14
children 9807daeb47c4
rev   line source
stefank@29081 1 /*
eosterlund@49595 2 * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
stefank@29081 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
stefank@29081 4 *
stefank@29081 5 * This code is free software; you can redistribute it and/or modify it
stefank@29081 6 * under the terms of the GNU General Public License version 2 only, as
stefank@29081 7 * published by the Free Software Foundation.
stefank@29081 8 *
stefank@29081 9 * This code is distributed in the hope that it will be useful, but WITHOUT
stefank@29081 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
stefank@29081 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
stefank@29081 12 * version 2 for more details (a copy is included in the LICENSE file that
stefank@29081 13 * accompanied this code).
stefank@29081 14 *
stefank@29081 15 * You should have received a copy of the GNU General Public License version
stefank@29081 16 * 2 along with this work; if not, write to the Free Software Foundation,
stefank@29081 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
stefank@29081 18 *
stefank@29081 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
stefank@29081 20 * or visit www.oracle.com if you need additional information or have any
stefank@29081 21 * questions.
stefank@29081 22 *
stefank@29081 23 */
stefank@29081 24
eosterlund@49920 25 #ifndef SHARE_VM_GC_SHARED_CARDTABLEBARRIERSET_INLINE_HPP
eosterlund@49920 26 #define SHARE_VM_GC_SHARED_CARDTABLEBARRIERSET_INLINE_HPP
stefank@29081 27
eosterlund@49920 28 #include "gc/shared/cardTableBarrierSet.hpp"
eosterlund@49595 29 #include "gc/shared/cardTable.hpp"
coleenp@51033 30 #include "runtime/orderAccess.hpp"
stefank@29081 31
eosterlund@48195 32 template <DecoratorSet decorators, typename T>
eosterlund@49920 33 inline void CardTableBarrierSet::write_ref_field_post(T* field, oop newVal) {
eosterlund@49595 34 volatile jbyte* byte = _card_table->byte_for(field);
eosterlund@50566 35 if (_card_table->scanned_concurrently()) {
eosterlund@50566 36 // Perform a releasing store if the card table is scanned concurrently
eosterlund@49595 37 OrderAccess::release_store(byte, CardTable::dirty_card_val());
stefank@29081 38 } else {
eosterlund@49595 39 *byte = CardTable::dirty_card_val();
stefank@29081 40 }
stefank@29081 41 }
stefank@29081 42
eosterlund@49920 43 #endif // SHARE_VM_GC_SHARED_CARDTABLEBARRIERSET_INLINE_HPP