< prev index next >

src/hotspot/share/gc/z/zNMethodData.cpp

Print this page




  61   return immediates_begin() + immediates_count();
  62 }
  63 
  64 bool ZNMethodDataOops::has_non_immediates() const {
  65   return _has_non_immediates;
  66 }
  67 
  68 ZNMethodData::ZNMethodData() :
  69     _lock(),
  70     _oops(NULL) {}
  71 
  72 ZNMethodData::~ZNMethodData() {
  73   ZNMethodDataOops::destroy(_oops);
  74 }
  75 
  76 ZReentrantLock* ZNMethodData::lock() {
  77   return &_lock;
  78 }
  79 
  80 ZNMethodDataOops* ZNMethodData::oops() const {
  81   return OrderAccess::load_acquire(&_oops);
  82 }
  83 
  84 ZNMethodDataOops* ZNMethodData::swap_oops(ZNMethodDataOops* new_oops) {
  85   ZLocker<ZReentrantLock> locker(&_lock);
  86   ZNMethodDataOops* const old_oops = _oops;
  87   _oops = new_oops;
  88   return old_oops;
  89 }


  61   return immediates_begin() + immediates_count();
  62 }
  63 
  64 bool ZNMethodDataOops::has_non_immediates() const {
  65   return _has_non_immediates;
  66 }
  67 
  68 ZNMethodData::ZNMethodData() :
  69     _lock(),
  70     _oops(NULL) {}
  71 
  72 ZNMethodData::~ZNMethodData() {
  73   ZNMethodDataOops::destroy(_oops);
  74 }
  75 
  76 ZReentrantLock* ZNMethodData::lock() {
  77   return &_lock;
  78 }
  79 
  80 ZNMethodDataOops* ZNMethodData::oops() const {
  81   return Atomic::load_acquire(&_oops);
  82 }
  83 
  84 ZNMethodDataOops* ZNMethodData::swap_oops(ZNMethodDataOops* new_oops) {
  85   ZLocker<ZReentrantLock> locker(&_lock);
  86   ZNMethodDataOops* const old_oops = _oops;
  87   _oops = new_oops;
  88   return old_oops;
  89 }
< prev index next >