1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Fri May 07 13:14:41 2010 -0400 1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Thu Apr 22 15:20:16 2010 -0400 1.3 @@ -3972,6 +3972,10 @@ 1.4 1.5 void work(int i) { 1.6 if (i >= _n_workers) return; // no work needed this round 1.7 + 1.8 + double start_time_ms = os::elapsedTime() * 1000.0; 1.9 + _g1h->g1_policy()->record_gc_worker_start_time(i, start_time_ms); 1.10 + 1.11 ResourceMark rm; 1.12 HandleMark hm; 1.13 1.14 @@ -4019,7 +4023,7 @@ 1.15 double elapsed_ms = (os::elapsedTime()-start)*1000.0; 1.16 double term_ms = pss.term_time()*1000.0; 1.17 _g1h->g1_policy()->record_obj_copy_time(i, elapsed_ms-term_ms); 1.18 - _g1h->g1_policy()->record_termination_time(i, term_ms); 1.19 + _g1h->g1_policy()->record_termination(i, term_ms, pss.term_attempts()); 1.20 } 1.21 _g1h->g1_policy()->record_thread_age_table(pss.age_table()); 1.22 _g1h->update_surviving_young_words(pss.surviving_young_words()+1); 1.23 @@ -4043,7 +4047,8 @@ 1.24 double term = pss.term_time(); 1.25 gclog_or_tty->print(" Elapsed: %7.2f ms.\n" 1.26 " Strong roots: %7.2f ms (%6.2f%%)\n" 1.27 - " Termination: %7.2f ms (%6.2f%%) (in %d entries)\n", 1.28 + " Termination: %7.2f ms (%6.2f%%) " 1.29 + "(in "SIZE_FORMAT" entries)\n", 1.30 elapsed * 1000.0, 1.31 strong_roots * 1000.0, (strong_roots*100.0/elapsed), 1.32 term * 1000.0, (term*100.0/elapsed), 1.33 @@ -4059,6 +4064,8 @@ 1.34 1.35 assert(pss.refs_to_scan() == 0, "Task queue should be empty"); 1.36 assert(pss.overflowed_refs_to_scan() == 0, "Overflow queue should be empty"); 1.37 + double end_time_ms = os::elapsedTime() * 1000.0; 1.38 + _g1h->g1_policy()->record_gc_worker_end_time(i, end_time_ms); 1.39 } 1.40 }; 1.41