barrierSet.cpp revision 1091
3349N/A/*
3349N/A * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
3349N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3349N/A *
3349N/A * This code is free software; you can redistribute it and/or modify it
3349N/A * under the terms of the GNU General Public License version 2 only, as
3349N/A * published by the Free Software Foundation.
3349N/A *
3349N/A * This code is distributed in the hope that it will be useful, but WITHOUT
3349N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3349N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3349N/A * version 2 for more details (a copy is included in the LICENSE file that
3349N/A * accompanied this code).
3349N/A *
3349N/A * You should have received a copy of the GNU General Public License version
3349N/A * 2 along with this work; if not, write to the Free Software Foundation,
3349N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3349N/A *
3349N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
3349N/A * CA 95054 USA or visit www.sun.com if you need additional information or
3349N/A * have any questions.
3349N/A *
3349N/A */
3349N/A
3349N/A# include "incls/_precompiled.incl"
3349N/A# include "incls/_barrierSet.cpp.incl"
3349N/A
3349N/A// count is number of array elements being written
3349N/Avoid BarrierSet::static_write_ref_array_pre(HeapWord* start, size_t count) {
3349N/A assert(count <= (size_t)max_intx, "count too large");
3349N/A#if 0
3349N/A warning("Pre: \t" INTPTR_FORMAT "[" SIZE_FORMAT "]\t",
3349N/A start, count);
3349N/A#endif
3349N/A if (UseCompressedOops) {
3349N/A Universe::heap()->barrier_set()->write_ref_array_pre((narrowOop*)start, (int)count);
3349N/A } else {
3349N/A Universe::heap()->barrier_set()->write_ref_array_pre( (oop*)start, (int)count);
3349N/A }
3349N/A}
3349N/A
3349N/A// count is number of array elements being written
3349N/Avoid BarrierSet::static_write_ref_array_post(HeapWord* start, size_t count) {
3349N/A // simply delegate to instance method
3349N/A Universe::heap()->barrier_set()->write_ref_array(start, count);
3349N/A}
3349N/A