1.1 --- a/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp Mon Jul 02 10:54:17 2012 -0400 1.2 +++ b/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp Wed Jul 11 22:47:38 2012 +0200 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -27,6 +27,7 @@ 1.11 #include "gc_implementation/g1/concurrentG1RefineThread.hpp" 1.12 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" 1.13 #include "gc_implementation/g1/g1CollectorPolicy.hpp" 1.14 +#include "gc_implementation/g1/g1GCPhaseTimes.hpp" 1.15 #include "gc_implementation/g1/g1RemSet.hpp" 1.16 #include "gc_implementation/g1/heapRegionSeq.inline.hpp" 1.17 #include "memory/space.inline.hpp" 1.18 @@ -500,11 +501,11 @@ 1.19 } 1.20 1.21 void ConcurrentG1Refine::clear_and_record_card_counts() { 1.22 - if (G1ConcRSLogCacheSize == 0) return; 1.23 + if (G1ConcRSLogCacheSize == 0) { 1.24 + return; 1.25 + } 1.26 1.27 -#ifndef PRODUCT 1.28 double start = os::elapsedTime(); 1.29 -#endif 1.30 1.31 if (_expand_card_counts) { 1.32 int new_idx = _cache_size_index + 1; 1.33 @@ -523,11 +524,8 @@ 1.34 assert((this_epoch+1) <= max_jint, "to many periods"); 1.35 // Update epoch 1.36 _n_periods++; 1.37 - 1.38 -#ifndef PRODUCT 1.39 - double elapsed = os::elapsedTime() - start; 1.40 - _g1h->g1_policy()->record_cc_clear_time(elapsed * 1000.0); 1.41 -#endif 1.42 + double cc_clear_time_ms = (os::elapsedTime() - start) * 1000; 1.43 + _g1h->g1_policy()->phase_times()->record_cc_clear_time_ms(cc_clear_time_ms); 1.44 } 1.45 1.46 void ConcurrentG1Refine::print_worker_threads_on(outputStream* st) const {