--- old/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp 2015-02-17 09:48:39.699464639 +0100 +++ new/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp 2015-02-17 09:48:39.637462838 +0100 @@ -86,6 +86,8 @@ G1CollectorPolicy::G1CollectorPolicy() : _parallel_gc_threads(ParallelGCThreads), + _phase_times(NULL), + _recent_gc_times_ms(new TruncatedSeq(NumPrevPausesForHeuristics)), _stop_world_start(0.0), @@ -208,8 +210,6 @@ _recent_prev_end_times_for_all_gcs_sec->add(os::elapsedTime()); _prev_collection_pause_end_ms = os::elapsedTime() * 1000.0; - _phase_times = new G1GCPhaseTimes(_parallel_gc_threads); - int index = MIN2(_parallel_gc_threads - 1, 7); _rs_length_diff_seq->add(rs_length_diff_defaults[index]); @@ -435,6 +435,7 @@ } void G1CollectorPolicy::init() { + _phase_times = new G1GCPhaseTimes(_parallel_gc_threads, G1Log::finest() ? G1CollectedHeap::num_ext_root_tasks() : 0); // Set aside an initial future to_space. _g1 = G1CollectedHeap::heap();