src/share/vm/gc_implementation/parNew/parNewGeneration.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 class ChunkArray;
  26 class ParScanWithoutBarrierClosure;
  27 class ParScanWithBarrierClosure;
  28 class ParRootScanWithoutBarrierClosure;
  29 class ParRootScanWithBarrierTwoGensClosure;
  30 class ParEvacuateFollowersClosure;
  31 
  32 // It would be better if these types could be kept local to the .cpp file,
  33 // but they must be here to allow ParScanClosure::do_oop_work to be defined
  34 // in genOopClosures.inline.hpp.
  35 
  36 typedef Padded<OopTaskQueue> ObjToScanQueue;
  37 typedef GenericTaskQueueSet<ObjToScanQueue> ObjToScanQueueSet;
  38 
  39 class ParKeepAliveClosure: public DefNewGeneration::KeepAliveClosure {
  40  private:
  41   ParScanWeakRefClosure* _par_cl;
  42  protected:
  43   template <class T> void do_oop_work(T* p);
  44  public:


 403   bool take_from_overflow_list(ParScanThreadState* par_scan_state);
 404   bool take_from_overflow_list_work(ParScanThreadState* par_scan_state);
 405 
 406   // The task queues to be used by parallel GC threads.
 407   ObjToScanQueueSet* task_queues() {
 408     return _task_queues;
 409   }
 410 
 411   PLABStats* plab_stats() {
 412     return &_plab_stats;
 413   }
 414 
 415   size_t desired_plab_sz() {
 416     return _plab_stats.desired_plab_sz();
 417   }
 418 
 419   static oop real_forwardee(oop obj);
 420 
 421   DEBUG_ONLY(static bool is_legal_forward_ptr(oop p);)
 422 };




   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/parGCAllocBuffer.hpp"
  29 #include "memory/defNewGeneration.hpp"
  30 #include "utilities/taskqueue.hpp"
  31 
  32 class ChunkArray;
  33 class ParScanWithoutBarrierClosure;
  34 class ParScanWithBarrierClosure;
  35 class ParRootScanWithoutBarrierClosure;
  36 class ParRootScanWithBarrierTwoGensClosure;
  37 class ParEvacuateFollowersClosure;
  38 
  39 // It would be better if these types could be kept local to the .cpp file,
  40 // but they must be here to allow ParScanClosure::do_oop_work to be defined
  41 // in genOopClosures.inline.hpp.
  42 
  43 typedef Padded<OopTaskQueue> ObjToScanQueue;
  44 typedef GenericTaskQueueSet<ObjToScanQueue> ObjToScanQueueSet;
  45 
  46 class ParKeepAliveClosure: public DefNewGeneration::KeepAliveClosure {
  47  private:
  48   ParScanWeakRefClosure* _par_cl;
  49  protected:
  50   template <class T> void do_oop_work(T* p);
  51  public:


 410   bool take_from_overflow_list(ParScanThreadState* par_scan_state);
 411   bool take_from_overflow_list_work(ParScanThreadState* par_scan_state);
 412 
 413   // The task queues to be used by parallel GC threads.
 414   ObjToScanQueueSet* task_queues() {
 415     return _task_queues;
 416   }
 417 
 418   PLABStats* plab_stats() {
 419     return &_plab_stats;
 420   }
 421 
 422   size_t desired_plab_sz() {
 423     return _plab_stats.desired_plab_sz();
 424   }
 425 
 426   static oop real_forwardee(oop obj);
 427 
 428   DEBUG_ONLY(static bool is_legal_forward_ptr(oop p);)
 429 };
 430 
 431 #endif // SHARE_VM_GC_IMPLEMENTATION_PARNEW_PARNEWGENERATION_HPP