< prev index next >

src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp

Print this page

        

*** 2369,2390 **** // VM thread changes sync state to synchronizing and suspends threads for GC. // Thread A is resumed to finish this native method, but doesn't block here since it // didn't see any synchronization is progress, and escapes. __ set(_thread_in_native_trans, G3_scratch); __ st(G3_scratch, G2_thread, JavaThread::thread_state_offset()); ! if(os::is_MP()) { if (UseMembar) { // Force this write out before the read below __ membar(Assembler::StoreLoad); } else { // Write serialization page so VM thread can do a pseudo remote membar. // We use the current thread pointer to calculate a thread specific // offset to write to within the page. This minimizes bus traffic // due to cache line collision. __ serialize_memory(G2_thread, G1_scratch, G3_scratch); } - } Label L; Address suspend_state(G2_thread, JavaThread::suspend_flags_offset()); __ safepoint_poll(L, false, G2_thread, G3_scratch); __ delayed()->ld(suspend_state, G3_scratch); --- 2369,2389 ---- // VM thread changes sync state to synchronizing and suspends threads for GC. // Thread A is resumed to finish this native method, but doesn't block here since it // didn't see any synchronization is progress, and escapes. __ set(_thread_in_native_trans, G3_scratch); __ st(G3_scratch, G2_thread, JavaThread::thread_state_offset()); ! if (UseMembar) { // Force this write out before the read below __ membar(Assembler::StoreLoad); } else { // Write serialization page so VM thread can do a pseudo remote membar. // We use the current thread pointer to calculate a thread specific // offset to write to within the page. This minimizes bus traffic // due to cache line collision. __ serialize_memory(G2_thread, G1_scratch, G3_scratch); } Label L; Address suspend_state(G2_thread, JavaThread::suspend_flags_offset()); __ safepoint_poll(L, false, G2_thread, G3_scratch); __ delayed()->ld(suspend_state, G3_scratch);
< prev index next >