equal
deleted
inserted
replaced
29 |
29 |
30 // Forward Decl. |
30 // Forward Decl. |
31 class CardTableEntryClosure; |
31 class CardTableEntryClosure; |
32 class ConcurrentG1Refine; |
32 class ConcurrentG1Refine; |
33 |
33 |
34 // The G1 Concurrent Refinement Thread (could be several in the future). |
34 // One or more G1 Concurrent Refinement Threads may be active if concurrent |
35 |
35 // refinement is in progress. |
36 class ConcurrentG1RefineThread: public ConcurrentGCThread { |
36 class ConcurrentG1RefineThread: public ConcurrentGCThread { |
37 friend class VMStructs; |
37 friend class VMStructs; |
38 friend class G1CollectedHeap; |
38 friend class G1CollectedHeap; |
39 |
39 |
40 double _vtime_start; // Initial virtual time. |
40 double _vtime_start; // Initial virtual time. |
41 double _vtime_accum; // Initial virtual time. |
41 double _vtime_accum; // Accumulated virtual time. |
42 uint _worker_id; |
42 uint _worker_id; |
43 uint _worker_id_offset; |
43 uint _worker_id_offset; |
44 |
44 |
45 // The refinement threads collection is linked list. A predecessor can activate a successor |
45 // The refinement threads collection is linked list. A predecessor can activate a successor |
46 // when the number of the rset update buffer crosses a certain threshold. A successor |
46 // when the number of the rset update buffer crosses a certain threshold. A successor |
57 // This thread activation threshold |
57 // This thread activation threshold |
58 int _threshold; |
58 int _threshold; |
59 // This thread deactivation threshold |
59 // This thread deactivation threshold |
60 int _deactivation_threshold; |
60 int _deactivation_threshold; |
61 |
61 |
62 void sample_young_list_rs_lengths(); |
|
63 void run_young_rs_sampling(); |
|
64 void wait_for_completed_buffers(); |
62 void wait_for_completed_buffers(); |
65 |
63 |
66 void set_active(bool x) { _active = x; } |
64 void set_active(bool x) { _active = x; } |
67 bool is_active(); |
65 bool is_active(); |
68 void activate(); |
66 void activate(); |
69 void deactivate(); |
67 void deactivate(); |
|
68 |
|
69 bool is_primary() { return (_worker_id == 0); } |
|
70 |
|
71 void run_service(); |
|
72 void stop_service(); |
70 |
73 |
71 public: |
74 public: |
72 virtual void run(); |
75 virtual void run(); |
73 // Constructor |
76 // Constructor |
74 ConcurrentG1RefineThread(ConcurrentG1Refine* cg1r, ConcurrentG1RefineThread* next, |
77 ConcurrentG1RefineThread(ConcurrentG1Refine* cg1r, ConcurrentG1RefineThread* next, |