author | erikj |
Tue, 12 Sep 2017 19:03:39 +0200 | |
changeset 47216 | 71c04702a3d5 |
parent 46795 | hotspot/src/share/vm/gc/shared/workerDataArray.inline.hpp@623a5e42deb6 |
child 51332 | c25572739e7c |
permissions | -rw-r--r-- |
46795
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
1 |
/* |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
2 |
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
4 |
* |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
8 |
* |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
13 |
* accompanied this code). |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
14 |
* |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
18 |
* |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
21 |
* questions. |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
22 |
* |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
23 |
*/ |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
24 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
25 |
#ifndef SHARE_VM_GC_SHARED_WORKERDATAARRAY_INLINE_HPP |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
26 |
#define SHARE_VM_GC_SHARED_WORKERDATAARRAY_INLINE_HPP |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
27 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
28 |
#include "gc/shared/workerDataArray.hpp" |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
29 |
#include "memory/allocation.inline.hpp" |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
30 |
#include "utilities/ostream.hpp" |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
31 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
32 |
template <typename T> |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
33 |
WorkerDataArray<T>::WorkerDataArray(uint length, const char* title) : |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
34 |
_title(title), |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
35 |
_length(0) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
36 |
assert(length > 0, "Must have some workers to store data for"); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
37 |
_length = length; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
38 |
_data = NEW_C_HEAP_ARRAY(T, _length, mtGC); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
39 |
for (uint i = 0; i < MaxThreadWorkItems; i++) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
40 |
_thread_work_items[i] = NULL; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
41 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
42 |
reset(); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
43 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
44 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
45 |
template <typename T> |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
46 |
void WorkerDataArray<T>::set(uint worker_i, T value) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
47 |
assert(worker_i < _length, "Worker %d is greater than max: %d", worker_i, _length); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
48 |
assert(_data[worker_i] == uninitialized(), "Overwriting data for worker %d in %s", worker_i, _title); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
49 |
_data[worker_i] = value; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
50 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
51 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
52 |
template <typename T> |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
53 |
T WorkerDataArray<T>::get(uint worker_i) const { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
54 |
assert(worker_i < _length, "Worker %d is greater than max: %d", worker_i, _length); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
55 |
return _data[worker_i]; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
56 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
57 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
58 |
template <typename T> |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
59 |
WorkerDataArray<T>::~WorkerDataArray() { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
60 |
FREE_C_HEAP_ARRAY(T, _data); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
61 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
62 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
63 |
template <typename T> |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
64 |
void WorkerDataArray<T>::link_thread_work_items(WorkerDataArray<size_t>* thread_work_items, uint index) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
65 |
assert(index < MaxThreadWorkItems, "Tried to access thread work item %u (max %u)", index, MaxThreadWorkItems); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
66 |
_thread_work_items[index] = thread_work_items; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
67 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
68 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
69 |
template <typename T> |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
70 |
void WorkerDataArray<T>::set_thread_work_item(uint worker_i, size_t value, uint index) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
71 |
assert(index < MaxThreadWorkItems, "Tried to access thread work item %u (max %u)", index, MaxThreadWorkItems); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
72 |
assert(_thread_work_items[index] != NULL, "No sub count"); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
73 |
_thread_work_items[index]->set(worker_i, value); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
74 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
75 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
76 |
template <typename T> |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
77 |
void WorkerDataArray<T>::add_thread_work_item(uint worker_i, size_t value, uint index) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
78 |
assert(index < MaxThreadWorkItems, "Tried to access thread work item %u (max %u)", index, MaxThreadWorkItems); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
79 |
assert(_thread_work_items[index] != NULL, "No sub count"); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
80 |
_thread_work_items[index]->add(worker_i, value); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
81 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
82 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
83 |
template <typename T> |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
84 |
void WorkerDataArray<T>::add(uint worker_i, T value) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
85 |
assert(worker_i < _length, "Worker %d is greater than max: %d", worker_i, _length); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
86 |
assert(_data[worker_i] != uninitialized(), "No data to add to for worker %d", worker_i); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
87 |
_data[worker_i] += value; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
88 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
89 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
90 |
template <typename T> |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
91 |
double WorkerDataArray<T>::average() const { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
92 |
uint contributing_threads = 0; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
93 |
for (uint i = 0; i < _length; ++i) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
94 |
if (get(i) != uninitialized()) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
95 |
contributing_threads++; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
96 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
97 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
98 |
if (contributing_threads == 0) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
99 |
return 0.0; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
100 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
101 |
return sum() / (double) contributing_threads; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
102 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
103 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
104 |
template <typename T> |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
105 |
T WorkerDataArray<T>::sum() const { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
106 |
T s = 0; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
107 |
for (uint i = 0; i < _length; ++i) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
108 |
if (get(i) != uninitialized()) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
109 |
s += get(i); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
110 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
111 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
112 |
return s; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
113 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
114 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
115 |
template <typename T> |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
116 |
void WorkerDataArray<T>::set_all(T value) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
117 |
for (uint i = 0; i < _length; i++) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
118 |
_data[i] = value; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
119 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
120 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
121 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
122 |
template <class T> |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
123 |
void WorkerDataArray<T>::print_summary_on(outputStream* out, bool print_sum) const { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
124 |
out->print("%-25s", title()); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
125 |
uint start = 0; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
126 |
while (start < _length && get(start) == uninitialized()) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
127 |
start++; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
128 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
129 |
if (start < _length) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
130 |
T min = get(start); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
131 |
T max = min; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
132 |
T sum = 0; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
133 |
uint contributing_threads = 0; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
134 |
for (uint i = start; i < _length; ++i) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
135 |
T value = get(i); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
136 |
if (value != uninitialized()) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
137 |
max = MAX2(max, value); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
138 |
min = MIN2(min, value); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
139 |
sum += value; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
140 |
contributing_threads++; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
141 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
142 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
143 |
T diff = max - min; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
144 |
assert(contributing_threads != 0, "Must be since we found a used value for the start index"); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
145 |
double avg = sum / (double) contributing_threads; |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
146 |
WDAPrinter::summary(out, min, avg, max, diff, sum, print_sum); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
147 |
out->print_cr(", Workers: %d", contributing_threads); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
148 |
} else { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
149 |
// No data for this phase. |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
150 |
out->print_cr(" skipped"); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
151 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
152 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
153 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
154 |
template <class T> |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
155 |
void WorkerDataArray<T>::print_details_on(outputStream* out) const { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
156 |
WDAPrinter::details(this, out); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
157 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
158 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
159 |
template <typename T> |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
160 |
void WorkerDataArray<T>::reset() { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
161 |
set_all(uninitialized()); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
162 |
for (uint i = 0; i < MaxThreadWorkItems; i++) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
163 |
if (_thread_work_items[i] != NULL) { |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
164 |
_thread_work_items[i]->reset(); |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
165 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
166 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
167 |
} |
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
168 |
|
623a5e42deb6
8173335: Improve logging for j.l.ref.reference processing
sangheki
parents:
diff
changeset
|
169 |
#endif // SHARE_VM_GC_SHARED_WORKERDATAARRAY_INLINE_HPP |