author | jprovino |
Fri, 26 Feb 2016 14:02:39 -0500 | |
changeset 36371 | fd81a4f0ea00 |
parent 36354 | 28bbe66a0498 |
child 37065 | c00d1c2ffb7c |
permissions | -rw-r--r-- |
1374 | 1 |
/* |
36354 | 2 |
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. |
1374 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5082
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5082
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
5082
diff
changeset
|
21 |
* questions. |
1374 | 22 |
* |
23 |
*/ |
|
24 |
||
30764 | 25 |
#ifndef SHARE_VM_GC_G1_PTRQUEUE_HPP |
26 |
#define SHARE_VM_GC_G1_PTRQUEUE_HPP |
|
7397 | 27 |
|
28 |
#include "memory/allocation.hpp" |
|
29 |
#include "utilities/sizes.hpp" |
|
30 |
||
1374 | 31 |
// There are various techniques that require threads to be able to log |
32 |
// addresses. For example, a generational write barrier might log |
|
33 |
// the addresses of modified old-generation objects. This type supports |
|
34 |
// this operation. |
|
35 |
||
36 |
class PtrQueueSet; |
|
2013
49e915da0905
6700941: G1: allocation spec missing for some G1 classes
apetrusenko
parents:
1623
diff
changeset
|
37 |
class PtrQueue VALUE_OBJ_CLASS_SPEC { |
20011
d74937287461
8024760: add more types, fields and constants to VMStructs
twisti
parents:
11455
diff
changeset
|
38 |
friend class VMStructs; |
1374 | 39 |
|
33761
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
40 |
// Noncopyable - not defined. |
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
41 |
PtrQueue(const PtrQueue&); |
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
42 |
PtrQueue& operator=(const PtrQueue&); |
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
43 |
|
1374 | 44 |
// The ptr queue set to which this queue belongs. |
33761
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
45 |
PtrQueueSet* const _qset; |
1374 | 46 |
|
47 |
// Whether updates should be logged. |
|
48 |
bool _active; |
|
49 |
||
33761
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
50 |
// If true, the queue is permanent, and doesn't need to deallocate |
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
51 |
// its buffer in the destructor (since that obtains a lock which may not |
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
52 |
// be legally locked by then. |
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
53 |
const bool _permanent; |
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
54 |
|
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
55 |
protected: |
1374 | 56 |
// The buffer. |
57 |
void** _buf; |
|
33761
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
58 |
// The (byte) index at which an object was last enqueued. Starts at "_sz" |
1374 | 59 |
// (indicating an empty buffer) and goes towards zero. |
60 |
size_t _index; |
|
61 |
||
33761
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
62 |
// The (byte) size of the buffer. |
1374 | 63 |
size_t _sz; |
64 |
||
65 |
// If there is a lock associated with this buffer, this is that lock. |
|
66 |
Mutex* _lock; |
|
67 |
||
68 |
PtrQueueSet* qset() { return _qset; } |
|
33761
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
69 |
bool is_permanent() const { return _permanent; } |
28507 | 70 |
|
71 |
// Process queue entries and release resources, if not permanent. |
|
72 |
void flush_impl(); |
|
1374 | 73 |
|
74 |
// Initialize this queue to contain a null buffer, and be part of the |
|
75 |
// given PtrQueueSet. |
|
33761
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
76 |
PtrQueue(PtrQueueSet* qset, bool permanent = false, bool active = false); |
28507 | 77 |
|
78 |
// Requires queue flushed or permanent. |
|
79 |
~PtrQueue(); |
|
1374 | 80 |
|
33761
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
81 |
public: |
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
82 |
|
1374 | 83 |
// Associate a lock with a ptr queue. |
84 |
void set_lock(Mutex* lock) { _lock = lock; } |
|
85 |
||
86 |
void reset() { if (_buf != NULL) _index = _sz; } |
|
87 |
||
20403
45a89fbcd8f7
8014555: G1: Memory ordering problem with Conc refinement and card marking
mgerdin
parents:
20011
diff
changeset
|
88 |
void enqueue(volatile void* ptr) { |
45a89fbcd8f7
8014555: G1: Memory ordering problem with Conc refinement and card marking
mgerdin
parents:
20011
diff
changeset
|
89 |
enqueue((void*)(ptr)); |
45a89fbcd8f7
8014555: G1: Memory ordering problem with Conc refinement and card marking
mgerdin
parents:
20011
diff
changeset
|
90 |
} |
45a89fbcd8f7
8014555: G1: Memory ordering problem with Conc refinement and card marking
mgerdin
parents:
20011
diff
changeset
|
91 |
|
1374 | 92 |
// Enqueues the given "obj". |
93 |
void enqueue(void* ptr) { |
|
94 |
if (!_active) return; |
|
95 |
else enqueue_known_active(ptr); |
|
96 |
} |
|
97 |
||
7920 | 98 |
// This method is called when we're doing the zero index handling |
99 |
// and gives a chance to the queues to do any pre-enqueueing |
|
100 |
// processing they might want to do on the buffer. It should return |
|
101 |
// true if the buffer should be enqueued, or false if enough |
|
102 |
// entries were cleared from it so that it can be re-used. It should |
|
103 |
// not return false if the buffer is still full (otherwise we can |
|
104 |
// get into an infinite loop). |
|
105 |
virtual bool should_enqueue_buffer() { return true; } |
|
4481 | 106 |
void handle_zero_index(); |
1374 | 107 |
void locking_enqueue_completed_buffer(void** buf); |
108 |
||
109 |
void enqueue_known_active(void* ptr); |
|
110 |
||
111 |
size_t size() { |
|
112 |
assert(_sz >= _index, "Invariant."); |
|
113 |
return _buf == NULL ? 0 : _sz - _index; |
|
114 |
} |
|
115 |
||
6768
71338ecb7813
6980838: G1: guarantee(false) failed: thread has an unexpected active value in its SATB queue
tonyp
parents:
5547
diff
changeset
|
116 |
bool is_empty() { |
71338ecb7813
6980838: G1: guarantee(false) failed: thread has an unexpected active value in its SATB queue
tonyp
parents:
5547
diff
changeset
|
117 |
return _buf == NULL || _sz == _index; |
71338ecb7813
6980838: G1: guarantee(false) failed: thread has an unexpected active value in its SATB queue
tonyp
parents:
5547
diff
changeset
|
118 |
} |
71338ecb7813
6980838: G1: guarantee(false) failed: thread has an unexpected active value in its SATB queue
tonyp
parents:
5547
diff
changeset
|
119 |
|
1374 | 120 |
// Set the "active" property of the queue to "b". An enqueue to an |
121 |
// inactive thread is a no-op. Setting a queue to inactive resets its |
|
122 |
// log to the empty state. |
|
123 |
void set_active(bool b) { |
|
124 |
_active = b; |
|
125 |
if (!b && _buf != NULL) { |
|
126 |
_index = _sz; |
|
127 |
} else if (b && _buf != NULL) { |
|
128 |
assert(_index == _sz, "invariant: queues are empty when activated."); |
|
129 |
} |
|
130 |
} |
|
131 |
||
5082
19e725a3d2eb
6935821: G1: threads created during marking do not active their SATB queues
tonyp
parents:
4481
diff
changeset
|
132 |
bool is_active() { return _active; } |
19e725a3d2eb
6935821: G1: threads created during marking do not active their SATB queues
tonyp
parents:
4481
diff
changeset
|
133 |
|
33761
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
134 |
static size_t byte_index_to_index(size_t ind) { |
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
135 |
assert((ind % sizeof(void*)) == 0, "Invariant."); |
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
136 |
return ind / sizeof(void*); |
1374 | 137 |
} |
138 |
||
139 |
// To support compiler. |
|
34148
6efbc7ffd767
8143014: Access PtrQueue member offsets through derived classes
kbarrett
parents:
33761
diff
changeset
|
140 |
|
6efbc7ffd767
8143014: Access PtrQueue member offsets through derived classes
kbarrett
parents:
33761
diff
changeset
|
141 |
protected: |
6efbc7ffd767
8143014: Access PtrQueue member offsets through derived classes
kbarrett
parents:
33761
diff
changeset
|
142 |
template<typename Derived> |
1374 | 143 |
static ByteSize byte_offset_of_index() { |
34148
6efbc7ffd767
8143014: Access PtrQueue member offsets through derived classes
kbarrett
parents:
33761
diff
changeset
|
144 |
return byte_offset_of(Derived, _index); |
1374 | 145 |
} |
34148
6efbc7ffd767
8143014: Access PtrQueue member offsets through derived classes
kbarrett
parents:
33761
diff
changeset
|
146 |
|
1374 | 147 |
static ByteSize byte_width_of_index() { return in_ByteSize(sizeof(size_t)); } |
148 |
||
34148
6efbc7ffd767
8143014: Access PtrQueue member offsets through derived classes
kbarrett
parents:
33761
diff
changeset
|
149 |
template<typename Derived> |
1374 | 150 |
static ByteSize byte_offset_of_buf() { |
34148
6efbc7ffd767
8143014: Access PtrQueue member offsets through derived classes
kbarrett
parents:
33761
diff
changeset
|
151 |
return byte_offset_of(Derived, _buf); |
1374 | 152 |
} |
34148
6efbc7ffd767
8143014: Access PtrQueue member offsets through derived classes
kbarrett
parents:
33761
diff
changeset
|
153 |
|
1374 | 154 |
static ByteSize byte_width_of_buf() { return in_ByteSize(sizeof(void*)); } |
155 |
||
34148
6efbc7ffd767
8143014: Access PtrQueue member offsets through derived classes
kbarrett
parents:
33761
diff
changeset
|
156 |
template<typename Derived> |
1374 | 157 |
static ByteSize byte_offset_of_active() { |
34148
6efbc7ffd767
8143014: Access PtrQueue member offsets through derived classes
kbarrett
parents:
33761
diff
changeset
|
158 |
return byte_offset_of(Derived, _active); |
1374 | 159 |
} |
34148
6efbc7ffd767
8143014: Access PtrQueue member offsets through derived classes
kbarrett
parents:
33761
diff
changeset
|
160 |
|
1374 | 161 |
static ByteSize byte_width_of_active() { return in_ByteSize(sizeof(bool)); } |
162 |
||
163 |
}; |
|
164 |
||
4481 | 165 |
class BufferNode { |
166 |
size_t _index; |
|
167 |
BufferNode* _next; |
|
36354 | 168 |
void* _buffer[1]; // Pseudo flexible array member. |
169 |
||
170 |
BufferNode() : _index(0), _next(NULL) { } |
|
171 |
~BufferNode() { } |
|
172 |
||
173 |
static size_t buffer_offset() { |
|
174 |
return offset_of(BufferNode, _buffer); |
|
175 |
} |
|
176 |
||
4481 | 177 |
public: |
178 |
BufferNode* next() const { return _next; } |
|
179 |
void set_next(BufferNode* n) { _next = n; } |
|
180 |
size_t index() const { return _index; } |
|
181 |
void set_index(size_t i) { _index = i; } |
|
182 |
||
36354 | 183 |
// Allocate a new BufferNode with the "buffer" having size bytes. |
184 |
static BufferNode* allocate(size_t byte_size); |
|
4481 | 185 |
|
36354 | 186 |
// Free a BufferNode. |
187 |
static void deallocate(BufferNode* node); |
|
4481 | 188 |
|
36354 | 189 |
// Return the BufferNode containing the buffer. |
190 |
static BufferNode* make_node_from_buffer(void** buffer) { |
|
191 |
return reinterpret_cast<BufferNode*>( |
|
192 |
reinterpret_cast<char*>(buffer) - buffer_offset()); |
|
4481 | 193 |
} |
194 |
||
36354 | 195 |
// Return the buffer for node. |
4481 | 196 |
static void** make_buffer_from_node(BufferNode *node) { |
36354 | 197 |
// &_buffer[0] might lead to index out of bounds warnings. |
198 |
return reinterpret_cast<void**>( |
|
199 |
reinterpret_cast<char*>(node) + buffer_offset()); |
|
4481 | 200 |
} |
201 |
}; |
|
202 |
||
1374 | 203 |
// A PtrQueueSet represents resources common to a set of pointer queues. |
204 |
// In particular, the individual queues allocate buffers from this shared |
|
205 |
// set, and return completed buffers to the set. |
|
206 |
// All these variables are are protected by the TLOQ_CBL_mon. XXX ??? |
|
2013
49e915da0905
6700941: G1: allocation spec missing for some G1 classes
apetrusenko
parents:
1623
diff
changeset
|
207 |
class PtrQueueSet VALUE_OBJ_CLASS_SPEC { |
1374 | 208 |
protected: |
209 |
Monitor* _cbl_mon; // Protects the fields below. |
|
4481 | 210 |
BufferNode* _completed_buffers_head; |
211 |
BufferNode* _completed_buffers_tail; |
|
36371
fd81a4f0ea00
8139651: ConcurrentG1Refine uses ints for many of its members that should be unsigned types
jprovino
parents:
36354
diff
changeset
|
212 |
size_t _n_completed_buffers; |
4481 | 213 |
int _process_completed_threshold; |
1374 | 214 |
volatile bool _process_completed; |
215 |
||
216 |
// This (and the interpretation of the first element as a "next" |
|
217 |
// pointer) are protected by the TLOQ_FL_lock. |
|
218 |
Mutex* _fl_lock; |
|
4481 | 219 |
BufferNode* _buf_free_list; |
1374 | 220 |
size_t _buf_free_list_sz; |
2142
032f4652700c
6720309: G1: don't synchronously update RSet during evacuation pauses
iveresov
parents:
2013
diff
changeset
|
221 |
// Queue set can share a freelist. The _fl_owner variable |
032f4652700c
6720309: G1: don't synchronously update RSet during evacuation pauses
iveresov
parents:
2013
diff
changeset
|
222 |
// specifies the owner. It is set to "this" by default. |
032f4652700c
6720309: G1: don't synchronously update RSet during evacuation pauses
iveresov
parents:
2013
diff
changeset
|
223 |
PtrQueueSet* _fl_owner; |
1374 | 224 |
|
225 |
// The size of all buffers in the set. |
|
226 |
size_t _sz; |
|
227 |
||
228 |
bool _all_active; |
|
229 |
||
230 |
// If true, notify_all on _cbl_mon when the threshold is reached. |
|
231 |
bool _notify_when_complete; |
|
232 |
||
233 |
// Maximum number of elements allowed on completed queue: after that, |
|
234 |
// enqueuer does the work itself. Zero indicates no maximum. |
|
235 |
int _max_completed_queue; |
|
36371
fd81a4f0ea00
8139651: ConcurrentG1Refine uses ints for many of its members that should be unsigned types
jprovino
parents:
36354
diff
changeset
|
236 |
size_t _completed_queue_padding; |
1374 | 237 |
|
36371
fd81a4f0ea00
8139651: ConcurrentG1Refine uses ints for many of its members that should be unsigned types
jprovino
parents:
36354
diff
changeset
|
238 |
size_t completed_buffers_list_length(); |
1374 | 239 |
void assert_completed_buffer_list_len_correct_locked(); |
240 |
void assert_completed_buffer_list_len_correct(); |
|
241 |
||
242 |
protected: |
|
243 |
// A mutator thread does the the work of processing a buffer. |
|
244 |
// Returns "true" iff the work is complete (and the buffer may be |
|
245 |
// deallocated). |
|
246 |
virtual bool mut_process_buffer(void** buf) { |
|
247 |
ShouldNotReachHere(); |
|
248 |
return false; |
|
249 |
} |
|
250 |
||
251 |
// Create an empty ptr queue set. |
|
252 |
PtrQueueSet(bool notify_when_complete = false); |
|
33761
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
253 |
~PtrQueueSet(); |
1374 | 254 |
|
255 |
// Because of init-order concerns, we can't pass these as constructor |
|
256 |
// arguments. |
|
33761
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
257 |
void initialize(Monitor* cbl_mon, |
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
258 |
Mutex* fl_lock, |
4481 | 259 |
int process_completed_threshold, |
260 |
int max_completed_queue, |
|
33761
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
261 |
PtrQueueSet *fl_owner = NULL); |
1374 | 262 |
|
33761
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
263 |
public: |
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
264 |
|
329db4b51480
6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
kbarrett
parents:
30764
diff
changeset
|
265 |
// Return an empty array of size _sz (required to be non-zero). |
1374 | 266 |
void** allocate_buffer(); |
267 |
||
268 |
// Return an empty buffer to the free list. The "buf" argument is |
|
269 |
// required to be a pointer to the head of an array of length "_sz". |
|
270 |
void deallocate_buffer(void** buf); |
|
271 |
||
272 |
// Declares that "buf" is a complete buffer. |
|
4481 | 273 |
void enqueue_complete_buffer(void** buf, size_t index = 0); |
274 |
||
275 |
// To be invoked by the mutator. |
|
276 |
bool process_or_enqueue_complete_buffer(void** buf); |
|
1374 | 277 |
|
278 |
bool completed_buffers_exist_dirty() { |
|
279 |
return _n_completed_buffers > 0; |
|
280 |
} |
|
281 |
||
282 |
bool process_completed_buffers() { return _process_completed; } |
|
4481 | 283 |
void set_process_completed(bool x) { _process_completed = x; } |
1374 | 284 |
|
5082
19e725a3d2eb
6935821: G1: threads created during marking do not active their SATB queues
tonyp
parents:
4481
diff
changeset
|
285 |
bool is_active() { return _all_active; } |
1374 | 286 |
|
287 |
// Set the buffer size. Should be called before any "enqueue" operation |
|
288 |
// can be called. And should only be called once. |
|
289 |
void set_buffer_size(size_t sz); |
|
290 |
||
291 |
// Get the buffer size. |
|
292 |
size_t buffer_size() { return _sz; } |
|
293 |
||
4481 | 294 |
// Get/Set the number of completed buffers that triggers log processing. |
295 |
void set_process_completed_threshold(int sz) { _process_completed_threshold = sz; } |
|
296 |
int process_completed_threshold() const { return _process_completed_threshold; } |
|
1374 | 297 |
|
298 |
// Must only be called at a safe point. Indicates that the buffer free |
|
299 |
// list size may be reduced, if that is deemed desirable. |
|
300 |
void reduce_free_list(); |
|
301 |
||
36371
fd81a4f0ea00
8139651: ConcurrentG1Refine uses ints for many of its members that should be unsigned types
jprovino
parents:
36354
diff
changeset
|
302 |
size_t completed_buffers_num() { return _n_completed_buffers; } |
2142
032f4652700c
6720309: G1: don't synchronously update RSet during evacuation pauses
iveresov
parents:
2013
diff
changeset
|
303 |
|
032f4652700c
6720309: G1: don't synchronously update RSet during evacuation pauses
iveresov
parents:
2013
diff
changeset
|
304 |
void merge_bufferlists(PtrQueueSet* src); |
4481 | 305 |
|
306 |
void set_max_completed_queue(int m) { _max_completed_queue = m; } |
|
307 |
int max_completed_queue() { return _max_completed_queue; } |
|
308 |
||
36371
fd81a4f0ea00
8139651: ConcurrentG1Refine uses ints for many of its members that should be unsigned types
jprovino
parents:
36354
diff
changeset
|
309 |
void set_completed_queue_padding(size_t padding) { _completed_queue_padding = padding; } |
fd81a4f0ea00
8139651: ConcurrentG1Refine uses ints for many of its members that should be unsigned types
jprovino
parents:
36354
diff
changeset
|
310 |
size_t completed_queue_padding() { return _completed_queue_padding; } |
4481 | 311 |
|
312 |
// Notify the consumer if the number of buffers crossed the threshold |
|
313 |
void notify_if_necessary(); |
|
1374 | 314 |
}; |
7397 | 315 |
|
30764 | 316 |
#endif // SHARE_VM_GC_G1_PTRQUEUE_HPP |