src/share/vm/gc_implementation/g1/satbQueue.hpp

changeset 2469
7e37af9d69ef
parent 2314
f95d63e2154a
child 3416
2ace1c4ee8da
equal deleted inserted replaced
2457:ffd725ff6943 2469:7e37af9d69ef
1 /* 1 /*
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2011, 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.
31 class JavaThread; 31 class JavaThread;
32 32
33 // A ptrQueue whose elements are "oops", pointers to object heads. 33 // A ptrQueue whose elements are "oops", pointers to object heads.
34 class ObjPtrQueue: public PtrQueue { 34 class ObjPtrQueue: public PtrQueue {
35 public: 35 public:
36 ObjPtrQueue(PtrQueueSet* qset_, bool perm = false) : 36 ObjPtrQueue(PtrQueueSet* qset, bool perm = false) :
37 // SATB queues are only active during marking cycles. We create 37 // SATB queues are only active during marking cycles. We create
38 // them with their active field set to false. If a thread is 38 // them with their active field set to false. If a thread is
39 // created during a cycle and its SATB queue needs to be activated 39 // created during a cycle and its SATB queue needs to be activated
40 // before the thread starts running, we'll need to set its active 40 // before the thread starts running, we'll need to set its active
41 // field to true. This is done in JavaThread::initialize_queues(). 41 // field to true. This is done in JavaThread::initialize_queues().
42 PtrQueue(qset_, perm, false /* active */) { } 42 PtrQueue(qset, perm, false /* active */) { }
43
44 // Overrides PtrQueue::should_enqueue_buffer(). See the method's
45 // definition for more information.
46 virtual bool should_enqueue_buffer();
47
43 // Apply the closure to all elements, and reset the index to make the 48 // Apply the closure to all elements, and reset the index to make the
44 // buffer empty. 49 // buffer empty.
45 void apply_closure(ObjectClosure* cl); 50 void apply_closure(ObjectClosure* cl);
46 51
47 // Apply the closure to all elements of "buf", down to "index" (inclusive.) 52 // Apply the closure to all elements of "buf", down to "index" (inclusive.)

mercurial