< prev index next >

src/hotspot/share/gc/g1/g1BarrierSet.inline.hpp

Print this page
rev 57544 : 8236485: Work-in-progress: Epoch synchronization protocol for G1 concurrent refinement
Reviewed-by:

*** 29,38 **** --- 29,41 ---- #include "gc/g1/g1CardTable.hpp" #include "gc/shared/accessBarrierSupport.inline.hpp" #include "oops/access.inline.hpp" #include "oops/compressedOops.inline.hpp" #include "oops/oop.hpp" + #ifdef ASSERT + #include "runtime/thread.inline.hpp" + #endif template <DecoratorSet decorators, typename T> inline void G1BarrierSet::write_ref_field_pre(T* field) { if (HasDecorator<decorators, IS_DEST_UNINITIALIZED>::value || HasDecorator<decorators, AS_NO_KEEPALIVE>::value) {
*** 45,54 **** --- 48,77 ---- } } template <DecoratorSet decorators, typename T> inline void G1BarrierSet::write_ref_field_post(T* field, oop new_val) { + /* + #ifdef ASSERT + if (Thread::current()->is_Java_thread()) { + JavaThreadState s = ((JavaThread*)Thread::current())->thread_state(); + if (s != _thread_in_vm) { + tty->print_cr("T(%s).state = %d", Thread::current()->name(), s); + assert(false, "fail"); + } + } else { + tty->print_cr("T(%s) not JavaThread", Thread::current()->name()); + tty->print_cr("At safepoint? %d", SafepointSynchronize::is_at_safepoint()); + assert(false, "fail"); + } + #endif + */ + // assert(SafepointSynchronize::is_at_safepoint() || + // (Thread::current()->is_Java_thread() && + // ((JavaThread*)Thread::current())->thread_state() == _thread_in_vm), + // "sanity"); + volatile CardValue* byte = _card_table->byte_for(field); if (*byte != G1CardTable::g1_young_card_val()) { // Take a slow path for cards in old write_ref_field_post_slow(byte); }
< prev index next >