< prev index next >

src/hotspot/share/oops/cpCache.cpp

Print this page

        

*** 95,125 **** // Read once. volatile Bytecodes::Code c = bytecode_1(); assert(c == 0 || c == code || code == 0, "update must be consistent"); #endif // Need to flush pending stores here before bytecode is written. ! OrderAccess::release_store(&_indices, _indices | ((u_char)code << bytecode_1_shift)); } void ConstantPoolCacheEntry::set_bytecode_2(Bytecodes::Code code) { #ifdef ASSERT // Read once. volatile Bytecodes::Code c = bytecode_2(); assert(c == 0 || c == code || code == 0, "update must be consistent"); #endif // Need to flush pending stores here before bytecode is written. ! OrderAccess::release_store(&_indices, _indices | ((u_char)code << bytecode_2_shift)); } // Sets f1, ordering with previous writes. void ConstantPoolCacheEntry::release_set_f1(Metadata* f1) { assert(f1 != NULL, ""); ! OrderAccess::release_store(&_f1, f1); } void ConstantPoolCacheEntry::set_indy_resolution_failed() { ! OrderAccess::release_store(&_flags, _flags | (1 << indy_resolution_failed_shift)); } // Note that concurrent update of both bytecodes can leave one of them // reset to zero. This is harmless; the interpreter will simply re-resolve // the damaged entry. More seriously, the memory synchronization is needed --- 95,125 ---- // Read once. volatile Bytecodes::Code c = bytecode_1(); assert(c == 0 || c == code || code == 0, "update must be consistent"); #endif // Need to flush pending stores here before bytecode is written. ! Atomic::release_store(&_indices, _indices | ((u_char)code << bytecode_1_shift)); } void ConstantPoolCacheEntry::set_bytecode_2(Bytecodes::Code code) { #ifdef ASSERT // Read once. volatile Bytecodes::Code c = bytecode_2(); assert(c == 0 || c == code || code == 0, "update must be consistent"); #endif // Need to flush pending stores here before bytecode is written. ! Atomic::release_store(&_indices, _indices | ((u_char)code << bytecode_2_shift)); } // Sets f1, ordering with previous writes. void ConstantPoolCacheEntry::release_set_f1(Metadata* f1) { assert(f1 != NULL, ""); ! Atomic::release_store(&_f1, f1); } void ConstantPoolCacheEntry::set_indy_resolution_failed() { ! Atomic::release_store(&_flags, _flags | (1 << indy_resolution_failed_shift)); } // Note that concurrent update of both bytecodes can leave one of them // reset to zero. This is harmless; the interpreter will simply re-resolve // the damaged entry. More seriously, the memory synchronization is needed
< prev index next >