< prev index next >

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

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.
--- 1,7 ---
  /*
!  * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

*** 27,10 ***
--- 27,11 ---
  #include "gc/g1/g1CodeBlobClosure.hpp"
  #include "gc/g1/g1CollectedHeap.inline.hpp"
  #include "gc/g1/g1ConcurrentMark.inline.hpp"
  #include "gc/g1/heapRegion.hpp"
  #include "gc/g1/heapRegionRemSet.inline.hpp"
+ #include "gc/shared/barrierSetNMethod.hpp"
  #include "oops/access.inline.hpp"
  #include "oops/compressedOops.inline.hpp"
  #include "oops/oop.inline.hpp"
  
  template <typename T>

*** 73,12 ***
--- 74,19 ---
    do_oop_work(o);
  }
  
  void G1CodeBlobClosure::do_evacuation_and_fixup(nmethod* nm) {
    _oc.set_nm(nm);
+   if (_keepalive_is_strong) {
+     nm->mark_as_maybe_on_continuation();
+   }
    nm->oops_do(&_oc);
    nm->fix_oop_relocations();
+   BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
+   if (bs_nm != NULL) {
+     bs_nm->disarm(nm);
+   }
  }
  
  void G1CodeBlobClosure::do_marking(nmethod* nm) {
    nm->oops_do(&_marking_oc);
  }
< prev index next >