< prev index next >

src/hotspot/share/oops/constantPool.hpp

Print this page
rev 47404 : [mq]: load_ptr_acquire

*** 143,153 **** CPSlot slot_at(int which) const { assert(is_within_bounds(which), "index out of bounds"); assert(!tag_at(which).is_unresolved_klass() && !tag_at(which).is_unresolved_klass_in_error(), "Corrupted constant pool"); // Uses volatile because the klass slot changes without a lock. ! volatile intptr_t adr = (intptr_t)OrderAccess::load_ptr_acquire(obj_at_addr_raw(which)); assert(adr != 0 || which == 0, "cp entry for klass should not be zero"); return CPSlot(adr); } void slot_at_put(int which, CPSlot s) const { --- 143,153 ---- CPSlot slot_at(int which) const { assert(is_within_bounds(which), "index out of bounds"); assert(!tag_at(which).is_unresolved_klass() && !tag_at(which).is_unresolved_klass_in_error(), "Corrupted constant pool"); // Uses volatile because the klass slot changes without a lock. ! volatile intptr_t adr = OrderAccess::load_acquire(obj_at_addr_raw(which)); assert(adr != 0 || which == 0, "cp entry for klass should not be zero"); return CPSlot(adr); } void slot_at_put(int which, CPSlot s) const {
*** 405,415 **** // behind our back, lest we later load stale values thru the oop. CPKlassSlot kslot = klass_slot_at(which); assert(tag_at(kslot.name_index()).is_symbol(), "sanity"); Klass** adr = resolved_klasses()->adr_at(kslot.resolved_klass_index()); ! return (Klass*)OrderAccess::load_ptr_acquire(adr); } // RedefineClasses() API support: Symbol* klass_at_noresolve(int which) { return klass_name_at(which); } void temp_unresolved_klass_at_put(int which, int name_index) { --- 405,415 ---- // behind our back, lest we later load stale values thru the oop. CPKlassSlot kslot = klass_slot_at(which); assert(tag_at(kslot.name_index()).is_symbol(), "sanity"); Klass** adr = resolved_klasses()->adr_at(kslot.resolved_klass_index()); ! return OrderAccess::load_acquire(adr); } // RedefineClasses() API support: Symbol* klass_at_noresolve(int which) { return klass_name_at(which); } void temp_unresolved_klass_at_put(int which, int name_index) {
< prev index next >