annotate src/hotspot/share/gc/shared/modRefBarrierSet.hpp @ 48073:5caa1d5f74c1

8186571: Implementation: JEP 307: Parallel Full GC for G1 Summary: Improve G1 worst-case latencies by making the full GC parallel. Reviewed-by: tschatzl, sangheki, ehelin
author sjohanss
date Tue, 14 Nov 2017 11:33:23 +0100
parents 71c04702a3d5
children fb0275c320a0
rev   line source
duke@1 1 /*
eosterlund@47813 2 * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
duke@1 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@1 4 *
duke@1 5 * This code is free software; you can redistribute it and/or modify it
duke@1 6 * under the terms of the GNU General Public License version 2 only, as
duke@1 7 * published by the Free Software Foundation.
duke@1 8 *
duke@1 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@1 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@1 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@1 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@1 13 * accompanied this code).
duke@1 14 *
duke@1 15 * You should have received a copy of the GNU General Public License version
duke@1 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@1 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@1 18 *
trims@5547 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@5547 20 * or visit www.oracle.com if you need additional information or have any
trims@5547 21 * questions.
duke@1 22 *
duke@1 23 */
duke@1 24
pliden@30764 25 #ifndef SHARE_VM_GC_SHARED_MODREFBARRIERSET_HPP
pliden@30764 26 #define SHARE_VM_GC_SHARED_MODREFBARRIERSET_HPP
stefank@7397 27
pliden@30764 28 #include "gc/shared/barrierSet.hpp"
stefank@7397 29
duke@1 30 // This kind of "BarrierSet" allows a "CollectedHeap" to detect and
duke@1 31 // enumerate ref fields that have been modified (since the last
duke@1 32 // enumeration), using a card table.
duke@1 33
duke@1 34 class OopClosure;
duke@1 35 class Generation;
duke@1 36
duke@1 37 class ModRefBarrierSet: public BarrierSet {
duke@1 38 protected:
kbarrett@29325 39 ModRefBarrierSet(const BarrierSet::FakeRtti& fake_rtti)
kbarrett@29325 40 : BarrierSet(fake_rtti.add_tag(BarrierSet::ModRef)) { }
jprovino@28830 41 ~ModRefBarrierSet() { }
jprovino@28830 42
duke@1 43 public:
lmesnik@42598 44 // Causes all refs in "mr" to be assumed to be modified.
lmesnik@42598 45 virtual void invalidate(MemRegion mr) = 0;
duke@1 46
duke@1 47 // The caller guarantees that "mr" contains no references. (Perhaps it's
duke@1 48 // objects have been moved elsewhere.)
duke@1 49 virtual void clear(MemRegion mr) = 0;
duke@1 50 };
stefank@7397 51
kbarrett@29325 52 template<>
kbarrett@29325 53 struct BarrierSet::GetName<ModRefBarrierSet> {
kbarrett@29325 54 static const BarrierSet::Name value = BarrierSet::ModRef;
kbarrett@29325 55 };
kbarrett@29325 56
pliden@30764 57 #endif // SHARE_VM_GC_SHARED_MODREFBARRIERSET_HPP