7 *
8 * This code is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * version 2 for more details (a copy is included in the LICENSE file that
12 * accompanied this code).
13 *
14 * You should have received a copy of the GNU General Public License version
15 * 2 along with this work; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19 * or visit www.oracle.com if you need additional information or have any
20 * questions.
21 *
22 */
23
24 #ifndef SHARE_VM_GC_G1_G1BARRIERSET_HPP
25 #define SHARE_VM_GC_G1_G1BARRIERSET_HPP
26
27 #include "gc/shared/cardTableModRefBS.hpp"
28
29 class DirtyCardQueueSet;
30 class CardTable;
31 class G1CardTable;
32
33 // This barrier is specialized to use a logging barrier to support
34 // snapshot-at-the-beginning marking.
35
36 class G1BarrierSet: public CardTableModRefBS {
37 friend class VMStructs;
38 private:
39 DirtyCardQueueSet& _dcqs;
40
41 public:
42 G1BarrierSet(G1CardTable* table);
43 ~G1BarrierSet() { }
44
45 // Add "pre_val" to a set of objects that may have been disconnected from the
46 // pre-marking object graph.
47 static void enqueue(oop pre_val);
48
49 static void enqueue_if_weak_or_archive(DecoratorSet decorators, oop value);
50
51 template <class T> void write_ref_array_pre_work(T* dst, int count);
52 virtual void write_ref_array_pre(oop* dst, int count, bool dest_uninitialized);
53 virtual void write_ref_array_pre(narrowOop* dst, int count, bool dest_uninitialized);
54
55 template <DecoratorSet decorators, typename T>
|
7 *
8 * This code is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * version 2 for more details (a copy is included in the LICENSE file that
12 * accompanied this code).
13 *
14 * You should have received a copy of the GNU General Public License version
15 * 2 along with this work; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19 * or visit www.oracle.com if you need additional information or have any
20 * questions.
21 *
22 */
23
24 #ifndef SHARE_VM_GC_G1_G1BARRIERSET_HPP
25 #define SHARE_VM_GC_G1_G1BARRIERSET_HPP
26
27 #include "gc/shared/cardTableBarrierSet.hpp"
28
29 class DirtyCardQueueSet;
30 class CardTable;
31 class G1CardTable;
32
33 // This barrier is specialized to use a logging barrier to support
34 // snapshot-at-the-beginning marking.
35
36 class G1BarrierSet: public CardTableBarrierSet {
37 friend class VMStructs;
38 private:
39 DirtyCardQueueSet& _dcqs;
40
41 public:
42 G1BarrierSet(G1CardTable* table);
43 ~G1BarrierSet() { }
44
45 // Add "pre_val" to a set of objects that may have been disconnected from the
46 // pre-marking object graph.
47 static void enqueue(oop pre_val);
48
49 static void enqueue_if_weak_or_archive(DecoratorSet decorators, oop value);
50
51 template <class T> void write_ref_array_pre_work(T* dst, int count);
52 virtual void write_ref_array_pre(oop* dst, int count, bool dest_uninitialized);
53 virtual void write_ref_array_pre(narrowOop* dst, int count, bool dest_uninitialized);
54
55 template <DecoratorSet decorators, typename T>
|