< prev index next >

src/hotspot/share/gc/g1/g1ConcurrentRefine.hpp

Print this page
rev 47863 : imported patch 8190426-lazy-init-refinement-threads
rev 47864 : [mq]: 8190426-sangheon-review

@@ -36,19 +36,23 @@
 class ThreadClosure;
 
 // Helper class for refinement thread management. Used to start, stop and
 // iterate over them.
 class G1ConcurrentRefineThreadControl VALUE_OBJ_CLASS_SPEC {
-  G1ConcurrentRefine* _cg1r;
+  G1ConcurrentRefine* _cr;
 
   G1ConcurrentRefineThread** _threads;
   uint _num_max_threads;
+
+  // Create the refinement thread for the given worker id.
+  // If initializing is true, ignore InjectGCWorkerCreationFailure.
+  G1ConcurrentRefineThread* create_refinement_thread(uint worker_id, bool initializing);
 public:
   G1ConcurrentRefineThreadControl();
   ~G1ConcurrentRefineThreadControl();
 
-  void initialize(G1ConcurrentRefine* cg1r, uint num_max_threads);
+  jint initialize(G1ConcurrentRefine* cr, uint num_max_threads);
 
   // If there is a "successor" thread that can be activated given the current id,
   // activate it.
   void maybe_activate_next(uint cur_worker_id);
 

@@ -99,10 +103,11 @@
                     double goal_ms);
 
   static uint worker_id_offset();
   void maybe_activate_more_threads(uint worker_id, size_t num_cur_buffers);
 
+  jint initialize();
 public:
   ~G1ConcurrentRefine();
 
   // Returns a G1ConcurrentRefine instance if succeeded to create/initialize the
   // G1ConcurrentRefine instance. Otherwise, returns NULL with error code.
< prev index next >