15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc_implementation/g1/concurrentG1Refine.hpp"
27 #include "gc_implementation/g1/concurrentG1RefineThread.hpp"
28 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
29 #include "gc_implementation/g1/g1HotCardCache.hpp"
30
31 ConcurrentG1Refine::ConcurrentG1Refine(G1CollectedHeap* g1h) :
32 _threads(NULL), _n_threads(0),
33 _hot_card_cache(g1h)
34 {
35 // Ergomonically select initial concurrent refinement parameters
36 if (FLAG_IS_DEFAULT(G1ConcRefinementGreenZone)) {
37 FLAG_SET_DEFAULT(G1ConcRefinementGreenZone, MAX2<int>(ParallelGCThreads, 1));
38 }
39 set_green_zone(G1ConcRefinementGreenZone);
40
41 if (FLAG_IS_DEFAULT(G1ConcRefinementYellowZone)) {
42 FLAG_SET_DEFAULT(G1ConcRefinementYellowZone, green_zone() * 3);
43 }
44 set_yellow_zone(MAX2<int>(G1ConcRefinementYellowZone, green_zone()));
45
46 if (FLAG_IS_DEFAULT(G1ConcRefinementRedZone)) {
47 FLAG_SET_DEFAULT(G1ConcRefinementRedZone, yellow_zone() * 2);
48 }
49 set_red_zone(MAX2<int>(G1ConcRefinementRedZone, yellow_zone()));
50
51 _n_worker_threads = thread_num();
52 // We need one extra thread to do the young gen rset size sampling.
53 _n_threads = _n_worker_threads + 1;
54
55 reset_threshold_step();
|
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc_implementation/g1/concurrentG1Refine.hpp"
27 #include "gc_implementation/g1/concurrentG1RefineThread.hpp"
28 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
29 #include "gc_implementation/g1/g1HotCardCache.hpp"
30
31 ConcurrentG1Refine::ConcurrentG1Refine(G1CollectedHeap* g1h) :
32 _threads(NULL), _n_threads(0),
33 _hot_card_cache(g1h)
34 {
35 // Ergonomically select initial concurrent refinement parameters
36 if (FLAG_IS_DEFAULT(G1ConcRefinementGreenZone)) {
37 FLAG_SET_DEFAULT(G1ConcRefinementGreenZone, MAX2<int>(ParallelGCThreads, 1));
38 }
39 set_green_zone(G1ConcRefinementGreenZone);
40
41 if (FLAG_IS_DEFAULT(G1ConcRefinementYellowZone)) {
42 FLAG_SET_DEFAULT(G1ConcRefinementYellowZone, green_zone() * 3);
43 }
44 set_yellow_zone(MAX2<int>(G1ConcRefinementYellowZone, green_zone()));
45
46 if (FLAG_IS_DEFAULT(G1ConcRefinementRedZone)) {
47 FLAG_SET_DEFAULT(G1ConcRefinementRedZone, yellow_zone() * 2);
48 }
49 set_red_zone(MAX2<int>(G1ConcRefinementRedZone, yellow_zone()));
50
51 _n_worker_threads = thread_num();
52 // We need one extra thread to do the young gen rset size sampling.
53 _n_threads = _n_worker_threads + 1;
54
55 reset_threshold_step();
|