< prev index next >

src/share/vm/gc/cms/parOopClosures.hpp

Print this page
rev 8362 : 8079792: GC directory structure cleanup
Reviewed-by:
   1 /*
   2  * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
   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  *
  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_PAROOPCLOSURES_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_PARNEW_PAROOPCLOSURES_HPP
  27 
  28 #include "memory/genOopClosures.hpp"
  29 #include "memory/padded.hpp"
  30 
  31 // Closures for ParNewGeneration
  32 
  33 class ParScanThreadState;
  34 class ParNewGeneration;
  35 typedef Padded<OopTaskQueue> ObjToScanQueue;
  36 typedef GenericTaskQueueSet<ObjToScanQueue, mtGC> ObjToScanQueueSet;
  37 class ParallelTaskTerminator;
  38 
  39 class ParScanClosure: public OopsInKlassOrGenClosure {
  40  protected:
  41   ParScanThreadState* _par_scan_state;
  42   ParNewGeneration*   _g;
  43   HeapWord*           _boundary;
  44   template <class T> void inline par_do_barrier(T* p);
  45   template <class T> void inline do_oop_work(T* p,
  46                                              bool gc_barrier,
  47                                              bool root_scan);
  48  public:


 131   ParNewGeneration* par_gen() { return _par_gen; }
 132 
 133   ObjToScanQueueSet*  _task_queues;
 134   ObjToScanQueueSet*  task_queues() { return _task_queues; }
 135 
 136   ParallelTaskTerminator* _terminator;
 137   ParallelTaskTerminator* terminator() { return _terminator; }
 138  public:
 139   ParEvacuateFollowersClosure(
 140     ParScanThreadState* par_scan_state_,
 141     ParScanWithoutBarrierClosure* to_space_closure_,
 142     ParScanWithBarrierClosure* old_gen_closure_,
 143     ParRootScanWithoutBarrierClosure* to_space_root_closure_,
 144     ParNewGeneration* par_gen_,
 145     ParRootScanWithBarrierTwoGensClosure* old_gen_root_closure_,
 146     ObjToScanQueueSet* task_queues_,
 147     ParallelTaskTerminator* terminator_);
 148   virtual void do_void();
 149 };
 150 
 151 #endif // SHARE_VM_GC_IMPLEMENTATION_PARNEW_PAROOPCLOSURES_HPP
   1 /*
   2  * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
   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  *
  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_PAROOPCLOSURES_HPP
  26 #define SHARE_VM_GC_CMS_PAROOPCLOSURES_HPP
  27 
  28 #include "gc/shared/genOopClosures.hpp"
  29 #include "memory/padded.hpp"
  30 
  31 // Closures for ParNewGeneration
  32 
  33 class ParScanThreadState;
  34 class ParNewGeneration;
  35 typedef Padded<OopTaskQueue> ObjToScanQueue;
  36 typedef GenericTaskQueueSet<ObjToScanQueue, mtGC> ObjToScanQueueSet;
  37 class ParallelTaskTerminator;
  38 
  39 class ParScanClosure: public OopsInKlassOrGenClosure {
  40  protected:
  41   ParScanThreadState* _par_scan_state;
  42   ParNewGeneration*   _g;
  43   HeapWord*           _boundary;
  44   template <class T> void inline par_do_barrier(T* p);
  45   template <class T> void inline do_oop_work(T* p,
  46                                              bool gc_barrier,
  47                                              bool root_scan);
  48  public:


 131   ParNewGeneration* par_gen() { return _par_gen; }
 132 
 133   ObjToScanQueueSet*  _task_queues;
 134   ObjToScanQueueSet*  task_queues() { return _task_queues; }
 135 
 136   ParallelTaskTerminator* _terminator;
 137   ParallelTaskTerminator* terminator() { return _terminator; }
 138  public:
 139   ParEvacuateFollowersClosure(
 140     ParScanThreadState* par_scan_state_,
 141     ParScanWithoutBarrierClosure* to_space_closure_,
 142     ParScanWithBarrierClosure* old_gen_closure_,
 143     ParRootScanWithoutBarrierClosure* to_space_root_closure_,
 144     ParNewGeneration* par_gen_,
 145     ParRootScanWithBarrierTwoGensClosure* old_gen_root_closure_,
 146     ObjToScanQueueSet* task_queues_,
 147     ParallelTaskTerminator* terminator_);
 148   virtual void do_void();
 149 };
 150 
 151 #endif // SHARE_VM_GC_CMS_PAROOPCLOSURES_HPP
< prev index next >