--- old/src/share/vm/gc/g1/g1GCPhaseTimes.cpp 2016-03-31 12:45:57.399898147 +0200 +++ new/src/share/vm/gc/g1/g1GCPhaseTimes.cpp 2016-03-31 12:45:57.263898141 +0200 @@ -106,7 +106,7 @@ } } -#define ASSERT_PHASE_UNINITILIAZED(phase) \ +#define ASSERT_PHASE_UNINITIALIZED(phase) \ assert(_gc_par_phases[phase]->get(i) == uninitialized, "Phase " #phase " reported for thread that was not started"); double G1GCPhaseTimes::worker_time(GCParPhases phase, uint worker) { @@ -141,19 +141,19 @@ record_time_secs(Other, i, total_worker_time - worker_known_time); } else { // Make sure all slots are uninitialized since this thread did not seem to have been started - ASSERT_PHASE_UNINITILIAZED(GCWorkerEnd); - ASSERT_PHASE_UNINITILIAZED(ExtRootScan); - ASSERT_PHASE_UNINITILIAZED(SATBFiltering); - ASSERT_PHASE_UNINITILIAZED(UpdateRS); - ASSERT_PHASE_UNINITILIAZED(ScanRS); - ASSERT_PHASE_UNINITILIAZED(CodeRoots); - ASSERT_PHASE_UNINITILIAZED(ObjCopy); - ASSERT_PHASE_UNINITILIAZED(Termination); + ASSERT_PHASE_UNINITIALIZED(GCWorkerEnd); + ASSERT_PHASE_UNINITIALIZED(ExtRootScan); + ASSERT_PHASE_UNINITIALIZED(SATBFiltering); + ASSERT_PHASE_UNINITIALIZED(UpdateRS); + ASSERT_PHASE_UNINITIALIZED(ScanRS); + ASSERT_PHASE_UNINITIALIZED(CodeRoots); + ASSERT_PHASE_UNINITIALIZED(ObjCopy); + ASSERT_PHASE_UNINITIALIZED(Termination); } } } -#undef ASSERT_PHASE_UNINITILIAZED +#undef ASSERT_PHASE_UNINITIALIZED // record the time a phase took in seconds void G1GCPhaseTimes::record_time_secs(GCParPhases phase, uint worker_i, double secs) { --- old/src/share/vm/gc/g1/workerDataArray.cpp 2016-03-31 12:45:57.615898156 +0200 +++ new/src/share/vm/gc/g1/workerDataArray.cpp 2016-03-31 12:45:57.487898151 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -107,7 +107,7 @@ } void WorkerDataArray_test_verify_array(WorkerDataArray& array, size_t expected_sum, double expected_avg, const char* expected_summary, const char* exected_details) { - const double epsilon = 0.001; + const double epsilon = 0.0001; assert(array.sum() == expected_sum, "Wrong sum, expected: " SIZE_FORMAT " but got: " SIZE_FORMAT, expected_sum, array.sum()); assert(fabs(array.average() - expected_avg) < epsilon, "Wrong average, expected: %f but got: %f", expected_avg, array.average()); @@ -121,7 +121,7 @@ } void WorkerDataArray_test_verify_array(WorkerDataArray& array, double expected_sum, double expected_avg, const char* expected_summary, const char* exected_details) { - const double epsilon = 0.001; + const double epsilon = 0.0001; assert(fabs(array.sum() - expected_sum) < epsilon, "Wrong sum, expected: %f but got: %f", expected_sum, array.sum()); assert(fabs(array.average() - expected_avg) < epsilon, "Wrong average, expected: %f but got: %f", expected_avg, array.average()); --- old/src/share/vm/gc/g1/workerDataArray.hpp 2016-03-31 12:45:57.843898165 +0200 +++ new/src/share/vm/gc/g1/workerDataArray.hpp 2016-03-31 12:45:57.715898160 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it --- old/src/share/vm/gc/g1/workerDataArray.inline.hpp 2016-03-31 12:45:58.055898174 +0200 +++ new/src/share/vm/gc/g1/workerDataArray.inline.hpp 2016-03-31 12:45:57.923898169 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -78,16 +78,16 @@ template double WorkerDataArray::average() const { - uint active_threads = 0; + uint contributing_threads = 0; for (uint i = 0; i < _length; ++i) { if (get(i) != uninitialized()) { - active_threads++; + contributing_threads++; } } - if (active_threads == 0) { + if (contributing_threads == 0) { return 0.0; } - return sum() / (double) active_threads; + return sum() / (double) contributing_threads; } template @@ -119,21 +119,21 @@ T min = get(start); T max = min; T sum = 0; - uint active_threads = 0; + uint contributing_threads = 0; for (uint i = start; i < _length; ++i) { T value = get(i); if (value != uninitialized()) { max = MAX2(max, value); min = MIN2(min, value); sum += value; - active_threads++; + contributing_threads++; } } T diff = max - min; - assert(active_threads != 0, "Must be since we found a used value for the start index"); - double avg = sum / (double) active_threads; + assert(contributing_threads != 0, "Must be since we found a used value for the start index"); + double avg = sum / (double) contributing_threads; WDAPrinter::summary(out, min, avg, max, diff, sum, print_sum); - out->print_cr(", Workers: %d", active_threads); + out->print_cr(", Workers: %d", contributing_threads); } else { // No data for this phase. out->print_cr(" skipped"); --- old/src/share/vm/gc/shared/workgroup.hpp 2016-03-31 12:45:58.279898184 +0200 +++ new/src/share/vm/gc/shared/workgroup.hpp 2016-03-31 12:45:58.147898178 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it