< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahBarrierSetNMethod.cpp

Print this page
rev 57380 : 8234974: Shenandoah: Do concurrent roots even when no evacuation is necessary
rev 57381 : [mq]: JDK-8234974-changes.patch


  40 
  41   if (!is_armed(nm)) {
  42     // Some other thread got here first and healed the oops
  43     // and disarmed the nmethod.
  44     return true;
  45   }
  46 
  47   if (nm->is_unloading()) {
  48     // We don't need to take the lock when unlinking nmethods from
  49     // the Method, because it is only concurrently unlinked by
  50     // the entry barrier, which acquires the per nmethod lock.
  51     nm->unlink_from_method();
  52 
  53     // We can end up calling nmethods that are unloading
  54     // since we clear compiled ICs lazily. Returning false
  55     // will re-resovle the call and update the compiled IC.
  56     return false;
  57   }
  58 
  59   // Heal oops and disarm
  60   if (ShenandoahHeap::heap()->is_evacuation_in_progress()) {
  61     ShenandoahEvacOOMScope scope;
  62     ShenandoahNMethod::heal_nmethod(nm);
  63   }
  64   ShenandoahNMethod::disarm_nmethod(nm);
  65   return true;
  66 }
  67 
  68 int ShenandoahBarrierSetNMethod::disarmed_value() const {
  69   return ShenandoahCodeRoots::disarmed_value();
  70 }
  71 
  72 ByteSize ShenandoahBarrierSetNMethod::thread_disarmed_offset() const {
  73   return ShenandoahThreadLocalData::disarmed_value_offset();
  74 }
  75 
  76 int* ShenandoahBarrierSetNMethod::disarmed_value_address() const {
  77   return ShenandoahCodeRoots::disarmed_value_address();
  78 }


  40 
  41   if (!is_armed(nm)) {
  42     // Some other thread got here first and healed the oops
  43     // and disarmed the nmethod.
  44     return true;
  45   }
  46 
  47   if (nm->is_unloading()) {
  48     // We don't need to take the lock when unlinking nmethods from
  49     // the Method, because it is only concurrently unlinked by
  50     // the entry barrier, which acquires the per nmethod lock.
  51     nm->unlink_from_method();
  52 
  53     // We can end up calling nmethods that are unloading
  54     // since we clear compiled ICs lazily. Returning false
  55     // will re-resovle the call and update the compiled IC.
  56     return false;
  57   }
  58 
  59   // Heal oops and disarm

  60   ShenandoahEvacOOMScope scope;
  61   ShenandoahNMethod::heal_nmethod(nm);

  62   ShenandoahNMethod::disarm_nmethod(nm);
  63   return true;
  64 }
  65 
  66 int ShenandoahBarrierSetNMethod::disarmed_value() const {
  67   return ShenandoahCodeRoots::disarmed_value();
  68 }
  69 
  70 ByteSize ShenandoahBarrierSetNMethod::thread_disarmed_offset() const {
  71   return ShenandoahThreadLocalData::disarmed_value_offset();
  72 }
  73 
  74 int* ShenandoahBarrierSetNMethod::disarmed_value_address() const {
  75   return ShenandoahCodeRoots::disarmed_value_address();
  76 }
< prev index next >