src/share/vm/gc_implementation/parNew/parNewGeneration.cpp

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 # include "incls/_precompiled.incl"
  26 # include "incls/_parNewGeneration.cpp.incl"

























  27 
  28 #ifdef _MSC_VER
  29 #pragma warning( push )
  30 #pragma warning( disable:4355 ) // 'this' : used in base member initializer list
  31 #endif
  32 ParScanThreadState::ParScanThreadState(Space* to_space_,
  33                                        ParNewGeneration* gen_,
  34                                        Generation* old_gen_,
  35                                        int thread_num_,
  36                                        ObjToScanQueueSet* work_queue_set_,
  37                                        Stack<oop>* overflow_stacks_,
  38                                        size_t desired_plab_sz_,
  39                                        ParallelTaskTerminator& term_) :
  40   _to_space(to_space_), _old_gen(old_gen_), _young_gen(gen_), _thread_num(thread_num_),
  41   _work_queue(work_queue_set_->queue(thread_num_)), _to_space_full(false),
  42   _overflow_stack(overflow_stacks_ ? overflow_stacks_ + thread_num_ : NULL),
  43   _ageTable(false), // false ==> not the global age table, no perf data.
  44   _to_space_alloc_buffer(desired_plab_sz_),
  45   _to_space_closure(gen_, this), _old_gen_closure(gen_, this),
  46   _to_space_root_closure(gen_, this), _old_gen_root_closure(gen_, this),




   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 #include "precompiled.hpp"
  26 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp"
  27 #include "gc_implementation/parNew/parGCAllocBuffer.hpp"
  28 #include "gc_implementation/parNew/parNewGeneration.hpp"
  29 #include "gc_implementation/parNew/parOopClosures.inline.hpp"
  30 #include "gc_implementation/shared/adaptiveSizePolicy.hpp"
  31 #include "gc_implementation/shared/ageTable.hpp"
  32 #include "gc_implementation/shared/spaceDecorator.hpp"
  33 #include "memory/defNewGeneration.inline.hpp"
  34 #include "memory/genCollectedHeap.hpp"
  35 #include "memory/genOopClosures.inline.hpp"
  36 #include "memory/generation.hpp"
  37 #include "memory/generation.inline.hpp"
  38 #include "memory/referencePolicy.hpp"
  39 #include "memory/resourceArea.hpp"
  40 #include "memory/sharedHeap.hpp"
  41 #include "memory/space.hpp"
  42 #include "oops/objArrayOop.hpp"
  43 #include "oops/oop.inline.hpp"
  44 #include "oops/oop.pcgc.inline.hpp"
  45 #include "runtime/handles.hpp"
  46 #include "runtime/handles.inline.hpp"
  47 #include "runtime/java.hpp"
  48 #include "runtime/thread.hpp"
  49 #include "utilities/copy.hpp"
  50 #include "utilities/globalDefinitions.hpp"
  51 #include "utilities/workgroup.hpp"
  52 
  53 #ifdef _MSC_VER
  54 #pragma warning( push )
  55 #pragma warning( disable:4355 ) // 'this' : used in base member initializer list
  56 #endif
  57 ParScanThreadState::ParScanThreadState(Space* to_space_,
  58                                        ParNewGeneration* gen_,
  59                                        Generation* old_gen_,
  60                                        int thread_num_,
  61                                        ObjToScanQueueSet* work_queue_set_,
  62                                        Stack<oop>* overflow_stacks_,
  63                                        size_t desired_plab_sz_,
  64                                        ParallelTaskTerminator& term_) :
  65   _to_space(to_space_), _old_gen(old_gen_), _young_gen(gen_), _thread_num(thread_num_),
  66   _work_queue(work_queue_set_->queue(thread_num_)), _to_space_full(false),
  67   _overflow_stack(overflow_stacks_ ? overflow_stacks_ + thread_num_ : NULL),
  68   _ageTable(false), // false ==> not the global age table, no perf data.
  69   _to_space_alloc_buffer(desired_plab_sz_),
  70   _to_space_closure(gen_, this), _old_gen_closure(gen_, this),
  71   _to_space_root_closure(gen_, this), _old_gen_root_closure(gen_, this),