Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp @ 14518:d8041d695d19
Merged with jdk9/dev/hotspot changeset 3812c088b945
author | twisti |
---|---|
date | Tue, 11 Mar 2014 18:45:59 -0700 |
parents | 1e1c8d358b52 |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14141:f97c5ec83832 | 14518:d8041d695d19 |
---|---|
114 // collection. | 114 // collection. |
115 // | 115 // |
116 // If only -XX:NewRatio is set we should use the specified ratio of the heap | 116 // If only -XX:NewRatio is set we should use the specified ratio of the heap |
117 // as both min and max. This will be interpreted as "fixed" just like the | 117 // as both min and max. This will be interpreted as "fixed" just like the |
118 // NewSize==MaxNewSize case above. But we will update the min and max | 118 // NewSize==MaxNewSize case above. But we will update the min and max |
119 // everytime the heap size changes. | 119 // every time the heap size changes. |
120 // | 120 // |
121 // NewSize and MaxNewSize override NewRatio. So, NewRatio is ignored if it is | 121 // NewSize and MaxNewSize override NewRatio. So, NewRatio is ignored if it is |
122 // combined with either NewSize or MaxNewSize. (A warning message is printed.) | 122 // combined with either NewSize or MaxNewSize. (A warning message is printed.) |
123 class G1YoungGenSizer : public CHeapObj<mtGC> { | 123 class G1YoungGenSizer : public CHeapObj<mtGC> { |
124 private: | 124 private: |
521 // only one thread can be allocating a new CSet region (currently, | 521 // only one thread can be allocating a new CSet region (currently, |
522 // it does so after taking the Heap_lock) hence no need to | 522 // it does so after taking the Heap_lock) hence no need to |
523 // synchronize updates to this field. | 523 // synchronize updates to this field. |
524 size_t _inc_cset_recorded_rs_lengths; | 524 size_t _inc_cset_recorded_rs_lengths; |
525 | 525 |
526 // A concurrent refinement thread periodcially samples the young | 526 // A concurrent refinement thread periodically samples the young |
527 // region RSets and needs to update _inc_cset_recorded_rs_lengths as | 527 // region RSets and needs to update _inc_cset_recorded_rs_lengths as |
528 // the RSets grow. Instead of having to syncronize updates to that | 528 // the RSets grow. Instead of having to synchronize updates to that |
529 // field we accumulate them in this field and add it to | 529 // field we accumulate them in this field and add it to |
530 // _inc_cset_recorded_rs_lengths_diffs at the start of a GC. | 530 // _inc_cset_recorded_rs_lengths_diffs at the start of a GC. |
531 ssize_t _inc_cset_recorded_rs_lengths_diffs; | 531 ssize_t _inc_cset_recorded_rs_lengths_diffs; |
532 | 532 |
533 // The predicted elapsed time it will take to collect the regions in | 533 // The predicted elapsed time it will take to collect the regions in |
602 uint calculate_young_list_desired_max_length(); | 602 uint calculate_young_list_desired_max_length(); |
603 | 603 |
604 // Calculate and return the maximum young list target length that | 604 // Calculate and return the maximum young list target length that |
605 // can fit into the pause time goal. The parameters are: rs_lengths | 605 // can fit into the pause time goal. The parameters are: rs_lengths |
606 // represent the prediction of how large the young RSet lengths will | 606 // represent the prediction of how large the young RSet lengths will |
607 // be, base_min_length is the alreay existing number of regions in | 607 // be, base_min_length is the already existing number of regions in |
608 // the young list, min_length and max_length are the desired min and | 608 // the young list, min_length and max_length are the desired min and |
609 // max young list length according to the user's inputs. | 609 // max young list length according to the user's inputs. |
610 uint calculate_young_list_target_length(size_t rs_lengths, | 610 uint calculate_young_list_target_length(size_t rs_lengths, |
611 uint base_min_length, | 611 uint base_min_length, |
612 uint desired_min_length, | 612 uint desired_min_length, |
817 } else { | 817 } else { |
818 _short_lived_surv_rate_group->finished_recalculating_age_indexes(); | 818 _short_lived_surv_rate_group->finished_recalculating_age_indexes(); |
819 } | 819 } |
820 // do that for any other surv rate groups | 820 // do that for any other surv rate groups |
821 } | 821 } |
822 | |
823 size_t young_list_target_length() const { return _young_list_target_length; } | |
822 | 824 |
823 bool is_young_list_full() { | 825 bool is_young_list_full() { |
824 uint young_list_length = _g1->young_list()->length(); | 826 uint young_list_length = _g1->young_list()->length(); |
825 uint young_list_target_length = _young_list_target_length; | 827 uint young_list_target_length = _young_list_target_length; |
826 return young_list_length >= young_list_target_length; | 828 return young_list_length >= young_list_target_length; |