hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp
changeset 29325 0e86e64c66e5
parent 29081 c61eb4914428
child 30173 13cf7580b000
--- a/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp	Thu Feb 26 21:00:03 2015 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.cpp	Fri Feb 27 19:52:48 2015 -0500
@@ -33,8 +33,11 @@
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/thread.inline.hpp"
 
-G1SATBCardTableModRefBS::G1SATBCardTableModRefBS(MemRegion whole_heap, BarrierSet::Name kind) :
-  CardTableModRefBS(whole_heap, kind) { }
+G1SATBCardTableModRefBS::G1SATBCardTableModRefBS(
+  MemRegion whole_heap,
+  const BarrierSet::FakeRtti& fake_rtti) :
+  CardTableModRefBS(whole_heap, fake_rtti.add_tag(BarrierSet::G1SATBCT))
+{ }
 
 void G1SATBCardTableModRefBS::enqueue(oop pre_val) {
   // Nulls should have been already filtered.
@@ -130,7 +133,7 @@
 
 G1SATBCardTableLoggingModRefBS::
 G1SATBCardTableLoggingModRefBS(MemRegion whole_heap) :
-  G1SATBCardTableModRefBS(whole_heap, BarrierSet::G1SATBCTLogging),
+  G1SATBCardTableModRefBS(whole_heap, BarrierSet::FakeRtti(G1SATBCTLogging)),
   _dcqs(JavaThread::dirty_card_queue_set()),
   _listener()
 {
@@ -203,7 +206,7 @@
   if (new_val == NULL) return;
   // Otherwise, log it.
   G1SATBCardTableLoggingModRefBS* g1_bs =
-    (G1SATBCardTableLoggingModRefBS*)Universe::heap()->barrier_set();
+    barrier_set_cast<G1SATBCardTableLoggingModRefBS>(Universe::heap()->barrier_set());
   g1_bs->write_ref_field_work(field, new_val);
 }