< prev index next >

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

Print this page
@@ -45,11 +45,13 @@
  
  bool ShenandoahNMethod::is_unregistered() const {
    return _unregistered;
  }
  
- void ShenandoahNMethod::oops_do(OopClosure* oops, bool fix_relocations) {
+ void ShenandoahNMethod::oops_do(OopClosure* oops, bool fix_relocations, ICacheInvalidationContext* icic) {
+   assert(!fix_relocations || icic != nullptr, "Need ICIC if fixing relocations");
+ 
    for (int c = 0; c < _oops_count; c ++) {
      oops->do_oop(_oops[c]);
    }
  
    oop* const begin = _nm->oops_begin();

@@ -59,17 +61,17 @@
        oops->do_oop(p);
      }
    }
  
    if (fix_relocations && _has_non_immed_oops) {
-     _nm->fix_oop_relocations();
+     _nm->fix_oop_relocations(icic);
    }
  }
  
- void ShenandoahNMethod::heal_nmethod_metadata(ShenandoahNMethod* nmethod_data) {
+ void ShenandoahNMethod::heal_nmethod_metadata(ShenandoahNMethod* nmethod_data, ICacheInvalidationContext* icic) {
    ShenandoahEvacuateUpdateMetadataClosure cl;
-   nmethod_data->oops_do(&cl, true /*fix relocation*/);
+   nmethod_data->oops_do(&cl, /* fix_relocations = */ true, icic);
  }
  
  void ShenandoahNMethod::disarm_nmethod(nmethod* nm) {
    BarrierSetNMethod* const bs = BarrierSet::barrier_set()->barrier_set_nmethod();
    if (bs->is_armed(nm)) {
< prev index next >