< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahNMethod.inline.hpp

Print this page

 54 
 55   oop* const begin = _nm->oops_begin();
 56   oop* const end = _nm->oops_end();
 57   for (oop* p = begin; p < end; p++) {
 58     if (*p != Universe::non_oop_word()) {
 59       oops->do_oop(p);
 60     }
 61   }
 62 
 63   if (fix_relocations && _has_non_immed_oops) {
 64     _nm->fix_oop_relocations();
 65   }
 66 }
 67 
 68 void ShenandoahNMethod::heal_nmethod_metadata(ShenandoahNMethod* nmethod_data) {
 69   ShenandoahEvacuateUpdateMetadataClosure cl;
 70   nmethod_data->oops_do(&cl, true /*fix relocation*/);
 71 }
 72 
 73 void ShenandoahNMethod::disarm_nmethod(nmethod* nm) {














 74   BarrierSetNMethod* const bs = BarrierSet::barrier_set()->barrier_set_nmethod();
 75   if (bs->is_armed(nm)) {

 76     bs->disarm(nm);
 77   }
 78 }
 79 
 80 ShenandoahNMethod* ShenandoahNMethod::gc_data(nmethod* nm) {
 81   return nm->gc_data<ShenandoahNMethod>();
 82 }
 83 
 84 void ShenandoahNMethod::attach_gc_data(nmethod* nm, ShenandoahNMethod* gc_data) {
 85   nm->set_gc_data<ShenandoahNMethod>(gc_data);
 86 }
 87 
 88 ShenandoahNMethodLock* ShenandoahNMethod::lock_for_nmethod(nmethod* nm) {
 89   return gc_data(nm)->lock();
 90 }
 91 
 92 ShenandoahNMethodLock* ShenandoahNMethod::ic_lock_for_nmethod(nmethod* nm) {
 93   return gc_data(nm)->ic_lock();
 94 }
 95 

 54 
 55   oop* const begin = _nm->oops_begin();
 56   oop* const end = _nm->oops_end();
 57   for (oop* p = begin; p < end; p++) {
 58     if (*p != Universe::non_oop_word()) {
 59       oops->do_oop(p);
 60     }
 61   }
 62 
 63   if (fix_relocations && _has_non_immed_oops) {
 64     _nm->fix_oop_relocations();
 65   }
 66 }
 67 
 68 void ShenandoahNMethod::heal_nmethod_metadata(ShenandoahNMethod* nmethod_data) {
 69   ShenandoahEvacuateUpdateMetadataClosure cl;
 70   nmethod_data->oops_do(&cl, true /*fix relocation*/);
 71 }
 72 
 73 void ShenandoahNMethod::disarm_nmethod(nmethod* nm) {
 74   ShenandoahNMethod* data = gc_data(nm);
 75   assert(data != nullptr, "Sanity");
 76   ShenandoahNMethodLock* lock = data->lock();
 77   assert(lock != nullptr, "Must be");
 78   ShenandoahNMethodLocker locker(lock);
 79 
 80   disarm_nmethod_unlocked(nm);
 81 }
 82 
 83 void ShenandoahNMethod::disarm_nmethod_unlocked(nmethod* nm) {
 84   ShenandoahNMethod* data = gc_data(nm);
 85   assert(data != nullptr, "Sanity");
 86   assert(data->lock()->owned_by_self(), "Must hold the lock");
 87 
 88   BarrierSetNMethod* const bs = BarrierSet::barrier_set()->barrier_set_nmethod();
 89   if (bs->is_armed(nm)) {
 90     data->update_barriers();
 91     bs->disarm(nm);
 92   }
 93 }
 94 
 95 ShenandoahNMethod* ShenandoahNMethod::gc_data(nmethod* nm) {
 96   return nm->gc_data<ShenandoahNMethod>();
 97 }
 98 
 99 void ShenandoahNMethod::attach_gc_data(nmethod* nm, ShenandoahNMethod* gc_data) {
100   nm->set_gc_data<ShenandoahNMethod>(gc_data);
101 }
102 
103 ShenandoahNMethodLock* ShenandoahNMethod::lock_for_nmethod(nmethod* nm) {
104   return gc_data(nm)->lock();
105 }
106 
107 ShenandoahNMethodLock* ShenandoahNMethod::ic_lock_for_nmethod(nmethod* nm) {
108   return gc_data(nm)->ic_lock();
109 }
110 
< prev index next >