< prev index next >

src/hotspot/share/memory/iterator.cpp

Print this page
@@ -1,7 +1,7 @@
  /*
-  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+  * Copyright (c) 1997, 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.

@@ -23,10 +23,11 @@
   */
  
  #include "precompiled.hpp"
  #include "classfile/classLoaderDataGraph.hpp"
  #include "code/nmethod.hpp"
+ #include "gc/shared/barrierSetNMethod.hpp"
  #include "memory/iterator.inline.hpp"
  #include "oops/oop.inline.hpp"
  #include "utilities/debug.hpp"
  #include "utilities/globalDefinitions.hpp"
  

@@ -55,11 +56,19 @@
  }
  
  void MarkingCodeBlobClosure::do_code_blob(CodeBlob* cb) {
    nmethod* nm = cb->as_nmethod_or_null();
    if (nm != NULL && nm->oops_do_try_claim()) {
-     do_nmethod(nm);
+     nm->oops_do(_cl);
+     if (_fix_relocations) {
+       nm->fix_oop_relocations();
+     }
+     if (_keepalive_nmethods) {
+       nm->mark_as_maybe_on_continuation();
+       BarrierSetNMethod* bs_nm = BarrierSet::barrier_set()->barrier_set_nmethod();
+       bs_nm->disarm(nm);
+     }
    }
  }
  
  void CodeBlobToNMethodClosure::do_code_blob(CodeBlob* cb) {
    nmethod* nm = cb->as_nmethod_or_null();
< prev index next >