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 *
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 #ifndef SHARE_VM_GC_IMPLEMENTATION_PARNEW_PARNEWGENERATION_HPP
26 #define SHARE_VM_GC_IMPLEMENTATION_PARNEW_PARNEWGENERATION_HPP
27
28 #include "gc_implementation/parNew/parOopClosures.hpp"
29 #include "gc_implementation/shared/gcTrace.hpp"
30 #include "gc_implementation/shared/plab.hpp"
31 #include "gc_implementation/shared/copyFailedInfo.hpp"
32 #include "memory/defNewGeneration.hpp"
33 #include "memory/padded.hpp"
34 #include "utilities/taskqueue.hpp"
35
36 class ChunkArray;
37 class ParScanWithoutBarrierClosure;
38 class ParScanWithBarrierClosure;
39 class ParRootScanWithoutBarrierClosure;
40 class ParRootScanWithBarrierTwoGensClosure;
41 class ParEvacuateFollowersClosure;
42
43 // It would be better if these types could be kept local to the .cpp file,
44 // but they must be here to allow ParScanClosure::do_oop_work to be defined
45 // in genOopClosures.inline.hpp.
46
47 typedef Padded<OopTaskQueue> ObjToScanQueue;
48 typedef GenericTaskQueueSet<ObjToScanQueue, mtGC> ObjToScanQueueSet;
49
50 class ParKeepAliveClosure: public DefNewGeneration::KeepAliveClosure {
51 private:
52 ParScanWeakRefClosure* _par_cl;
53 protected:
54 template <class T> void do_oop_work(T* p);
405 // The task queues to be used by parallel GC threads.
406 ObjToScanQueueSet* task_queues() {
407 return _task_queues;
408 }
409
410 PLABStats* plab_stats() {
411 return &_plab_stats;
412 }
413
414 size_t desired_plab_sz() {
415 return _plab_stats.desired_plab_sz();
416 }
417
418 const ParNewTracer* gc_tracer() const {
419 return &_gc_tracer;
420 }
421
422 static oop real_forwardee(oop obj);
423 };
424
425 #endif // SHARE_VM_GC_IMPLEMENTATION_PARNEW_PARNEWGENERATION_HPP
|
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 *
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 #ifndef SHARE_VM_GC_CMS_PARNEWGENERATION_HPP
26 #define SHARE_VM_GC_CMS_PARNEWGENERATION_HPP
27
28 #include "gc/cms/parOopClosures.hpp"
29 #include "gc/serial/defNewGeneration.hpp"
30 #include "gc/shared/copyFailedInfo.hpp"
31 #include "gc/shared/gcTrace.hpp"
32 #include "gc/shared/plab.hpp"
33 #include "gc/shared/taskqueue.hpp"
34 #include "memory/padded.hpp"
35
36 class ChunkArray;
37 class ParScanWithoutBarrierClosure;
38 class ParScanWithBarrierClosure;
39 class ParRootScanWithoutBarrierClosure;
40 class ParRootScanWithBarrierTwoGensClosure;
41 class ParEvacuateFollowersClosure;
42
43 // It would be better if these types could be kept local to the .cpp file,
44 // but they must be here to allow ParScanClosure::do_oop_work to be defined
45 // in genOopClosures.inline.hpp.
46
47 typedef Padded<OopTaskQueue> ObjToScanQueue;
48 typedef GenericTaskQueueSet<ObjToScanQueue, mtGC> ObjToScanQueueSet;
49
50 class ParKeepAliveClosure: public DefNewGeneration::KeepAliveClosure {
51 private:
52 ParScanWeakRefClosure* _par_cl;
53 protected:
54 template <class T> void do_oop_work(T* p);
405 // The task queues to be used by parallel GC threads.
406 ObjToScanQueueSet* task_queues() {
407 return _task_queues;
408 }
409
410 PLABStats* plab_stats() {
411 return &_plab_stats;
412 }
413
414 size_t desired_plab_sz() {
415 return _plab_stats.desired_plab_sz();
416 }
417
418 const ParNewTracer* gc_tracer() const {
419 return &_gc_tracer;
420 }
421
422 static oop real_forwardee(oop obj);
423 };
424
425 #endif // SHARE_VM_GC_CMS_PARNEWGENERATION_HPP
|