342N/A/*
2273N/A * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
342N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
342N/A *
342N/A * This code is free software; you can redistribute it and/or modify it
342N/A * under the terms of the GNU General Public License version 2 only, as
342N/A * published by the Free Software Foundation.
342N/A *
342N/A * This code is distributed in the hope that it will be useful, but WITHOUT
342N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
342N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
342N/A * version 2 for more details (a copy is included in the LICENSE file that
342N/A * accompanied this code).
342N/A *
342N/A * You should have received a copy of the GNU General Public License version
342N/A * 2 along with this work; if not, write to the Free Software Foundation,
342N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
342N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
342N/A *
342N/A */
342N/A
1879N/A#include "precompiled.hpp"
1879N/A#include "gc_interface/collectedHeap.hpp"
1879N/A#include "memory/barrierSet.inline.hpp"
1879N/A#include "memory/universe.hpp"
342N/A
845N/A// count is number of array elements being written
342N/Avoid BarrierSet::static_write_ref_array_pre(HeapWord* start, size_t count) {
845N/A assert(count <= (size_t)max_intx, "count too large");
845N/A#if 0
845N/A warning("Pre: \t" INTPTR_FORMAT "[" SIZE_FORMAT "]\t",
845N/A start, count);
845N/A#endif
845N/A if (UseCompressedOops) {
2171N/A Universe::heap()->barrier_set()->write_ref_array_pre((narrowOop*)start, (int)count, false);
845N/A } else {
2171N/A Universe::heap()->barrier_set()->write_ref_array_pre( (oop*)start, (int)count, false);
845N/A }
342N/A}
342N/A
845N/A// count is number of array elements being written
342N/Avoid BarrierSet::static_write_ref_array_post(HeapWord* start, size_t count) {
1091N/A // simply delegate to instance method
1091N/A Universe::heap()->barrier_set()->write_ref_array(start, count);
342N/A}