src/share/vm/gc_implementation/parNew/parOopClosures.hpp

Print this page




   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 // Closures for ParNewGeneration
  26 
  27 class ParScanThreadState;
  28 class ParNewGeneration;
  29 typedef Padded<OopTaskQueue> ObjToScanQueue;
  30 typedef GenericTaskQueueSet<ObjToScanQueue> ObjToScanQueueSet;
  31 class ParallelTaskTerminator;
  32 
  33 class ParScanClosure: public OopsInGenClosure {
  34  protected:
  35   ParScanThreadState* _par_scan_state;
  36   ParNewGeneration*   _g;
  37   HeapWord*           _boundary;
  38   template <class T> void inline par_do_barrier(T* p);
  39   template <class T> void inline do_oop_work(T* p,
  40                                              bool gc_barrier,
  41                                              bool root_scan);
  42  public:
  43   ParScanClosure(ParNewGeneration* g, ParScanThreadState* par_scan_state);
  44 };


 124   ParNewGeneration* _par_gen;
 125   ParNewGeneration* par_gen() { return _par_gen; }
 126 
 127   ObjToScanQueueSet*  _task_queues;
 128   ObjToScanQueueSet*  task_queues() { return _task_queues; }
 129 
 130   ParallelTaskTerminator* _terminator;
 131   ParallelTaskTerminator* terminator() { return _terminator; }
 132  public:
 133   ParEvacuateFollowersClosure(
 134     ParScanThreadState* par_scan_state_,
 135     ParScanWithoutBarrierClosure* to_space_closure_,
 136     ParScanWithBarrierClosure* old_gen_closure_,
 137     ParRootScanWithoutBarrierClosure* to_space_root_closure_,
 138     ParNewGeneration* par_gen_,
 139     ParRootScanWithBarrierTwoGensClosure* old_gen_root_closure_,
 140     ObjToScanQueueSet* task_queues_,
 141     ParallelTaskTerminator* terminator_);
 142   virtual void do_void();
 143 };




   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 
  30 // Closures for ParNewGeneration
  31 
  32 class ParScanThreadState;
  33 class ParNewGeneration;
  34 typedef Padded<OopTaskQueue> ObjToScanQueue;
  35 typedef GenericTaskQueueSet<ObjToScanQueue> ObjToScanQueueSet;
  36 class ParallelTaskTerminator;
  37 
  38 class ParScanClosure: public OopsInGenClosure {
  39  protected:
  40   ParScanThreadState* _par_scan_state;
  41   ParNewGeneration*   _g;
  42   HeapWord*           _boundary;
  43   template <class T> void inline par_do_barrier(T* p);
  44   template <class T> void inline do_oop_work(T* p,
  45                                              bool gc_barrier,
  46                                              bool root_scan);
  47  public:
  48   ParScanClosure(ParNewGeneration* g, ParScanThreadState* par_scan_state);
  49 };


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