Thu, 07 May 2009 13:54:48 -0700
Merge
1.1 --- a/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp Thu May 07 11:44:53 2009 -0400 1.2 +++ b/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp Thu May 07 13:54:48 2009 -0700 1.3 @@ -53,7 +53,9 @@ 1.4 ResourceMark rm; 1.5 HandleMark hm; 1.6 1.7 - if (TraceG1Refine) gclog_or_tty->print_cr("G1-Refine starting pass"); 1.8 + if (G1TraceConcurrentRefinement) { 1.9 + gclog_or_tty->print_cr("G1-Refine starting pass"); 1.10 + } 1.11 _sts.join(); 1.12 bool no_sleep = _cg1r->refine(); 1.13 _sts.leave(); 1.14 @@ -207,9 +209,9 @@ 1.15 1.16 1.17 void ConcurrentG1RefineThread::yield() { 1.18 - if (TraceG1Refine) gclog_or_tty->print_cr("G1-Refine-yield"); 1.19 + if (G1TraceConcurrentRefinement) gclog_or_tty->print_cr("G1-Refine-yield"); 1.20 _sts.yield("G1 refine"); 1.21 - if (TraceG1Refine) gclog_or_tty->print_cr("G1-Refine-yield-end"); 1.22 + if (G1TraceConcurrentRefinement) gclog_or_tty->print_cr("G1-Refine-yield-end"); 1.23 } 1.24 1.25 void ConcurrentG1RefineThread::stop() { 1.26 @@ -230,7 +232,7 @@ 1.27 Terminator_lock->wait(); 1.28 } 1.29 } 1.30 - if (TraceG1Refine) gclog_or_tty->print_cr("G1-Refine-stop"); 1.31 + if (G1TraceConcurrentRefinement) gclog_or_tty->print_cr("G1-Refine-stop"); 1.32 } 1.33 1.34 void ConcurrentG1RefineThread::print() {
2.1 --- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp Thu May 07 11:44:53 2009 -0400 2.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp Thu May 07 13:54:48 2009 -0700 2.3 @@ -448,8 +448,8 @@ 2.4 gclog_or_tty->print_cr("[global] init, heap start = "PTR_FORMAT", " 2.5 "heap end = "PTR_FORMAT, _heap_start, _heap_end); 2.6 2.7 - _markStack.allocate(G1CMStackSize); 2.8 - _regionStack.allocate(G1CMRegionStackSize); 2.9 + _markStack.allocate(G1MarkStackSize); 2.10 + _regionStack.allocate(G1MarkRegionStackSize); 2.11 2.12 // Create & start a ConcurrentMark thread. 2.13 if (G1ConcMark) { 2.14 @@ -499,20 +499,21 @@ 2.15 _marking_task_overhead = 1.0; 2.16 } else { 2.17 if (ParallelMarkingThreads > 0) { 2.18 - // notice that ParallelMarkingThreads overwrites G1MarkingOverheadPerc 2.19 + // notice that ParallelMarkingThreads overwrites G1MarkingOverheadPercent 2.20 // if both are set 2.21 2.22 _parallel_marking_threads = ParallelMarkingThreads; 2.23 _sleep_factor = 0.0; 2.24 _marking_task_overhead = 1.0; 2.25 - } else if (G1MarkingOverheadPerc > 0) { 2.26 + } else if (G1MarkingOverheadPercent > 0) { 2.27 // we will calculate the number of parallel marking threads 2.28 // based on a target overhead with respect to the soft real-time 2.29 // goal 2.30 2.31 - double marking_overhead = (double) G1MarkingOverheadPerc / 100.0; 2.32 + double marking_overhead = (double) G1MarkingOverheadPercent / 100.0; 2.33 double overall_cm_overhead = 2.34 - (double) G1MaxPauseTimeMS * marking_overhead / (double) G1TimeSliceMS; 2.35 + (double) MaxGCPauseMillis * marking_overhead / 2.36 + (double) GCPauseIntervalMillis; 2.37 double cpu_ratio = 1.0 / (double) os::processor_count(); 2.38 double marking_thread_num = ceil(overall_cm_overhead / cpu_ratio); 2.39 double marking_task_overhead = 2.40 @@ -1747,7 +1748,7 @@ 2.41 g1h->increment_total_collections(); 2.42 2.43 #ifndef PRODUCT 2.44 - if (G1VerifyConcMark) { 2.45 + if (VerifyDuringGC) { 2.46 G1CollectedHeap::heap()->prepare_for_verify(); 2.47 G1CollectedHeap::heap()->verify(true,false); 2.48 }
3.1 --- a/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp Thu May 07 11:44:53 2009 -0400 3.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp Thu May 07 13:54:48 2009 -0700 3.3 @@ -136,9 +136,6 @@ 3.4 iter++; 3.5 if (!cm()->has_aborted()) { 3.6 _cm->markFromRoots(); 3.7 - } else { 3.8 - if (TraceConcurrentMark) 3.9 - gclog_or_tty->print_cr("CM-skip-mark-from-roots"); 3.10 } 3.11 3.12 double mark_end_time = os::elapsedVTime(); 3.13 @@ -163,9 +160,6 @@ 3.14 sprintf(verbose_str, "GC remark"); 3.15 VM_CGC_Operation op(&final_cl, verbose_str); 3.16 VMThread::execute(&op); 3.17 - } else { 3.18 - if (TraceConcurrentMark) 3.19 - gclog_or_tty->print_cr("CM-skip-remark"); 3.20 } 3.21 if (cm()->restart_for_overflow() && 3.22 G1TraceMarkStackOverflow) { 3.23 @@ -208,8 +202,6 @@ 3.24 count_end_sec - count_start_sec); 3.25 } 3.26 } 3.27 - } else { 3.28 - if (TraceConcurrentMark) gclog_or_tty->print_cr("CM-skip-end-game"); 3.29 } 3.30 double end_time = os::elapsedVTime(); 3.31 _vtime_count_accum += (end_time - counting_start_time); 3.32 @@ -230,7 +222,6 @@ 3.33 VM_CGC_Operation op(&cl_cl, verbose_str); 3.34 VMThread::execute(&op); 3.35 } else { 3.36 - if (TraceConcurrentMark) gclog_or_tty->print_cr("CM-skip-cleanup"); 3.37 G1CollectedHeap::heap()->set_marking_complete(); 3.38 } 3.39 3.40 @@ -287,9 +278,7 @@ 3.41 3.42 3.43 void ConcurrentMarkThread::yield() { 3.44 - if (TraceConcurrentMark) gclog_or_tty->print_cr("CM-yield"); 3.45 _sts.yield("Concurrent Mark"); 3.46 - if (TraceConcurrentMark) gclog_or_tty->print_cr("CM-yield-end"); 3.47 } 3.48 3.49 void ConcurrentMarkThread::stop() { 3.50 @@ -299,7 +288,6 @@ 3.51 while (!_has_terminated) { 3.52 Terminator_lock->wait(); 3.53 } 3.54 - if (TraceConcurrentMark) gclog_or_tty->print_cr("CM-stop"); 3.55 } 3.56 3.57 void ConcurrentMarkThread::print() { 3.58 @@ -314,12 +302,10 @@ 3.59 // below while the world is otherwise stopped. 3.60 MutexLockerEx x(CGC_lock, Mutex::_no_safepoint_check_flag); 3.61 while (!started()) { 3.62 - if (TraceConcurrentMark) gclog_or_tty->print_cr("CM-sleeping"); 3.63 CGC_lock->wait(Mutex::_no_safepoint_check_flag); 3.64 } 3.65 set_in_progress(); 3.66 clear_started(); 3.67 - if (TraceConcurrentMark) gclog_or_tty->print_cr("CM-starting"); 3.68 } 3.69 3.70 // Note: this method, although exported by the ConcurrentMarkSweepThread,
4.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Thu May 07 11:44:53 2009 -0400 4.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Thu May 07 13:54:48 2009 -0700 4.3 @@ -528,7 +528,7 @@ 4.4 res->zero_fill_state() == HeapRegion::Allocated)), 4.5 "Non-young alloc Regions must be zero filled (and non-H)"); 4.6 4.7 - if (G1TraceRegions) { 4.8 + if (G1PrintRegions) { 4.9 if (res != NULL) { 4.10 gclog_or_tty->print_cr("new alloc region %d:["PTR_FORMAT", "PTR_FORMAT"], " 4.11 "top "PTR_FORMAT, 4.12 @@ -2282,13 +2282,13 @@ 4.13 // to that. 4.14 g1_policy()->print_tracing_info(); 4.15 } 4.16 - if (SummarizeG1RSStats) { 4.17 + if (G1SummarizeRSetStats) { 4.18 g1_rem_set()->print_summary_info(); 4.19 } 4.20 - if (SummarizeG1ConcMark) { 4.21 + if (G1SummarizeConcurrentMark) { 4.22 concurrent_mark()->print_summary_info(); 4.23 } 4.24 - if (SummarizeG1ZFStats) { 4.25 + if (G1SummarizeZFStats) { 4.26 ConcurrentZFThread::print_summary_info(); 4.27 } 4.28 g1_policy()->print_yg_surv_rate_info(); 4.29 @@ -3255,7 +3255,7 @@ 4.30 HeapRegion* r = heap_region_containing(old); 4.31 if (!r->evacuation_failed()) { 4.32 r->set_evacuation_failed(true); 4.33 - if (G1TraceRegions) { 4.34 + if (G1PrintRegions) { 4.35 gclog_or_tty->print("evacuation failed in heap region "PTR_FORMAT" " 4.36 "["PTR_FORMAT","PTR_FORMAT")\n", 4.37 r, r->bottom(), r->end()); 4.38 @@ -3466,7 +3466,7 @@ 4.39 } 4.40 4.41 static size_t gclab_word_size() { 4.42 - return ParallelGCG1AllocBufferSize / HeapWordSize; 4.43 + return G1ParallelGCAllocBufferSize / HeapWordSize; 4.44 } 4.45 4.46 static size_t bitmap_size_in_bits() { 4.47 @@ -3616,7 +3616,7 @@ 4.48 4.49 public: 4.50 G1ParGCAllocBuffer() : 4.51 - ParGCAllocBuffer(ParallelGCG1AllocBufferSize / HeapWordSize), 4.52 + ParGCAllocBuffer(G1ParallelGCAllocBufferSize / HeapWordSize), 4.53 _during_marking(G1CollectedHeap::heap()->mark_in_progress()), 4.54 _bitmap(G1CollectedHeap::heap()->reserved_region().start()), 4.55 _retired(false) 4.56 @@ -3812,14 +3812,14 @@ 4.57 4.58 HeapWord* obj = NULL; 4.59 if (word_sz * 100 < 4.60 - (size_t)(ParallelGCG1AllocBufferSize / HeapWordSize) * 4.61 + (size_t)(G1ParallelGCAllocBufferSize / HeapWordSize) * 4.62 ParallelGCBufferWastePct) { 4.63 G1ParGCAllocBuffer* alloc_buf = alloc_buffer(purpose); 4.64 add_to_alloc_buffer_waste(alloc_buf->words_remaining()); 4.65 alloc_buf->retire(false, false); 4.66 4.67 HeapWord* buf = 4.68 - _g1h->par_allocate_during_gc(purpose, ParallelGCG1AllocBufferSize / HeapWordSize); 4.69 + _g1h->par_allocate_during_gc(purpose, G1ParallelGCAllocBufferSize / HeapWordSize); 4.70 if (buf == NULL) return NULL; // Let caller handle allocation failure. 4.71 // Otherwise. 4.72 alloc_buf->set_buf(buf); 4.73 @@ -4331,7 +4331,7 @@ 4.74 _g1h->g1_policy()->record_obj_copy_time(i, elapsed_ms-term_ms); 4.75 _g1h->g1_policy()->record_termination_time(i, term_ms); 4.76 } 4.77 - if (G1UseSurvivorSpace) { 4.78 + if (G1UseSurvivorSpaces) { 4.79 _g1h->g1_policy()->record_thread_age_table(pss.age_table()); 4.80 } 4.81 _g1h->update_surviving_young_words(pss.surviving_young_words()+1); 4.82 @@ -4435,28 +4435,6 @@ 4.83 4.84 // XXX What should this be doing in the parallel case? 4.85 g1_policy()->record_collection_pause_end_CH_strong_roots(); 4.86 - if (G1VerifyRemSet) { 4.87 - // :::: FIXME :::: 4.88 - // The stupid remembered set doesn't know how to filter out dead 4.89 - // objects, which the smart one does, and so when it is created 4.90 - // and then compared the number of entries in each differs and 4.91 - // the verification code fails. 4.92 - guarantee(false, "verification code is broken, see note"); 4.93 - 4.94 - // Let's make sure that the current rem set agrees with the stupidest 4.95 - // one possible! 4.96 - bool refs_enabled = ref_processor()->discovery_enabled(); 4.97 - if (refs_enabled) ref_processor()->disable_discovery(); 4.98 - StupidG1RemSet stupid(this); 4.99 - count_closure.n = 0; 4.100 - stupid.oops_into_collection_set_do(&count_closure, worker_i); 4.101 - int stupid_n = count_closure.n; 4.102 - count_closure.n = 0; 4.103 - g1_rem_set()->oops_into_collection_set_do(&count_closure, worker_i); 4.104 - guarantee(count_closure.n == stupid_n, "Old and new rem sets differ."); 4.105 - gclog_or_tty->print_cr("\nFound %d pointers in heap RS.", count_closure.n); 4.106 - if (refs_enabled) ref_processor()->enable_discovery(); 4.107 - } 4.108 if (scan_so != NULL) { 4.109 scan_scan_only_set(scan_so, worker_i); 4.110 }
5.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Thu May 07 11:44:53 2009 -0400 5.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp Thu May 07 13:54:48 2009 -0700 5.3 @@ -37,8 +37,9 @@ 5.4 inline HeapRegion* 5.5 G1CollectedHeap::heap_region_containing_raw(const void* addr) const { 5.6 assert(_g1_reserved.contains(addr), "invariant"); 5.7 - size_t index = ((intptr_t) addr - (intptr_t) _g1_reserved.start()) 5.8 - >> HeapRegion::LogOfHRGrainBytes; 5.9 + size_t index = pointer_delta(addr, _g1_reserved.start(), 1) 5.10 + >> HeapRegion::LogOfHRGrainBytes; 5.11 + 5.12 HeapRegion* res = _hrs->at(index); 5.13 assert(res == _hrs->addr_to_region(addr), "sanity"); 5.14 return res;
6.1 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Thu May 07 11:44:53 2009 -0400 6.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Thu May 07 13:54:48 2009 -0700 6.3 @@ -136,7 +136,7 @@ 6.4 _scanned_cards_seq(new TruncatedSeq(TruncatedSeqLength)), 6.5 _rs_lengths_seq(new TruncatedSeq(TruncatedSeqLength)), 6.6 6.7 - _pause_time_target_ms((double) G1MaxPauseTimeMS), 6.8 + _pause_time_target_ms((double) MaxGCPauseMillis), 6.9 6.10 // </NEW PREDICTION> 6.11 6.12 @@ -220,7 +220,7 @@ 6.13 _par_last_termination_times_ms = new double[_parallel_gc_threads]; 6.14 6.15 // start conservatively 6.16 - _expensive_region_limit_ms = 0.5 * (double) G1MaxPauseTimeMS; 6.17 + _expensive_region_limit_ms = 0.5 * (double) MaxGCPauseMillis; 6.18 6.19 // <NEW PREDICTION> 6.20 6.21 @@ -249,12 +249,12 @@ 6.22 6.23 // </NEW PREDICTION> 6.24 6.25 - double time_slice = (double) G1TimeSliceMS / 1000.0; 6.26 - double max_gc_time = (double) G1MaxPauseTimeMS / 1000.0; 6.27 + double time_slice = (double) GCPauseIntervalMillis / 1000.0; 6.28 + double max_gc_time = (double) MaxGCPauseMillis / 1000.0; 6.29 guarantee(max_gc_time < time_slice, 6.30 "Max GC time should not be greater than the time slice"); 6.31 _mmu_tracker = new G1MMUTrackerQueue(time_slice, max_gc_time); 6.32 - _sigma = (double) G1ConfidencePerc / 100.0; 6.33 + _sigma = (double) G1ConfidencePercent / 100.0; 6.34 6.35 // start conservatively (around 50ms is about right) 6.36 _concurrent_mark_init_times_ms->add(0.05); 6.37 @@ -262,7 +262,7 @@ 6.38 _concurrent_mark_cleanup_times_ms->add(0.20); 6.39 _tenuring_threshold = MaxTenuringThreshold; 6.40 6.41 - if (G1UseSurvivorSpace) { 6.42 + if (G1UseSurvivorSpaces) { 6.43 // if G1FixedSurvivorSpaceSize is 0 which means the size is not 6.44 // fixed, then _max_survivor_regions will be calculated at 6.45 // calculate_young_list_target_config during initialization 6.46 @@ -451,7 +451,7 @@ 6.47 guarantee( adaptive_young_list_length(), "pre-condition" ); 6.48 6.49 double start_time_sec = os::elapsedTime(); 6.50 - size_t min_reserve_perc = MAX2((size_t)2, (size_t)G1MinReservePerc); 6.51 + size_t min_reserve_perc = MAX2((size_t)2, (size_t)G1MinReservePercent); 6.52 min_reserve_perc = MIN2((size_t) 50, min_reserve_perc); 6.53 size_t reserve_regions = 6.54 (size_t) ((double) min_reserve_perc * (double) _g1->n_regions() / 100.0); 6.55 @@ -1109,7 +1109,7 @@ 6.56 _short_lived_surv_rate_group->record_scan_only_prefix(short_lived_so_length); 6.57 tag_scan_only(short_lived_so_length); 6.58 6.59 - if (G1UseSurvivorSpace) { 6.60 + if (G1UseSurvivorSpaces) { 6.61 _survivors_age_table.clear(); 6.62 } 6.63 6.64 @@ -1826,11 +1826,11 @@ 6.65 _rs_lengths_seq->add((double) _max_rs_lengths); 6.66 6.67 double expensive_region_limit_ms = 6.68 - (double) G1MaxPauseTimeMS - predict_constant_other_time_ms(); 6.69 + (double) MaxGCPauseMillis - predict_constant_other_time_ms(); 6.70 if (expensive_region_limit_ms < 0.0) { 6.71 // this means that the other time was predicted to be longer than 6.72 // than the max pause time 6.73 - expensive_region_limit_ms = (double) G1MaxPauseTimeMS; 6.74 + expensive_region_limit_ms = (double) MaxGCPauseMillis; 6.75 } 6.76 _expensive_region_limit_ms = expensive_region_limit_ms; 6.77 6.78 @@ -2093,24 +2093,24 @@ 6.79 } 6.80 6.81 double G1CollectorPolicy::recent_avg_time_for_pauses_ms() { 6.82 - if (_recent_pause_times_ms->num() == 0) return (double) G1MaxPauseTimeMS; 6.83 + if (_recent_pause_times_ms->num() == 0) return (double) MaxGCPauseMillis; 6.84 else return _recent_pause_times_ms->avg(); 6.85 } 6.86 6.87 double G1CollectorPolicy::recent_avg_time_for_CH_strong_ms() { 6.88 if (_recent_CH_strong_roots_times_ms->num() == 0) 6.89 - return (double)G1MaxPauseTimeMS/3.0; 6.90 + return (double)MaxGCPauseMillis/3.0; 6.91 else return _recent_CH_strong_roots_times_ms->avg(); 6.92 } 6.93 6.94 double G1CollectorPolicy::recent_avg_time_for_G1_strong_ms() { 6.95 if (_recent_G1_strong_roots_times_ms->num() == 0) 6.96 - return (double)G1MaxPauseTimeMS/3.0; 6.97 + return (double)MaxGCPauseMillis/3.0; 6.98 else return _recent_G1_strong_roots_times_ms->avg(); 6.99 } 6.100 6.101 double G1CollectorPolicy::recent_avg_time_for_evac_ms() { 6.102 - if (_recent_evac_times_ms->num() == 0) return (double)G1MaxPauseTimeMS/3.0; 6.103 + if (_recent_evac_times_ms->num() == 0) return (double)MaxGCPauseMillis/3.0; 6.104 else return _recent_evac_times_ms->avg(); 6.105 } 6.106 6.107 @@ -2197,17 +2197,18 @@ 6.108 } 6.109 6.110 size_t G1CollectorPolicy::expansion_amount() { 6.111 - if ((int)(recent_avg_pause_time_ratio() * 100.0) > G1GCPct) { 6.112 - // We will double the existing space, or take G1ExpandByPctOfAvail % of 6.113 - // the available expansion space, whichever is smaller, bounded below 6.114 - // by a minimum expansion (unless that's all that's left.) 6.115 + if ((int)(recent_avg_pause_time_ratio() * 100.0) > G1GCPercent) { 6.116 + // We will double the existing space, or take 6.117 + // G1ExpandByPercentOfAvailable % of the available expansion 6.118 + // space, whichever is smaller, bounded below by a minimum 6.119 + // expansion (unless that's all that's left.) 6.120 const size_t min_expand_bytes = 1*M; 6.121 size_t reserved_bytes = _g1->g1_reserved_obj_bytes(); 6.122 size_t committed_bytes = _g1->capacity(); 6.123 size_t uncommitted_bytes = reserved_bytes - committed_bytes; 6.124 size_t expand_bytes; 6.125 size_t expand_bytes_via_pct = 6.126 - uncommitted_bytes * G1ExpandByPctOfAvail / 100; 6.127 + uncommitted_bytes * G1ExpandByPercentOfAvailable / 100; 6.128 expand_bytes = MIN2(expand_bytes_via_pct, committed_bytes); 6.129 expand_bytes = MAX2(expand_bytes, min_expand_bytes); 6.130 expand_bytes = MIN2(expand_bytes, uncommitted_bytes); 6.131 @@ -2591,7 +2592,7 @@ 6.132 // Calculates survivor space parameters. 6.133 void G1CollectorPolicy::calculate_survivors_policy() 6.134 { 6.135 - if (!G1UseSurvivorSpace) { 6.136 + if (!G1UseSurvivorSpaces) { 6.137 return; 6.138 } 6.139 if (G1FixedSurvivorSpaceSize == 0) { 6.140 @@ -2851,7 +2852,7 @@ 6.141 // estimate of the number of live bytes. 6.142 void G1CollectorPolicy:: 6.143 add_to_collection_set(HeapRegion* hr) { 6.144 - if (G1TraceRegions) { 6.145 + if (G1PrintRegions) { 6.146 gclog_or_tty->print_cr("added region to cset %d:["PTR_FORMAT", "PTR_FORMAT"], " 6.147 "top "PTR_FORMAT", young %s", 6.148 hr->hrs_index(), hr->bottom(), hr->end(),
7.1 --- a/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp Thu May 07 11:44:53 2009 -0400 7.2 +++ b/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp Thu May 07 13:54:48 2009 -0700 7.3 @@ -57,7 +57,7 @@ 7.4 7.5 mark_sweep_phase1(marked_for_unloading, clear_all_softrefs); 7.6 7.7 - if (G1VerifyConcMark) { 7.8 + if (VerifyDuringGC) { 7.9 G1CollectedHeap* g1h = G1CollectedHeap::heap(); 7.10 g1h->checkConcurrentMark(); 7.11 }
8.1 --- a/src/share/vm/gc_implementation/g1/g1RemSet.cpp Thu May 07 11:44:53 2009 -0400 8.2 +++ b/src/share/vm/gc_implementation/g1/g1RemSet.cpp Thu May 07 13:54:48 2009 -0700 8.3 @@ -523,7 +523,7 @@ 8.4 // and they are causing failures. When we resolve said race 8.5 // conditions, we'll revert back to parallel remembered set 8.6 // updating and scanning. See CRs 6677707 and 6677708. 8.7 - if (G1EnableParallelRSetUpdating || (worker_i == 0)) { 8.8 + if (G1ParallelRSetUpdatingEnabled || (worker_i == 0)) { 8.9 updateRS(worker_i); 8.10 scanNewRefsRS(oc, worker_i); 8.11 } else { 8.12 @@ -532,7 +532,7 @@ 8.13 _g1p->record_update_rs_time(worker_i, 0.0); 8.14 _g1p->record_scan_new_refs_time(worker_i, 0.0); 8.15 } 8.16 - if (G1EnableParallelRSetScanning || (worker_i == 0)) { 8.17 + if (G1ParallelRSetScanningEnabled || (worker_i == 0)) { 8.18 scanRS(oc, worker_i); 8.19 } else { 8.20 _g1p->record_scan_rs_start_time(worker_i, os::elapsedTime());
9.1 --- a/src/share/vm/gc_implementation/g1/g1_globals.hpp Thu May 07 11:44:53 2009 -0400 9.2 +++ b/src/share/vm/gc_implementation/g1/g1_globals.hpp Thu May 07 13:54:48 2009 -0700 9.3 @@ -28,46 +28,34 @@ 9.4 9.5 #define G1_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct, manageable, product_rw) \ 9.6 \ 9.7 - product(intx, ParallelGCG1AllocBufferSize, 8*K, \ 9.8 + product(intx, G1ParallelGCAllocBufferSize, 8*K, \ 9.9 "Size of parallel G1 allocation buffers in to-space.") \ 9.10 \ 9.11 - product(intx, G1TimeSliceMS, 500, \ 9.12 - "Time slice for MMU specification") \ 9.13 - \ 9.14 - product(intx, G1MaxPauseTimeMS, 200, \ 9.15 - "Max GC time per MMU time slice") \ 9.16 - \ 9.17 - product(intx, G1ConfidencePerc, 50, \ 9.18 + product(intx, G1ConfidencePercent, 50, \ 9.19 "Confidence level for MMU/pause predictions") \ 9.20 \ 9.21 - product(intx, G1MarkingOverheadPerc, 0, \ 9.22 + develop(intx, G1MarkingOverheadPercent, 0, \ 9.23 "Overhead of concurrent marking") \ 9.24 \ 9.25 - product(bool, G1AccountConcurrentOverhead, false, \ 9.26 + develop(bool, G1AccountConcurrentOverhead, false, \ 9.27 "Whether soft real-time compliance in G1 will take into account" \ 9.28 "concurrent overhead") \ 9.29 \ 9.30 product(intx, G1YoungGenSize, 0, \ 9.31 "Size of the G1 young generation, 0 is the adaptive policy") \ 9.32 \ 9.33 - product(bool, G1Gen, true, \ 9.34 + develop(bool, G1Gen, true, \ 9.35 "If true, it will enable the generational G1") \ 9.36 \ 9.37 - develop(intx, G1GCPct, 10, \ 9.38 + develop(intx, G1GCPercent, 10, \ 9.39 "The desired percent time spent on GC") \ 9.40 \ 9.41 - product(intx, G1PolicyVerbose, 0, \ 9.42 + develop(intx, G1PolicyVerbose, 0, \ 9.43 "The verbosity level on G1 policy decisions") \ 9.44 \ 9.45 develop(bool, G1UseHRIntoRS, true, \ 9.46 "Determines whether the 'advanced' HR Into rem set is used.") \ 9.47 \ 9.48 - product(bool, G1VerifyRemSet, false, \ 9.49 - "If true, verify the rem set functioning at each GC") \ 9.50 - \ 9.51 - product(bool, G1VerifyConcMark, false, \ 9.52 - "If true, verify the conc marking code at full GC time") \ 9.53 - \ 9.54 develop(intx, G1MarkingVerboseLevel, 0, \ 9.55 "Level (0-4) of verboseness of the marking code") \ 9.56 \ 9.57 @@ -77,38 +65,28 @@ 9.58 develop(bool, G1TraceMarkStackOverflow, false, \ 9.59 "If true, extra debugging code for CM restart for ovflw.") \ 9.60 \ 9.61 - product(bool, G1VerifyMarkingInEvac, false, \ 9.62 - "If true, verify marking info during evacuation") \ 9.63 - \ 9.64 develop(intx, G1PausesBtwnConcMark, -1, \ 9.65 "If positive, fixed number of pauses between conc markings") \ 9.66 \ 9.67 - product(intx, G1EfficiencyPctCausesMark, 80, \ 9.68 - "The cum gc efficiency since mark fall-off that causes " \ 9.69 - "new marking") \ 9.70 - \ 9.71 - product(bool, TraceConcurrentMark, false, \ 9.72 - "Trace concurrent mark") \ 9.73 - \ 9.74 - product(bool, SummarizeG1ConcMark, false, \ 9.75 + diagnostic(bool, G1SummarizeConcurrentMark, false, \ 9.76 "Summarize concurrent mark info") \ 9.77 \ 9.78 - product(bool, SummarizeG1RSStats, false, \ 9.79 + diagnostic(bool, G1SummarizeRSetStats, false, \ 9.80 "Summarize remembered set processing info") \ 9.81 \ 9.82 - product(bool, SummarizeG1ZFStats, false, \ 9.83 + diagnostic(bool, G1SummarizeZFStats, false, \ 9.84 "Summarize zero-filling info") \ 9.85 \ 9.86 - product(bool, TraceG1Refine, false, \ 9.87 + develop(bool, G1TraceConcurrentRefinement, false, \ 9.88 "Trace G1 concurrent refinement") \ 9.89 \ 9.90 develop(bool, G1ConcMark, true, \ 9.91 "If true, run concurrent marking for G1") \ 9.92 \ 9.93 - product(intx, G1CMStackSize, 2 * 1024 * 1024, \ 9.94 + product(intx, G1MarkStackSize, 2 * 1024 * 1024, \ 9.95 "Size of the mark stack for concurrent marking.") \ 9.96 \ 9.97 - product(intx, G1CMRegionStackSize, 1024 * 1024, \ 9.98 + product(intx, G1MarkRegionStackSize, 1024 * 1024, \ 9.99 "Size of the region stack for concurrent marking.") \ 9.100 \ 9.101 develop(bool, G1ConcRefine, true, \ 9.102 @@ -121,7 +99,7 @@ 9.103 "Number of heap regions of alloc ahead of starting collection " \ 9.104 "pause to start concurrent refinement (initially)") \ 9.105 \ 9.106 - product(bool, G1SmoothConcRefine, true, \ 9.107 + develop(bool, G1SmoothConcRefine, true, \ 9.108 "Attempts to smooth out the overhead of concurrent refinement") \ 9.109 \ 9.110 develop(bool, G1ConcZeroFill, true, \ 9.111 @@ -157,7 +135,7 @@ 9.112 develop(bool, G1SATBPrintStubs, false, \ 9.113 "If true, print generated stubs for the SATB barrier") \ 9.114 \ 9.115 - product(intx, G1ExpandByPctOfAvail, 20, \ 9.116 + product(intx, G1ExpandByPercentOfAvailable, 20, \ 9.117 "When expanding, % of uncommitted space to claim.") \ 9.118 \ 9.119 develop(bool, G1RSBarrierRegionFilter, true, \ 9.120 @@ -179,18 +157,9 @@ 9.121 "If true, verify that no dirty cards remain after RS log " \ 9.122 "processing.") \ 9.123 \ 9.124 - product(intx, G1MinPausesBetweenMarks, 2, \ 9.125 - "Number of inefficient pauses necessary to trigger marking.") \ 9.126 - \ 9.127 - product(intx, G1InefficientPausePct, 80, \ 9.128 - "Threshold of an 'inefficient' pauses (as % of cum efficiency.") \ 9.129 - \ 9.130 develop(bool, G1RSCountHisto, false, \ 9.131 "If true, print a histogram of RS occupancies after each pause") \ 9.132 \ 9.133 - product(bool, G1TraceFileOverwrite, false, \ 9.134 - "Allow the trace file to be overwritten") \ 9.135 - \ 9.136 develop(intx, G1PrintRegionLivenessInfo, 0, \ 9.137 "When > 0, print the occupancies of the <n> best and worst" \ 9.138 "regions.") \ 9.139 @@ -198,9 +167,6 @@ 9.140 develop(bool, G1PrintParCleanupStats, false, \ 9.141 "When true, print extra stats about parallel cleanup.") \ 9.142 \ 9.143 - product(bool, G1DoAgeCohortChecks, false, \ 9.144 - "When true, check well-formedness of age cohort structures.") \ 9.145 - \ 9.146 develop(bool, G1DisablePreBarrier, false, \ 9.147 "Disable generation of pre-barrier (i.e., marking barrier) ") \ 9.148 \ 9.149 @@ -214,17 +180,17 @@ 9.150 develop(intx, G1ConcRSLogCacheSize, 10, \ 9.151 "Log base 2 of the length of conc RS hot-card cache.") \ 9.152 \ 9.153 - product(bool, G1ConcRSCountTraversals, false, \ 9.154 + develop(bool, G1ConcRSCountTraversals, false, \ 9.155 "If true, gather data about the number of times CR traverses " \ 9.156 "cards ") \ 9.157 \ 9.158 - product(intx, G1ConcRSHotCardLimit, 4, \ 9.159 + develop(intx, G1ConcRSHotCardLimit, 4, \ 9.160 "The threshold that defines (>=) a hot card.") \ 9.161 \ 9.162 develop(bool, G1PrintOopAppls, false, \ 9.163 "When true, print applications of closures to external locs.") \ 9.164 \ 9.165 - product(intx, G1LogRSRegionEntries, 7, \ 9.166 + develop(intx, G1LogRSRegionEntries, 7, \ 9.167 "Log_2 of max number of regions for which we keep bitmaps.") \ 9.168 \ 9.169 develop(bool, G1RecordHRRSOops, false, \ 9.170 @@ -254,11 +220,11 @@ 9.171 "It determines whether the system will calculate an optimum " \ 9.172 "scan-only set.") \ 9.173 \ 9.174 - product(intx, G1MinReservePerc, 10, \ 9.175 + product(intx, G1MinReservePercent, 10, \ 9.176 "It determines the minimum reserve we should have in the heap " \ 9.177 "to minimize the probability of promotion failure.") \ 9.178 \ 9.179 - product(bool, G1TraceRegions, false, \ 9.180 + diagnostic(bool, G1PrintRegions, false, \ 9.181 "If set G1 will print information on which regions are being " \ 9.182 "allocated and which are reclaimed.") \ 9.183 \ 9.184 @@ -268,24 +234,24 @@ 9.185 develop(bool, G1HRRSFlushLogBuffersOnVerify, false, \ 9.186 "Forces flushing of log buffers before verification.") \ 9.187 \ 9.188 - product(bool, G1UseSurvivorSpace, true, \ 9.189 + product(bool, G1UseSurvivorSpaces, true, \ 9.190 "When true, use survivor space.") \ 9.191 \ 9.192 - product(bool, G1FixedTenuringThreshold, false, \ 9.193 + develop(bool, G1FixedTenuringThreshold, false, \ 9.194 "When set, G1 will not adjust the tenuring threshold") \ 9.195 \ 9.196 - product(bool, G1FixedEdenSize, false, \ 9.197 + develop(bool, G1FixedEdenSize, false, \ 9.198 "When set, G1 will not allocate unused survivor space regions") \ 9.199 \ 9.200 - product(uintx, G1FixedSurvivorSpaceSize, 0, \ 9.201 + develop(uintx, G1FixedSurvivorSpaceSize, 0, \ 9.202 "If non-0 is the size of the G1 survivor space, " \ 9.203 "otherwise SurvivorRatio is used to determine the size") \ 9.204 \ 9.205 - experimental(bool, G1EnableParallelRSetUpdating, false, \ 9.206 + experimental(bool, G1ParallelRSetUpdatingEnabled, false, \ 9.207 "Enables the parallelization of remembered set updating " \ 9.208 "during evacuation pauses") \ 9.209 \ 9.210 - experimental(bool, G1EnableParallelRSetScanning, false, \ 9.211 + experimental(bool, G1ParallelRSetScanningEnabled, false, \ 9.212 "Enables the parallelization of remembered set scanning " \ 9.213 "during evacuation pauses") 9.214
10.1 --- a/src/share/vm/gc_implementation/g1/heapRegion.cpp Thu May 07 11:44:53 2009 -0400 10.2 +++ b/src/share/vm/gc_implementation/g1/heapRegion.cpp Thu May 07 13:54:48 2009 -0700 10.3 @@ -160,12 +160,6 @@ 10.4 if (!g1h->is_obj_dead(cur_oop, hr)) { 10.5 // Bottom lies entirely below top, so we can call the 10.6 // non-memRegion version of oop_iterate below. 10.7 -#ifndef PRODUCT 10.8 - if (G1VerifyMarkingInEvac) { 10.9 - VerifyLiveClosure vl_cl(g1h); 10.10 - cur_oop->oop_iterate(&vl_cl); 10.11 - } 10.12 -#endif 10.13 cur_oop->oop_iterate(cl); 10.14 } 10.15 cur = next_obj; 10.16 @@ -197,12 +191,6 @@ 10.17 // or it was allocated after marking finished, then we add it. Otherwise 10.18 // we can safely ignore the object. 10.19 if (!g1h->is_obj_dead(oop(bottom), _hr)) { 10.20 -#ifndef PRODUCT 10.21 - if (G1VerifyMarkingInEvac) { 10.22 - VerifyLiveClosure vl_cl(g1h); 10.23 - oop(bottom)->oop_iterate(&vl_cl, mr); 10.24 - } 10.25 -#endif 10.26 oop_size = oop(bottom)->oop_iterate(cl2, mr); 10.27 } else { 10.28 oop_size = oop(bottom)->size(); 10.29 @@ -232,12 +220,6 @@ 10.30 10.31 // Last object. Need to do dead-obj filtering here too. 10.32 if (!g1h->is_obj_dead(oop(bottom), _hr)) { 10.33 -#ifndef PRODUCT 10.34 - if (G1VerifyMarkingInEvac) { 10.35 - VerifyLiveClosure vl_cl(g1h); 10.36 - oop(bottom)->oop_iterate(&vl_cl, mr); 10.37 - } 10.38 -#endif 10.39 oop(bottom)->oop_iterate(cl2, mr); 10.40 } 10.41 } 10.42 @@ -713,7 +695,7 @@ 10.43 G1CollectedHeap::heap()->print(); 10.44 gclog_or_tty->print_cr(""); 10.45 } 10.46 - if (G1VerifyConcMark && 10.47 + if (VerifyDuringGC && 10.48 G1VerifyConcMarkPrintReachable && 10.49 vl_cl.failures()) { 10.50 g1->concurrent_mark()->print_prev_bitmap_reachable();
11.1 --- a/src/share/vm/runtime/arguments.cpp Thu May 07 11:44:53 2009 -0400 11.2 +++ b/src/share/vm/runtime/arguments.cpp Thu May 07 13:54:48 2009 -0700 11.3 @@ -1288,10 +1288,14 @@ 11.4 Abstract_VM_Version::parallel_worker_threads()); 11.5 if (ParallelGCThreads == 0) { 11.6 FLAG_SET_DEFAULT(ParallelGCThreads, 11.7 - Abstract_VM_Version::parallel_worker_threads 11.8 -()); 11.9 + Abstract_VM_Version::parallel_worker_threads()); 11.10 } 11.11 no_shared_spaces(); 11.12 + 11.13 + // Set the maximum pause time goal to be a reasonable default. 11.14 + if (FLAG_IS_DEFAULT(MaxGCPauseMillis)) { 11.15 + FLAG_SET_DEFAULT(MaxGCPauseMillis, 200); 11.16 + } 11.17 } 11.18 11.19 void Arguments::set_server_heap_size() {
12.1 --- a/src/share/vm/runtime/globals.hpp Thu May 07 11:44:53 2009 -0400 12.2 +++ b/src/share/vm/runtime/globals.hpp Thu May 07 13:54:48 2009 -0700 12.3 @@ -1819,7 +1819,11 @@ 12.4 "Decay factor to TenuredGenerationSizeIncrement") \ 12.5 \ 12.6 product(uintx, MaxGCPauseMillis, max_uintx, \ 12.7 - "Adaptive size policy maximum GC pause time goal in msec") \ 12.8 + "Adaptive size policy maximum GC pause time goal in msec, " \ 12.9 + "or (G1 Only) the max. GC time per MMU time slice") \ 12.10 + \ 12.11 + product(intx, GCPauseIntervalMillis, 500, \ 12.12 + "Time slice for MMU specification") \ 12.13 \ 12.14 product(uintx, MaxGCMinorPauseMillis, max_uintx, \ 12.15 "Adaptive size policy maximum GC minor pause time goal in msec") \