equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
23 */ |
23 */ |
24 |
24 |
25 #ifndef SHARE_VM_GC_G1_PTRQUEUE_HPP |
25 #ifndef SHARE_VM_GC_G1_PTRQUEUE_HPP |
26 #define SHARE_VM_GC_G1_PTRQUEUE_HPP |
26 #define SHARE_VM_GC_G1_PTRQUEUE_HPP |
27 |
27 |
28 #include "memory/allocation.hpp" |
|
29 #include "utilities/align.hpp" |
28 #include "utilities/align.hpp" |
30 #include "utilities/sizes.hpp" |
29 #include "utilities/sizes.hpp" |
31 |
30 |
32 // There are various techniques that require threads to be able to log |
31 // There are various techniques that require threads to be able to log |
33 // addresses. For example, a generational write barrier might log |
32 // addresses. For example, a generational write barrier might log |
34 // the addresses of modified old-generation objects. This type supports |
33 // the addresses of modified old-generation objects. This type supports |
35 // this operation. |
34 // this operation. |
36 |
35 |
37 class BufferNode; |
36 class BufferNode; |
38 class PtrQueueSet; |
37 class PtrQueueSet; |
39 class PtrQueue VALUE_OBJ_CLASS_SPEC { |
38 class PtrQueue { |
40 friend class VMStructs; |
39 friend class VMStructs; |
41 |
40 |
42 // Noncopyable - not defined. |
41 // Noncopyable - not defined. |
43 PtrQueue(const PtrQueue&); |
42 PtrQueue(const PtrQueue&); |
44 PtrQueue& operator=(const PtrQueue&); |
43 PtrQueue& operator=(const PtrQueue&); |
255 |
254 |
256 // A PtrQueueSet represents resources common to a set of pointer queues. |
255 // A PtrQueueSet represents resources common to a set of pointer queues. |
257 // In particular, the individual queues allocate buffers from this shared |
256 // In particular, the individual queues allocate buffers from this shared |
258 // set, and return completed buffers to the set. |
257 // set, and return completed buffers to the set. |
259 // All these variables are are protected by the TLOQ_CBL_mon. XXX ??? |
258 // All these variables are are protected by the TLOQ_CBL_mon. XXX ??? |
260 class PtrQueueSet VALUE_OBJ_CLASS_SPEC { |
259 class PtrQueueSet { |
261 private: |
260 private: |
262 // The size of all buffers in the set. |
261 // The size of all buffers in the set. |
263 size_t _buffer_size; |
262 size_t _buffer_size; |
264 |
263 |
265 protected: |
264 protected: |