< prev index next >

src/hotspot/share/gc/g1/g1CodeBlobClosure.cpp

Print this page




  40     oop o = CompressedOops::decode_not_null(oop_or_narrowoop);
  41     HeapRegion* hr = _g1h->heap_region_containing(o);
  42     assert(!_g1h->is_in_cset(o) || hr->rem_set()->strong_code_roots_list_contains(_nm), "if o still in collection set then evacuation failed and nm must already be in the remset");
  43     hr->add_strong_code_root(_nm);
  44   }
  45 }
  46 
  47 void G1CodeBlobClosure::HeapRegionGatheringOopClosure::do_oop(oop* o) {
  48   do_oop_work(o);
  49 }
  50 
  51 void G1CodeBlobClosure::HeapRegionGatheringOopClosure::do_oop(narrowOop* o) {
  52   do_oop_work(o);
  53 }
  54 
  55 void G1CodeBlobClosure::do_code_blob(CodeBlob* cb) {
  56   nmethod* nm = cb->as_nmethod_or_null();
  57   if (nm != NULL) {
  58     if (!nm->test_set_oops_do_mark()) {
  59       _oc.set_nm(nm);
  60       nm->oops_do(&_oc);
  61       nm->fix_oop_relocations();
  62     }
  63   }
  64 }
  65 


  40     oop o = CompressedOops::decode_not_null(oop_or_narrowoop);
  41     HeapRegion* hr = _g1h->heap_region_containing(o);
  42     assert(!_g1h->is_in_cset(o) || hr->rem_set()->strong_code_roots_list_contains(_nm), "if o still in collection set then evacuation failed and nm must already be in the remset");
  43     hr->add_strong_code_root(_nm);
  44   }
  45 }
  46 
  47 void G1CodeBlobClosure::HeapRegionGatheringOopClosure::do_oop(oop* o) {
  48   do_oop_work(o);
  49 }
  50 
  51 void G1CodeBlobClosure::HeapRegionGatheringOopClosure::do_oop(narrowOop* o) {
  52   do_oop_work(o);
  53 }
  54 
  55 void G1CodeBlobClosure::do_code_blob(CodeBlob* cb) {
  56   nmethod* nm = cb->as_nmethod_or_null();
  57   if (nm != NULL) {
  58     if (!nm->test_set_oops_do_mark()) {
  59       _oc.set_nm(nm);
  60       nm->oops_do_keepalive(&_oc, _keepalive_is_strong);
  61       nm->fix_oop_relocations();
  62     }
  63   }
  64 }
  65 
< prev index next >