< prev index next >
src/share/vm/gc/g1/workerDataArray.inline.hpp
Print this page
rev 10496 : 8152208: Summary for phase times are incorrect with and without UseDynamicNumberOfGCThreads
Reviewed-by: tamao, brutisso
*** 1,7 ****
/*
! * Copyright (c) 2015, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 82,93 ****
return sum(active_threads) / (double) active_threads;
}
template <typename T>
T WorkerDataArray<T>::sum(uint active_threads) const {
! T s = get(0);
! for (uint i = 1; i < active_threads; ++i) {
s += get(i);
}
return s;
}
--- 82,93 ----
return sum(active_threads) / (double) active_threads;
}
template <typename T>
T WorkerDataArray<T>::sum(uint active_threads) const {
! T s = 0;
! for (uint i = 0; i < active_threads; ++i) {
s += get(i);
}
return s;
}
*** 106,116 ****
template <class T>
void WorkerDataArray<T>::print_summary_on(outputStream* out, uint active_threads, bool print_sum) const {
T max = get(0);
T min = max;
T sum = 0;
! for (uint i = 1; i < active_threads; ++i) {
T value = get(i);
max = MAX2(max, value);
min = MIN2(min, value);
sum += value;
}
--- 106,116 ----
template <class T>
void WorkerDataArray<T>::print_summary_on(outputStream* out, uint active_threads, bool print_sum) const {
T max = get(0);
T min = max;
T sum = 0;
! for (uint i = 0; i < active_threads; ++i) {
T value = get(i);
max = MAX2(max, value);
min = MIN2(min, value);
sum += value;
}
< prev index next >