src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.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/_parallelScavengeHeap.cpp.incl"
















  27 
  28 PSYoungGen*  ParallelScavengeHeap::_young_gen = NULL;
  29 PSOldGen*    ParallelScavengeHeap::_old_gen = NULL;
  30 PSPermGen*   ParallelScavengeHeap::_perm_gen = NULL;
  31 PSAdaptiveSizePolicy* ParallelScavengeHeap::_size_policy = NULL;
  32 PSGCAdaptivePolicyCounters* ParallelScavengeHeap::_gc_policy_counters = NULL;
  33 ParallelScavengeHeap* ParallelScavengeHeap::_psh = NULL;
  34 GCTaskManager* ParallelScavengeHeap::_gc_task_manager = NULL;
  35 
  36 static void trace_gen_sizes(const char* const str,
  37                             size_t pg_min, size_t pg_max,
  38                             size_t og_min, size_t og_max,
  39                             size_t yg_min, size_t yg_max)
  40 {
  41   if (TracePageSizes) {
  42     tty->print_cr("%s:  " SIZE_FORMAT "," SIZE_FORMAT " "
  43                   SIZE_FORMAT "," SIZE_FORMAT " "
  44                   SIZE_FORMAT "," SIZE_FORMAT " "
  45                   SIZE_FORMAT,
  46                   str, pg_min / K, pg_max / K,




   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/adjoiningGenerations.hpp"
  27 #include "gc_implementation/parallelScavenge/adjoiningVirtualSpaces.hpp"
  28 #include "gc_implementation/parallelScavenge/cardTableExtension.hpp"
  29 #include "gc_implementation/parallelScavenge/gcTaskManager.hpp"
  30 #include "gc_implementation/parallelScavenge/generationSizer.hpp"
  31 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.inline.hpp"
  32 #include "gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp"
  33 #include "gc_implementation/parallelScavenge/psMarkSweep.hpp"
  34 #include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
  35 #include "gc_implementation/parallelScavenge/psPromotionManager.hpp"
  36 #include "gc_implementation/parallelScavenge/psScavenge.hpp"
  37 #include "gc_implementation/parallelScavenge/vmPSOperations.hpp"
  38 #include "memory/gcLocker.inline.hpp"
  39 #include "oops/oop.inline.hpp"
  40 #include "runtime/handles.inline.hpp"
  41 #include "runtime/java.hpp"
  42 #include "runtime/vmThread.hpp"
  43 
  44 PSYoungGen*  ParallelScavengeHeap::_young_gen = NULL;
  45 PSOldGen*    ParallelScavengeHeap::_old_gen = NULL;
  46 PSPermGen*   ParallelScavengeHeap::_perm_gen = NULL;
  47 PSAdaptiveSizePolicy* ParallelScavengeHeap::_size_policy = NULL;
  48 PSGCAdaptivePolicyCounters* ParallelScavengeHeap::_gc_policy_counters = NULL;
  49 ParallelScavengeHeap* ParallelScavengeHeap::_psh = NULL;
  50 GCTaskManager* ParallelScavengeHeap::_gc_task_manager = NULL;
  51 
  52 static void trace_gen_sizes(const char* const str,
  53                             size_t pg_min, size_t pg_max,
  54                             size_t og_min, size_t og_max,
  55                             size_t yg_min, size_t yg_max)
  56 {
  57   if (TracePageSizes) {
  58     tty->print_cr("%s:  " SIZE_FORMAT "," SIZE_FORMAT " "
  59                   SIZE_FORMAT "," SIZE_FORMAT " "
  60                   SIZE_FORMAT "," SIZE_FORMAT " "
  61                   SIZE_FORMAT,
  62                   str, pg_min / K, pg_max / K,