< prev index next >

src/share/vm/gc/g1/g1SATBCardTableModRefBS.cpp

Print this page
rev 12854 : [mq]: gcinterface.patch

*** 261,265 **** --- 261,287 ---- // Last reference to this region, remove the nmethod from the rset. hr->remove_strong_code_root(nm); } } } + + void G1SATBCardTableModRefBS::klass_oop_store(oop* p, oop v) { + // This barrier is used by G1 to remember the old oop values, so + // that we don't forget any objects that were live at the snapshot at + // the beginning. This function is only used when we write oops into Klasses. + oop obj = oopDesc::load_heap_oop(p); + if (! oopDesc::is_null(obj)) { + enqueue(obj); + } + BarrierSet::klass_oop_store(p, v); + } + + void G1SATBCardTableModRefBS::klass_oop_store(volatile oop* p, oop v) { + // This barrier is used by G1 to remember the old oop values, so + // that we don't forget any objects that were live at the snapshot at + // the beginning. This function is only used when we write oops into Klasses. + oop obj = oopDesc::load_heap_oop((oop*) p); + if (! oopDesc::is_null(obj)) { + enqueue(obj); + } + BarrierSet::klass_oop_store(p, v); + }
< prev index next >