src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Thu Jul 19 10:34:06 2012
--- new/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Thu Jul 19 10:34:06 2012

*** 795,805 **** --- 795,805 ---- double s_w_t_ms = (start_time_sec - _stop_world_start) * 1000.0; _trace_gen0_time_data.record_start_collection(s_w_t_ms); _stop_world_start = 0.0; ! phase_times()->_cur_collection_start_sec = start_time_sec; ! phase_times()->record_cur_collection_start_sec(start_time_sec); _cur_collection_pause_used_at_start_bytes = start_used; _cur_collection_pause_used_regions_at_start = _g1->used_regions(); _pending_cards = _g1->pending_card_num(); _max_pending_cards = _g1->max_pending_card_num();
*** 948,958 **** --- 948,958 ---- if (update_stats) { _trace_gen0_time_data.record_end_collection(pause_time_ms, phase_times()); // this is where we update the allocation rate of the application double app_time_ms = ! (phase_times()->_cur_collection_start_sec * 1000.0 - _prev_collection_pause_end_ms); ! (phase_times()->cur_collection_start_sec() * 1000.0 - _prev_collection_pause_end_ms); if (app_time_ms < MIN_TIMER_GRANULARITY) { // This usually happens due to the timer not having the required // granularity. Some Linuxes are the usual culprits. // We'll just set it to something (arbitrarily) small. app_time_ms = 1.0;
*** 1042,1060 **** --- 1042,1060 ---- } _pending_card_diff_seq->add((double) diff); double cost_per_card_ms = 0.0; if (_pending_cards > 0) { ! cost_per_card_ms = phase_times()->average_last_update_rs_time() / (double) _pending_cards; _cost_per_card_ms_seq->add(cost_per_card_ms); } size_t cards_scanned = _g1->cards_scanned(); double cost_per_entry_ms = 0.0; if (cards_scanned > 10) { ! cost_per_entry_ms = phase_times()->average_last_scan_rs_time() / (double) cards_scanned; if (_last_gc_was_young) { _cost_per_entry_ms_seq->add(cost_per_entry_ms); } else { _mixed_cost_per_entry_ms_seq->add(cost_per_entry_ms); }
*** 1090,1123 **** --- 1090,1124 ---- _rs_length_diff_seq->add((double) rs_length_diff); size_t copied_bytes = surviving_bytes; double cost_per_byte_ms = 0.0; if (copied_bytes > 0) { ! cost_per_byte_ms = phase_times()->average_last_obj_copy_time() / (double) copied_bytes; if (_in_marking_window) { _cost_per_byte_ms_during_cm_seq->add(cost_per_byte_ms); } else { _cost_per_byte_ms_seq->add(cost_per_byte_ms); } } double all_other_time_ms = pause_time_ms - ! (phase_times()->_update_rs_time + phase_times()->_scan_rs_time + phase_times()->_obj_copy_time + phase_times()->_termination_time); ! (phase_times()->average_last_update_rs_time() + phase_times()->average_last_scan_rs_time() + + phase_times()->average_last_obj_copy_time() + phase_times()->average_last_termination_time()); double young_other_time_ms = 0.0; if (young_cset_region_length() > 0) { young_other_time_ms = ! phase_times()->_recorded_young_cset_choice_time_ms + ! phase_times()->_recorded_young_free_cset_time_ms; ! phase_times()->young_cset_choice_time_ms() + ! phase_times()->young_free_cset_time_ms(); _young_other_cost_per_region_ms_seq->add(young_other_time_ms / (double) young_cset_region_length()); } double non_young_other_time_ms = 0.0; if (old_cset_region_length() > 0) { non_young_other_time_ms = ! phase_times()->_recorded_non_young_cset_choice_time_ms + ! phase_times()->_recorded_non_young_free_cset_time_ms; ! phase_times()->non_young_cset_choice_time_ms() + ! phase_times()->non_young_free_cset_time_ms(); _non_young_other_cost_per_region_ms_seq->add(non_young_other_time_ms / (double) old_cset_region_length()); }
*** 1140,1150 **** --- 1141,1152 ---- _free_regions_at_end_of_collection = _g1->free_regions(); update_young_list_target_length(); // Note that _mmu_tracker->max_gc_time() returns the time in seconds. double update_rs_time_goal_ms = _mmu_tracker->max_gc_time() * MILLIUNITS * G1RSetUpdatingPauseTimePercent / 100.0; ! adjust_concurrent_refinement(phase_times()->_update_rs_time, phase_times()->_update_rs_processed_buffers, update_rs_time_goal_ms); ! adjust_concurrent_refinement(phase_times()->average_last_update_rs_time(), + phase_times()->sum_last_update_rs_processed_buffers(), update_rs_time_goal_ms); _collectionSetChooser->verify(); } #define EXT_SIZE_FORMAT "%.1f%s"
*** 1949,1960 **** --- 1951,1961 ---- // The number of recorded young regions is the incremental // collection set's current size set_recorded_rs_lengths(_inc_cset_recorded_rs_lengths); double young_end_time_sec = os::elapsedTime(); ! phase_times()->_recorded_young_cset_choice_time_ms = (young_end_time_sec - young_start_time_sec) * 1000.0; ! phase_times()->record_young_cset_choice_time_ms((young_end_time_sec - young_start_time_sec) * 1000.0); // We are doing young collections so reset this. non_young_start_time_sec = young_end_time_sec; if (!gcs_are_young()) {
*** 2065,2076 **** --- 2066,2076 ---- eden_region_length, survivor_region_length, old_cset_region_length(), predicted_pause_time_ms, target_pause_time_ms); double non_young_end_time_sec = os::elapsedTime(); ! phase_times()->_recorded_non_young_cset_choice_time_ms = (non_young_end_time_sec - non_young_start_time_sec) * 1000.0; ! phase_times()->record_non_young_cset_choice_time_ms((non_young_end_time_sec - non_young_start_time_sec) * 1000.0); } void TraceGen0TimeData::record_start_collection(double time_to_stop_the_world_ms) { if(TraceGen0Time) { _all_stop_world_times_ms.add(time_to_stop_the_world_ms);
*** 2085,2113 **** --- 2085,2113 ---- void TraceGen0TimeData::record_end_collection(double pause_time_ms, G1GCPhaseTimes* phase_times) { if(TraceGen0Time) { _total.add(pause_time_ms); _other.add(pause_time_ms - phase_times->accounted_time_ms()); ! _root_region_scan_wait.add(phase_times->_root_region_scan_wait_time_ms); ! _parallel.add(phase_times->_cur_collection_par_time_ms); ! _ext_root_scan.add(phase_times->_ext_root_scan_time); ! _satb_filtering.add(phase_times->_satb_filtering_time); ! _update_rs.add(phase_times->_update_rs_time); ! _scan_rs.add(phase_times->_scan_rs_time); ! _obj_copy.add(phase_times->_obj_copy_time); ! _termination.add(phase_times->_termination_time); ! double parallel_known_time = phase_times->_ext_root_scan_time + ! phase_times->_satb_filtering_time + ! phase_times->_update_rs_time + ! phase_times->_scan_rs_time + ! phase_times->_obj_copy_time + ! + phase_times->_termination_time; ! _root_region_scan_wait.add(phase_times->root_region_scan_wait_time_ms()); ! _parallel.add(phase_times->cur_collection_par_time_ms()); ! _ext_root_scan.add(phase_times->average_last_ext_root_scan_time()); ! _satb_filtering.add(phase_times->sum_last_satb_filtering_times_ms()); ! _update_rs.add(phase_times->average_last_update_rs_time()); ! _scan_rs.add(phase_times->average_last_scan_rs_time()); ! _obj_copy.add(phase_times->average_last_obj_copy_time()); ! _termination.add(phase_times->average_last_termination_time()); + ! double parallel_known_time = phase_times->average_last_ext_root_scan_time() + ! phase_times->sum_last_satb_filtering_times_ms() + ! phase_times->average_last_update_rs_time() + ! phase_times->average_last_scan_rs_time() + ! phase_times->average_last_obj_copy_time() + ! + phase_times->average_last_termination_time(); ! double parallel_other_time = phase_times->_cur_collection_par_time_ms - parallel_known_time; ! double parallel_other_time = phase_times->cur_collection_par_time_ms() - parallel_known_time; _parallel_other.add(parallel_other_time); ! _clear_ct.add(phase_times->_cur_clear_ct_time_ms); ! _clear_ct.add(phase_times->cur_clear_ct_time_ms()); } } void TraceGen0TimeData::increment_young_collection_count() { if(TraceGen0Time) {

src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File