src/hotspot/share/gc/g1/g1SharedClosures.hpp
changeset 58777 18c246ad2ff9
parent 58263 4fbc534fdf69
--- a/src/hotspot/share/gc/g1/g1SharedClosures.hpp	Thu Oct 24 15:53:20 2019 +0800
+++ b/src/hotspot/share/gc/g1/g1SharedClosures.hpp	Thu Oct 24 11:08:16 2019 +0200
@@ -32,6 +32,11 @@
 // Simple holder object for a complete set of closures used by the G1 evacuation code.
 template <G1Mark Mark>
 class G1SharedClosures {
+  static bool needs_strong_processing() {
+    // Request strong code root processing when G1MarkFromRoot is passed in during
+    // initial mark.
+    return Mark == G1MarkFromRoot;
+  }
 public:
   G1ParCopyClosure<G1BarrierNone, Mark> _oops;
   G1ParCopyClosure<G1BarrierCLD,  Mark> _oops_in_cld;
@@ -43,5 +48,5 @@
     _oops(g1h, pss),
     _oops_in_cld(g1h, pss),
     _clds(&_oops_in_cld, process_only_dirty),
-    _codeblobs(&_oops) {}
+    _codeblobs(pss->worker_id(), &_oops, needs_strong_processing()) {}
 };