< prev index next >

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

Print this page




  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_G1_G1CONCURRENTREFINE_HPP
  26 #define SHARE_VM_GC_G1_G1CONCURRENTREFINE_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "utilities/globalDefinitions.hpp"
  30 
  31 // Forward decl
  32 class CardTableEntryClosure;
  33 class G1ConcurrentRefine;
  34 class G1ConcurrentRefineThread;
  35 class outputStream;
  36 class ThreadClosure;
  37 
  38 // Helper class for refinement thread management. Used to start, stop and
  39 // iterate over them.
  40 class G1ConcurrentRefineThreadControl VALUE_OBJ_CLASS_SPEC {
  41   G1ConcurrentRefine* _cr;
  42 
  43   G1ConcurrentRefineThread** _threads;
  44   uint _num_max_threads;
  45 
  46   // Create the refinement thread for the given worker id.
  47   // If initializing is true, ignore InjectGCWorkerCreationFailure.
  48   G1ConcurrentRefineThread* create_refinement_thread(uint worker_id, bool initializing);
  49 public:
  50   G1ConcurrentRefineThreadControl();
  51   ~G1ConcurrentRefineThreadControl();
  52 
  53   jint initialize(G1ConcurrentRefine* cr, uint num_max_threads);
  54 
  55   // If there is a "successor" thread that can be activated given the current id,
  56   // activate it.
  57   void maybe_activate_next(uint cur_worker_id);
  58 
  59   void print_on(outputStream* st) const;
  60   void worker_threads_do(ThreadClosure* tc);




  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_G1_G1CONCURRENTREFINE_HPP
  26 #define SHARE_VM_GC_G1_G1CONCURRENTREFINE_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "utilities/globalDefinitions.hpp"
  30 
  31 // Forward decl
  32 class CardTableEntryClosure;
  33 class G1ConcurrentRefine;
  34 class G1ConcurrentRefineThread;
  35 class outputStream;
  36 class ThreadClosure;
  37 
  38 // Helper class for refinement thread management. Used to start, stop and
  39 // iterate over them.
  40 class G1ConcurrentRefineThreadControl {
  41   G1ConcurrentRefine* _cr;
  42 
  43   G1ConcurrentRefineThread** _threads;
  44   uint _num_max_threads;
  45 
  46   // Create the refinement thread for the given worker id.
  47   // If initializing is true, ignore InjectGCWorkerCreationFailure.
  48   G1ConcurrentRefineThread* create_refinement_thread(uint worker_id, bool initializing);
  49 public:
  50   G1ConcurrentRefineThreadControl();
  51   ~G1ConcurrentRefineThreadControl();
  52 
  53   jint initialize(G1ConcurrentRefine* cr, uint num_max_threads);
  54 
  55   // If there is a "successor" thread that can be activated given the current id,
  56   // activate it.
  57   void maybe_activate_next(uint cur_worker_id);
  58 
  59   void print_on(outputStream* st) const;
  60   void worker_threads_do(ThreadClosure* tc);


< prev index next >