src/share/vm/gc_implementation/parallelScavenge/psScavenge.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 
  26 # include "incls/_precompiled.incl"
  27 # include "incls/_psScavenge.cpp.incl"
  28 
  29 HeapWord*                  PSScavenge::_to_space_top_before_gc = NULL;
  30 int                        PSScavenge::_consecutive_skipped_scavenges = 0;
  31 ReferenceProcessor*        PSScavenge::_ref_processor = NULL;
  32 CardTableExtension*        PSScavenge::_card_table = NULL;
  33 bool                       PSScavenge::_survivor_overflow = false;
  34 int                        PSScavenge::_tenuring_threshold = 0;
  35 HeapWord*                  PSScavenge::_young_generation_boundary = NULL;
  36 elapsedTimer               PSScavenge::_accumulated_time;
  37 Stack<markOop>             PSScavenge::_preserved_mark_stack;
  38 Stack<oop>                 PSScavenge::_preserved_oop_stack;
  39 CollectorCounters*         PSScavenge::_counters = NULL;
  40 bool                       PSScavenge::_promotion_failed = false;
  41 
  42 // Define before use
  43 class PSIsAliveClosure: public BoolObjectClosure {
  44 public:
  45   void do_object(oop p) {
  46     assert(false, "Do not call.");
  47   }




   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/parallelScavenge/cardTableExtension.hpp"
  27 #include "gc_implementation/parallelScavenge/gcTaskManager.hpp"
  28 #include "gc_implementation/parallelScavenge/generationSizer.hpp"
  29 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
  30 #include "gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp"
  31 #include "gc_implementation/parallelScavenge/psMarkSweep.hpp"
  32 #include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
  33 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
  34 #include "gc_implementation/parallelScavenge/psTasks.hpp"
  35 #include "gc_implementation/shared/isGCActiveMark.hpp"
  36 #include "gc_implementation/shared/spaceDecorator.hpp"
  37 #include "gc_interface/gcCause.hpp"
  38 #include "memory/collectorPolicy.hpp"
  39 #include "memory/gcLocker.inline.hpp"
  40 #include "memory/referencePolicy.hpp"
  41 #include "memory/referenceProcessor.hpp"
  42 #include "memory/resourceArea.hpp"
  43 #include "oops/oop.inline.hpp"
  44 #include "oops/oop.psgc.inline.hpp"
  45 #include "runtime/biasedLocking.hpp"
  46 #include "runtime/fprofiler.hpp"
  47 #include "runtime/handles.inline.hpp"
  48 #include "runtime/threadCritical.hpp"
  49 #include "runtime/vmThread.hpp"
  50 #include "runtime/vm_operations.hpp"
  51 #include "services/memoryService.hpp"
  52 #include "utilities/stack.inline.hpp"
  53 


  54 
  55 HeapWord*                  PSScavenge::_to_space_top_before_gc = NULL;
  56 int                        PSScavenge::_consecutive_skipped_scavenges = 0;
  57 ReferenceProcessor*        PSScavenge::_ref_processor = NULL;
  58 CardTableExtension*        PSScavenge::_card_table = NULL;
  59 bool                       PSScavenge::_survivor_overflow = false;
  60 int                        PSScavenge::_tenuring_threshold = 0;
  61 HeapWord*                  PSScavenge::_young_generation_boundary = NULL;
  62 elapsedTimer               PSScavenge::_accumulated_time;
  63 Stack<markOop>             PSScavenge::_preserved_mark_stack;
  64 Stack<oop>                 PSScavenge::_preserved_oop_stack;
  65 CollectorCounters*         PSScavenge::_counters = NULL;
  66 bool                       PSScavenge::_promotion_failed = false;
  67 
  68 // Define before use
  69 class PSIsAliveClosure: public BoolObjectClosure {
  70 public:
  71   void do_object(oop p) {
  72     assert(false, "Do not call.");
  73   }