Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/collectionSetChooser.hpp @ 8681:27714220e50e
8007036: G1: Too many old regions added to last mixed GC
Summary: Stop adding old regions to collection set when the remaining reclaimable bytes reaches, or goes below, G1HeapWastePercent. Changes were also reviewed by Vitaly Davidovich <vitalyd@gmail.com>.
Reviewed-by: brutisso
author | johnc |
---|---|
date | Mon, 04 Mar 2013 12:42:14 -0800 |
parents | a2f7274eb6ef |
children | de6a9e811145 |
comparison
equal
deleted
inserted
replaced
8680:0624b9d81255 | 8681:27714220e50e |
---|---|
49 // The index of the next candidate old region to be considered for | 49 // The index of the next candidate old region to be considered for |
50 // addition to the CSet. | 50 // addition to the CSet. |
51 uint _curr_index; | 51 uint _curr_index; |
52 | 52 |
53 // The number of candidate old regions added to the CSet chooser. | 53 // The number of candidate old regions added to the CSet chooser. |
54 // Note: this is not updated when removing a region using | |
55 // remove_and_move_to_next() below. | |
54 uint _length; | 56 uint _length; |
55 | 57 |
56 // Keeps track of the start of the next array chunk to be claimed by | 58 // Keeps track of the start of the next array chunk to be claimed by |
57 // parallel GC workers. | 59 // parallel GC workers. |
58 uint _first_par_unreserved_idx; | 60 uint _first_par_unreserved_idx; |
109 assert(!hr->is_young(), "should never consider young regions"); | 111 assert(!hr->is_young(), "should never consider young regions"); |
110 return !hr->isHumongous() && | 112 return !hr->isHumongous() && |
111 hr->live_bytes() < _region_live_threshold_bytes; | 113 hr->live_bytes() < _region_live_threshold_bytes; |
112 } | 114 } |
113 | 115 |
114 // Calculate the minimum number of old regions we'll add to the CSet | 116 // Returns the number candidate old regions added |
115 // during a mixed GC. | 117 uint length() { return _length; } |
116 uint calc_min_old_cset_length(); | |
117 | |
118 // Calculate the maximum number of old regions we'll add to the CSet | |
119 // during a mixed GC. | |
120 uint calc_max_old_cset_length(); | |
121 | 118 |
122 // Serial version. | 119 // Serial version. |
123 void add_region(HeapRegion *hr); | 120 void add_region(HeapRegion *hr); |
124 | 121 |
125 // Must be called before calls to claim_array_chunk(). | 122 // Must be called before calls to claim_array_chunk(). |