equal
deleted
inserted
replaced
63 * amount of time spent updating rsets during a collection. |
63 * amount of time spent updating rsets during a collection. |
64 */ |
64 */ |
65 size_t _green_zone; |
65 size_t _green_zone; |
66 size_t _yellow_zone; |
66 size_t _yellow_zone; |
67 size_t _red_zone; |
67 size_t _red_zone; |
68 |
68 size_t _min_yellow_zone_size; |
69 size_t _thread_threshold_step; |
|
70 |
|
71 double _predictor_sigma; |
|
72 |
69 |
73 // We delay the refinement of 'hot' cards using the hot card cache. |
70 // We delay the refinement of 'hot' cards using the hot card cache. |
74 G1HotCardCache _hot_card_cache; |
71 G1HotCardCache _hot_card_cache; |
75 |
72 |
76 // Reset the threshold step value based of the current zone boundaries. |
73 ConcurrentG1Refine(G1CollectedHeap* g1h, |
77 void reset_threshold_step(); |
74 size_t green_zone, |
|
75 size_t yellow_zone, |
|
76 size_t red_zone, |
|
77 size_t min_yellow_zone_size); |
78 |
78 |
79 ConcurrentG1Refine(G1CollectedHeap* g1h, const G1Predictions* predictions); |
79 // Update green/yellow/red zone values based on how well goals are being met. |
|
80 void update_zones(double update_rs_time, |
|
81 size_t update_rs_processed_buffers, |
|
82 double goal_ms); |
|
83 |
|
84 // Update thread thresholds to account for updated zone values. |
|
85 void update_thread_thresholds(); |
80 |
86 |
81 public: |
87 public: |
82 ~ConcurrentG1Refine(); |
88 ~ConcurrentG1Refine(); |
83 |
89 |
84 // Returns ConcurrentG1Refine instance if succeeded to create/initialize ConcurrentG1Refine and ConcurrentG1RefineThread. |
90 // Returns ConcurrentG1Refine instance if succeeded to create/initialize ConcurrentG1Refine and ConcurrentG1RefineThread. |
86 static ConcurrentG1Refine* create(G1CollectedHeap* g1h, CardTableEntryClosure* refine_closure, jint* ecode); |
92 static ConcurrentG1Refine* create(G1CollectedHeap* g1h, CardTableEntryClosure* refine_closure, jint* ecode); |
87 |
93 |
88 void init(G1RegionToSpaceMapper* card_counts_storage); |
94 void init(G1RegionToSpaceMapper* card_counts_storage); |
89 void stop(); |
95 void stop(); |
90 |
96 |
91 void adjust(double update_rs_time, double update_rs_processed_buffers, double goal_ms); |
97 void adjust(double update_rs_time, size_t update_rs_processed_buffers, double goal_ms); |
92 |
|
93 void reinitialize_threads(); |
|
94 |
98 |
95 // Iterate over all concurrent refinement threads |
99 // Iterate over all concurrent refinement threads |
96 void threads_do(ThreadClosure *tc); |
100 void threads_do(ThreadClosure *tc); |
97 |
101 |
98 // Iterate over all worker refinement threads |
102 // Iterate over all worker refinement threads |
103 |
107 |
104 static uint thread_num(); |
108 static uint thread_num(); |
105 |
109 |
106 void print_worker_threads_on(outputStream* st) const; |
110 void print_worker_threads_on(outputStream* st) const; |
107 |
111 |
108 void set_green_zone(size_t x) { _green_zone = x; } |
|
109 void set_yellow_zone(size_t x) { _yellow_zone = x; } |
|
110 void set_red_zone(size_t x) { _red_zone = x; } |
|
111 |
|
112 size_t green_zone() const { return _green_zone; } |
112 size_t green_zone() const { return _green_zone; } |
113 size_t yellow_zone() const { return _yellow_zone; } |
113 size_t yellow_zone() const { return _yellow_zone; } |
114 size_t red_zone() const { return _red_zone; } |
114 size_t red_zone() const { return _red_zone; } |
115 |
|
116 uint worker_thread_num() const { return _n_worker_threads; } |
|
117 |
|
118 size_t thread_threshold_step() const { return _thread_threshold_step; } |
|
119 |
115 |
120 G1HotCardCache* hot_card_cache() { return &_hot_card_cache; } |
116 G1HotCardCache* hot_card_cache() { return &_hot_card_cache; } |
121 |
117 |
122 static bool hot_card_cache_enabled() { return G1HotCardCache::default_use_cache(); } |
118 static bool hot_card_cache_enabled() { return G1HotCardCache::default_use_cache(); } |
123 }; |
119 }; |