Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 936:e1fdf4fd34dc
6871111: G1: remove the concurrent overhead tracker
Summary: Removing the concurrent overhead tracker from G1, along with the GC overhead reporter and the G1AccountConcurrentOverhead (both of which rely on the the concurrent overhead tracker).
Reviewed-by: iveresov, johnc
author | tonyp |
---|---|
date | Wed, 19 Aug 2009 12:53:25 -0400 |
parents | 6cb8e9df7174 |
children | 2c79770d1f6e |
comparison
equal
deleted
inserted
replaced
912:308762b2bf14 | 936:e1fdf4fd34dc |
---|---|
991 // since last pause. | 991 // since last pause. |
992 double end_sec = os::elapsedTime(); | 992 double end_sec = os::elapsedTime(); |
993 double full_gc_time_sec = end_sec - _cur_collection_start_sec; | 993 double full_gc_time_sec = end_sec - _cur_collection_start_sec; |
994 double full_gc_time_ms = full_gc_time_sec * 1000.0; | 994 double full_gc_time_ms = full_gc_time_sec * 1000.0; |
995 | 995 |
996 checkpoint_conc_overhead(); | |
997 | |
998 _all_full_gc_times_ms->add(full_gc_time_ms); | 996 _all_full_gc_times_ms->add(full_gc_time_ms); |
999 | 997 |
1000 update_recent_gc_times(end_sec, full_gc_time_ms); | 998 update_recent_gc_times(end_sec, full_gc_time_ms); |
1001 | 999 |
1002 _g1->clear_full_collection(); | 1000 _g1->clear_full_collection(); |
1162 | 1160 |
1163 void G1CollectorPolicy::record_concurrent_mark_init_end() { | 1161 void G1CollectorPolicy::record_concurrent_mark_init_end() { |
1164 double end_time_sec = os::elapsedTime(); | 1162 double end_time_sec = os::elapsedTime(); |
1165 double elapsed_time_ms = (end_time_sec - _mark_init_start_sec) * 1000.0; | 1163 double elapsed_time_ms = (end_time_sec - _mark_init_start_sec) * 1000.0; |
1166 _concurrent_mark_init_times_ms->add(elapsed_time_ms); | 1164 _concurrent_mark_init_times_ms->add(elapsed_time_ms); |
1167 checkpoint_conc_overhead(); | |
1168 record_concurrent_mark_init_end_pre(elapsed_time_ms); | 1165 record_concurrent_mark_init_end_pre(elapsed_time_ms); |
1169 | 1166 |
1170 _mmu_tracker->add_pause(_mark_init_start_sec, end_time_sec, true); | 1167 _mmu_tracker->add_pause(_mark_init_start_sec, end_time_sec, true); |
1171 } | 1168 } |
1172 | 1169 |
1176 } | 1173 } |
1177 | 1174 |
1178 void G1CollectorPolicy::record_concurrent_mark_remark_end() { | 1175 void G1CollectorPolicy::record_concurrent_mark_remark_end() { |
1179 double end_time_sec = os::elapsedTime(); | 1176 double end_time_sec = os::elapsedTime(); |
1180 double elapsed_time_ms = (end_time_sec - _mark_remark_start_sec)*1000.0; | 1177 double elapsed_time_ms = (end_time_sec - _mark_remark_start_sec)*1000.0; |
1181 checkpoint_conc_overhead(); | |
1182 _concurrent_mark_remark_times_ms->add(elapsed_time_ms); | 1178 _concurrent_mark_remark_times_ms->add(elapsed_time_ms); |
1183 _cur_mark_stop_world_time_ms += elapsed_time_ms; | 1179 _cur_mark_stop_world_time_ms += elapsed_time_ms; |
1184 _prev_collection_pause_end_ms += elapsed_time_ms; | 1180 _prev_collection_pause_end_ms += elapsed_time_ms; |
1185 | 1181 |
1186 _mmu_tracker->add_pause(_mark_remark_start_sec, end_time_sec, true); | 1182 _mmu_tracker->add_pause(_mark_remark_start_sec, end_time_sec, true); |
1208 max_live_bytes/M, _g1->capacity()/M); | 1204 max_live_bytes/M, _g1->capacity()/M); |
1209 } | 1205 } |
1210 | 1206 |
1211 // The important thing about this is that it includes "os::elapsedTime". | 1207 // The important thing about this is that it includes "os::elapsedTime". |
1212 void G1CollectorPolicy::record_concurrent_mark_cleanup_end_work2() { | 1208 void G1CollectorPolicy::record_concurrent_mark_cleanup_end_work2() { |
1213 checkpoint_conc_overhead(); | |
1214 double end_time_sec = os::elapsedTime(); | 1209 double end_time_sec = os::elapsedTime(); |
1215 double elapsed_time_ms = (end_time_sec - _mark_cleanup_start_sec)*1000.0; | 1210 double elapsed_time_ms = (end_time_sec - _mark_cleanup_start_sec)*1000.0; |
1216 _concurrent_mark_cleanup_times_ms->add(elapsed_time_ms); | 1211 _concurrent_mark_cleanup_times_ms->add(elapsed_time_ms); |
1217 _cur_mark_stop_world_time_ms += elapsed_time_ms; | 1212 _cur_mark_stop_world_time_ms += elapsed_time_ms; |
1218 _prev_collection_pause_end_ms += elapsed_time_ms; | 1213 _prev_collection_pause_end_ms += elapsed_time_ms; |
1422 gclog_or_tty->print_cr(""); | 1417 gclog_or_tty->print_cr(""); |
1423 _short_lived_surv_rate_group->print(); | 1418 _short_lived_surv_rate_group->print(); |
1424 // do that for any other surv rate groups too | 1419 // do that for any other surv rate groups too |
1425 } | 1420 } |
1426 #endif // PRODUCT | 1421 #endif // PRODUCT |
1427 | |
1428 checkpoint_conc_overhead(); | |
1429 | 1422 |
1430 if (in_young_gc_mode()) { | 1423 if (in_young_gc_mode()) { |
1431 last_pause_included_initial_mark = _should_initiate_conc_mark; | 1424 last_pause_included_initial_mark = _should_initiate_conc_mark; |
1432 if (last_pause_included_initial_mark) | 1425 if (last_pause_included_initial_mark) |
1433 record_concurrent_mark_init_end_pre(0.0); | 1426 record_concurrent_mark_init_end_pre(0.0); |
2523 sprintf(buffer, "%7.2lfMB", mbs); | 2516 sprintf(buffer, "%7.2lfMB", mbs); |
2524 return buffer; | 2517 return buffer; |
2525 } | 2518 } |
2526 #endif // PRODUCT | 2519 #endif // PRODUCT |
2527 | 2520 |
2528 void | |
2529 G1CollectorPolicy::checkpoint_conc_overhead() { | |
2530 double conc_overhead = 0.0; | |
2531 if (G1AccountConcurrentOverhead) | |
2532 conc_overhead = COTracker::totalPredConcOverhead(); | |
2533 _mmu_tracker->update_conc_overhead(conc_overhead); | |
2534 #if 0 | |
2535 gclog_or_tty->print(" CO %1.4lf TARGET %1.4lf", | |
2536 conc_overhead, _mmu_tracker->max_gc_time()); | |
2537 #endif | |
2538 } | |
2539 | |
2540 | |
2541 size_t G1CollectorPolicy::max_regions(int purpose) { | 2521 size_t G1CollectorPolicy::max_regions(int purpose) { |
2542 switch (purpose) { | 2522 switch (purpose) { |
2543 case GCAllocForSurvived: | 2523 case GCAllocForSurvived: |
2544 return _max_survivor_regions; | 2524 return _max_survivor_regions; |
2545 case GCAllocForTenured: | 2525 case GCAllocForTenured: |