37 class G1RemSet; |
37 class G1RemSet; |
38 class DirtyCardQueue; |
38 class DirtyCardQueue; |
39 |
39 |
40 class ConcurrentG1Refine: public CHeapObj<mtGC> { |
40 class ConcurrentG1Refine: public CHeapObj<mtGC> { |
41 ConcurrentG1RefineThread** _threads; |
41 ConcurrentG1RefineThread** _threads; |
42 int _n_threads; |
42 uint _n_threads; |
43 int _n_worker_threads; |
43 uint _n_worker_threads; |
44 /* |
44 /* |
45 * The value of the update buffer queue length falls into one of 3 zones: |
45 * The value of the update buffer queue length falls into one of 3 zones: |
46 * green, yellow, red. If the value is in [0, green) nothing is |
46 * green, yellow, red. If the value is in [0, green) nothing is |
47 * done, the buffers are left unprocessed to enable the caching effect of the |
47 * done, the buffers are left unprocessed to enable the caching effect of the |
48 * dirtied cards. In the yellow zone [green, yellow) the concurrent refinement |
48 * dirtied cards. In the yellow zone [green, yellow) the concurrent refinement |
86 void worker_threads_do(ThreadClosure * tc); |
86 void worker_threads_do(ThreadClosure * tc); |
87 |
87 |
88 // The RS sampling thread |
88 // The RS sampling thread |
89 ConcurrentG1RefineThread * sampling_thread() const; |
89 ConcurrentG1RefineThread * sampling_thread() const; |
90 |
90 |
91 static int thread_num(); |
91 static uint thread_num(); |
92 |
92 |
93 void print_worker_threads_on(outputStream* st) const; |
93 void print_worker_threads_on(outputStream* st) const; |
94 |
94 |
95 void set_green_zone(int x) { _green_zone = x; } |
95 void set_green_zone(int x) { _green_zone = x; } |
96 void set_yellow_zone(int x) { _yellow_zone = x; } |
96 void set_yellow_zone(int x) { _yellow_zone = x; } |
98 |
98 |
99 int green_zone() const { return _green_zone; } |
99 int green_zone() const { return _green_zone; } |
100 int yellow_zone() const { return _yellow_zone; } |
100 int yellow_zone() const { return _yellow_zone; } |
101 int red_zone() const { return _red_zone; } |
101 int red_zone() const { return _red_zone; } |
102 |
102 |
103 int total_thread_num() const { return _n_threads; } |
103 uint total_thread_num() const { return _n_threads; } |
104 int worker_thread_num() const { return _n_worker_threads; } |
104 uint worker_thread_num() const { return _n_worker_threads; } |
105 |
105 |
106 int thread_threshold_step() const { return _thread_threshold_step; } |
106 int thread_threshold_step() const { return _thread_threshold_step; } |
107 |
107 |
108 G1HotCardCache* hot_card_cache() { return &_hot_card_cache; } |
108 G1HotCardCache* hot_card_cache() { return &_hot_card_cache; } |
109 }; |
109 }; |