comparison src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp @ 1282:b81f3572f355

6928059: G1: command line parameter renaming Summary: Rename G1 parameters to make them more consistent. Reviewed-by: jmasa, johnc
author tonyp
date Tue, 23 Feb 2010 23:13:23 -0500
parents deada8912c54
children c18cbe5936b8
comparison
equal deleted inserted replaced
1262:58add740c4ee 1282:b81f3572f355
42 _n_periods(0), 42 _n_periods(0),
43 _threads(NULL), _n_threads(0) 43 _threads(NULL), _n_threads(0)
44 { 44 {
45 45
46 // Ergomonically select initial concurrent refinement parameters 46 // Ergomonically select initial concurrent refinement parameters
47 if (FLAG_IS_DEFAULT(G1ConcRefineGreenZone)) { 47 if (FLAG_IS_DEFAULT(G1ConcRefinementGreenZone)) {
48 FLAG_SET_DEFAULT(G1ConcRefineGreenZone, MAX2<int>(ParallelGCThreads, 1)); 48 FLAG_SET_DEFAULT(G1ConcRefinementGreenZone, MAX2<int>(ParallelGCThreads, 1));
49 } 49 }
50 set_green_zone(G1ConcRefineGreenZone); 50 set_green_zone(G1ConcRefinementGreenZone);
51 51
52 if (FLAG_IS_DEFAULT(G1ConcRefineYellowZone)) { 52 if (FLAG_IS_DEFAULT(G1ConcRefinementYellowZone)) {
53 FLAG_SET_DEFAULT(G1ConcRefineYellowZone, green_zone() * 3); 53 FLAG_SET_DEFAULT(G1ConcRefinementYellowZone, green_zone() * 3);
54 } 54 }
55 set_yellow_zone(MAX2<int>(G1ConcRefineYellowZone, green_zone())); 55 set_yellow_zone(MAX2<int>(G1ConcRefinementYellowZone, green_zone()));
56 56
57 if (FLAG_IS_DEFAULT(G1ConcRefineRedZone)) { 57 if (FLAG_IS_DEFAULT(G1ConcRefinementRedZone)) {
58 FLAG_SET_DEFAULT(G1ConcRefineRedZone, yellow_zone() * 2); 58 FLAG_SET_DEFAULT(G1ConcRefinementRedZone, yellow_zone() * 2);
59 } 59 }
60 set_red_zone(MAX2<int>(G1ConcRefineRedZone, yellow_zone())); 60 set_red_zone(MAX2<int>(G1ConcRefinementRedZone, yellow_zone()));
61 _n_worker_threads = thread_num(); 61 _n_worker_threads = thread_num();
62 // We need one extra thread to do the young gen rset size sampling. 62 // We need one extra thread to do the young gen rset size sampling.
63 _n_threads = _n_worker_threads + 1; 63 _n_threads = _n_worker_threads + 1;
64 reset_threshold_step(); 64 reset_threshold_step();
65 65
74 next = t; 74 next = t;
75 } 75 }
76 } 76 }
77 77
78 void ConcurrentG1Refine::reset_threshold_step() { 78 void ConcurrentG1Refine::reset_threshold_step() {
79 if (FLAG_IS_DEFAULT(G1ConcRefineThresholdStep)) { 79 if (FLAG_IS_DEFAULT(G1ConcRefinementThresholdStep)) {
80 _thread_threshold_step = (yellow_zone() - green_zone()) / (worker_thread_num() + 1); 80 _thread_threshold_step = (yellow_zone() - green_zone()) / (worker_thread_num() + 1);
81 } else { 81 } else {
82 _thread_threshold_step = G1ConcRefineThresholdStep; 82 _thread_threshold_step = G1ConcRefinementThresholdStep;
83 } 83 }
84 } 84 }
85 85
86 int ConcurrentG1Refine::thread_num() { 86 int ConcurrentG1Refine::thread_num() {
87 return MAX2<int>((G1ParallelRSetThreads > 0) ? G1ParallelRSetThreads : ParallelGCThreads, 1); 87 return MAX2<int>((G1ConcRefinementThreads > 0) ? G1ConcRefinementThreads : ParallelGCThreads, 1);
88 } 88 }
89 89
90 void ConcurrentG1Refine::init() { 90 void ConcurrentG1Refine::init() {
91 if (G1ConcRSLogCacheSize > 0) { 91 if (G1ConcRSLogCacheSize > 0) {
92 _g1h = G1CollectedHeap::heap(); 92 _g1h = G1CollectedHeap::heap();