comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 5986:500023bd0818

7143511: G1: Another instance of high GC Worker Other time (50ms) Summary: Tiered compilation has increased the number of nmethods in the code cache. This has, in turn, significantly increased the number of marked nmethods processed during the StrongRootsScope destructor. Create a specialized version of CodeBlobToOopClosure for G1 which places only those nmethods that contain pointers into the collection set on to the marked nmethods list. Reviewed-by: iveresov, tonyp
author johnc
date Tue, 13 Mar 2012 11:05:32 -0700
parents 21595f05bc93
children 2a0172480595
comparison
equal deleted inserted replaced
5972:9a9bb0010c91 5986:500023bd0818
1259 other_time_ms -= _cur_collection_par_time_ms; 1259 other_time_ms -= _cur_collection_par_time_ms;
1260 } else { 1260 } else {
1261 other_time_ms -= known_time; 1261 other_time_ms -= known_time;
1262 } 1262 }
1263 1263
1264 // Now subtract the time taken to fix up roots in generated code
1265 other_time_ms -= _cur_collection_code_root_fixup_time_ms;
1266
1264 // Subtract the time taken to clean the card table from the 1267 // Subtract the time taken to clean the card table from the
1265 // current value of "other time" 1268 // current value of "other time"
1266 other_time_ms -= _cur_clear_ct_time_ms; 1269 other_time_ms -= _cur_clear_ct_time_ms;
1267 1270
1268 // Subtract the time spent completing marking in the collection 1271 // Subtract the time spent completing marking in the collection
1399 print_par_sizes(3, "Processed Buffers", _par_last_update_rs_processed_buffers); 1402 print_par_sizes(3, "Processed Buffers", _par_last_update_rs_processed_buffers);
1400 print_par_stats(2, "Scan RS", _par_last_scan_rs_times_ms); 1403 print_par_stats(2, "Scan RS", _par_last_scan_rs_times_ms);
1401 print_par_stats(2, "Object Copy", _par_last_obj_copy_times_ms); 1404 print_par_stats(2, "Object Copy", _par_last_obj_copy_times_ms);
1402 print_par_stats(2, "Termination", _par_last_termination_times_ms); 1405 print_par_stats(2, "Termination", _par_last_termination_times_ms);
1403 print_par_sizes(3, "Termination Attempts", _par_last_termination_attempts); 1406 print_par_sizes(3, "Termination Attempts", _par_last_termination_attempts);
1404 print_par_stats(2, "GC Worker End", _par_last_gc_worker_end_times_ms);
1405 1407
1406 for (int i = 0; i < _parallel_gc_threads; i++) { 1408 for (int i = 0; i < _parallel_gc_threads; i++) {
1407 _par_last_gc_worker_times_ms[i] = _par_last_gc_worker_end_times_ms[i] - _par_last_gc_worker_start_times_ms[i]; 1409 _par_last_gc_worker_times_ms[i] = _par_last_gc_worker_end_times_ms[i] -
1410 _par_last_gc_worker_start_times_ms[i];
1408 1411
1409 double worker_known_time = _par_last_ext_root_scan_times_ms[i] + 1412 double worker_known_time = _par_last_ext_root_scan_times_ms[i] +
1410 _par_last_satb_filtering_times_ms[i] + 1413 _par_last_satb_filtering_times_ms[i] +
1411 _par_last_update_rs_times_ms[i] + 1414 _par_last_update_rs_times_ms[i] +
1412 _par_last_scan_rs_times_ms[i] + 1415 _par_last_scan_rs_times_ms[i] +
1413 _par_last_obj_copy_times_ms[i] + 1416 _par_last_obj_copy_times_ms[i] +
1414 _par_last_termination_times_ms[i]; 1417 _par_last_termination_times_ms[i];
1415 1418
1416 _par_last_gc_worker_other_times_ms[i] = _cur_collection_par_time_ms - worker_known_time; 1419 _par_last_gc_worker_other_times_ms[i] = _par_last_gc_worker_times_ms[i] -
1420 worker_known_time;
1417 } 1421 }
1418 print_par_stats(2, "GC Worker", _par_last_gc_worker_times_ms); 1422
1419 print_par_stats(2, "GC Worker Other", _par_last_gc_worker_other_times_ms); 1423 print_par_stats(2, "GC Worker Other", _par_last_gc_worker_other_times_ms);
1424 print_par_stats(2, "GC Worker Total", _par_last_gc_worker_times_ms);
1425 print_par_stats(2, "GC Worker End", _par_last_gc_worker_end_times_ms);
1420 } else { 1426 } else {
1421 print_stats(1, "Ext Root Scanning", ext_root_scan_time); 1427 print_stats(1, "Ext Root Scanning", ext_root_scan_time);
1422 if (print_marking_info) { 1428 if (print_marking_info) {
1423 print_stats(1, "SATB Filtering", satb_filtering_time); 1429 print_stats(1, "SATB Filtering", satb_filtering_time);
1424 } 1430 }
1425 print_stats(1, "Update RS", update_rs_time); 1431 print_stats(1, "Update RS", update_rs_time);
1426 print_stats(2, "Processed Buffers", (int)update_rs_processed_buffers); 1432 print_stats(2, "Processed Buffers", (int)update_rs_processed_buffers);
1427 print_stats(1, "Scan RS", scan_rs_time); 1433 print_stats(1, "Scan RS", scan_rs_time);
1428 print_stats(1, "Object Copying", obj_copy_time); 1434 print_stats(1, "Object Copying", obj_copy_time);
1429 } 1435 }
1436 print_stats(1, "Code Root Fixup", _cur_collection_code_root_fixup_time_ms);
1430 if (print_marking_info) { 1437 if (print_marking_info) {
1431 print_stats(1, "Complete CSet Marking", _mark_closure_time_ms); 1438 print_stats(1, "Complete CSet Marking", _mark_closure_time_ms);
1432 } 1439 }
1433 print_stats(1, "Clear CT", _cur_clear_ct_time_ms); 1440 print_stats(1, "Clear CT", _cur_clear_ct_time_ms);
1434 #ifndef PRODUCT 1441 #ifndef PRODUCT