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 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc/shared/satbMarkQueue.hpp"
27 #include "gc/shared/collectedHeap.hpp"
28 #include "logging/log.hpp"
29 #include "memory/allocation.inline.hpp"
30 #include "oops/oop.inline.hpp"
31 #include "runtime/atomic.hpp"
32 #include "runtime/mutexLocker.hpp"
33 #include "runtime/orderAccess.hpp"
34 #include "runtime/os.hpp"
35 #include "runtime/safepoint.hpp"
36 #include "runtime/thread.hpp"
37 #include "runtime/threadSMR.hpp"
38 #include "runtime/vmThread.hpp"
39 #include "utilities/globalCounter.inline.hpp"
40
41 SATBMarkQueue::SATBMarkQueue(SATBMarkQueueSet* qset) :
42 // SATB queues are only active during marking cycles. We create
43 // them with their active field set to false. If a thread is
44 // created during a cycle and its SATB queue needs to be activated
45 // before the thread starts running, we'll need to set its active
46 // field to true. This must be done in the collector-specific
47 // BarrierSet thread attachment protocol.
48 PtrQueue(qset, false /* active */)
49 { }
50
51 void SATBMarkQueue::flush() {
52 // Filter now to possibly save work later. If filtering empties the
53 // buffer then flush_impl can deallocate the buffer.
|
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 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc/shared/satbMarkQueue.hpp"
27 #include "gc/shared/collectedHeap.hpp"
28 #include "logging/log.hpp"
29 #include "memory/allocation.inline.hpp"
30 #include "oops/oop.inline.hpp"
31 #include "runtime/atomic.hpp"
32 #include "runtime/mutexLocker.hpp"
33 #include "runtime/os.hpp"
34 #include "runtime/safepoint.hpp"
35 #include "runtime/thread.hpp"
36 #include "runtime/threadSMR.hpp"
37 #include "runtime/vmThread.hpp"
38 #include "utilities/globalCounter.inline.hpp"
39
40 SATBMarkQueue::SATBMarkQueue(SATBMarkQueueSet* qset) :
41 // SATB queues are only active during marking cycles. We create
42 // them with their active field set to false. If a thread is
43 // created during a cycle and its SATB queue needs to be activated
44 // before the thread starts running, we'll need to set its active
45 // field to true. This must be done in the collector-specific
46 // BarrierSet thread attachment protocol.
47 PtrQueue(qset, false /* active */)
48 { }
49
50 void SATBMarkQueue::flush() {
51 // Filter now to possibly save work later. If filtering empties the
52 // buffer then flush_impl can deallocate the buffer.
|