src/share/vm/gc_implementation/parallelScavenge/psOldGen.hpp

Print this page


   1 /*
   2  * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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 PSMarkSweepDecorator;
  26 
  27 class PSOldGen : public CHeapObj {
  28   friend class VMStructs;
  29   friend class PSPromotionManager; // Uses the cas_allocate methods
  30   friend class ParallelScavengeHeap;
  31   friend class AdjoiningGenerations;
  32 
  33  protected:
  34   MemRegion                _reserved;          // Used for simple containment tests
  35   PSVirtualSpace*          _virtual_space;     // Controls mapping and unmapping of virtual mem
  36   ObjectStartArray         _start_array;       // Keeps track of where objects start in a 512b block
  37   MutableSpace*            _object_space;      // Where all the objects live
  38   PSMarkSweepDecorator*    _object_mark_sweep; // The mark sweep view of _object_space
  39   const char* const        _name;              // Name of this generation.
  40 
  41   // Performance Counters
  42   PSGenerationCounters*    _gen_counters;
  43   SpaceCounters*           _space_counters;
  44 


 173 
 174   // These should not used
 175   virtual void reset_after_change();
 176 
 177   // These should not used
 178   virtual size_t available_for_expansion();
 179   virtual size_t available_for_contraction();
 180 
 181   void space_invariants() PRODUCT_RETURN;
 182 
 183   // Performace Counter support
 184   void update_counters();
 185 
 186   // Printing support
 187   virtual const char* name() const { return _name; }
 188 
 189   // Debugging support
 190   // Save the tops of all spaces for later use during mangling.
 191   void record_spaces_top() PRODUCT_RETURN;
 192 };


   1 /*
   2  * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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_PARALLELSCAVENGE_PSOLDGEN_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSOLDGEN_HPP
  27 
  28 #include "gc_implementation/parallelScavenge/objectStartArray.hpp"
  29 #include "gc_implementation/parallelScavenge/psGenerationCounters.hpp"
  30 #include "gc_implementation/parallelScavenge/psVirtualspace.hpp"
  31 #include "gc_implementation/shared/mutableSpace.hpp"
  32 #include "gc_implementation/shared/spaceCounters.hpp"
  33 #include "runtime/safepoint.hpp"
  34 
  35 class PSMarkSweepDecorator;
  36 
  37 class PSOldGen : public CHeapObj {
  38   friend class VMStructs;
  39   friend class PSPromotionManager; // Uses the cas_allocate methods
  40   friend class ParallelScavengeHeap;
  41   friend class AdjoiningGenerations;
  42 
  43  protected:
  44   MemRegion                _reserved;          // Used for simple containment tests
  45   PSVirtualSpace*          _virtual_space;     // Controls mapping and unmapping of virtual mem
  46   ObjectStartArray         _start_array;       // Keeps track of where objects start in a 512b block
  47   MutableSpace*            _object_space;      // Where all the objects live
  48   PSMarkSweepDecorator*    _object_mark_sweep; // The mark sweep view of _object_space
  49   const char* const        _name;              // Name of this generation.
  50 
  51   // Performance Counters
  52   PSGenerationCounters*    _gen_counters;
  53   SpaceCounters*           _space_counters;
  54 


 183 
 184   // These should not used
 185   virtual void reset_after_change();
 186 
 187   // These should not used
 188   virtual size_t available_for_expansion();
 189   virtual size_t available_for_contraction();
 190 
 191   void space_invariants() PRODUCT_RETURN;
 192 
 193   // Performace Counter support
 194   void update_counters();
 195 
 196   // Printing support
 197   virtual const char* name() const { return _name; }
 198 
 199   // Debugging support
 200   // Save the tops of all spaces for later use during mangling.
 201   void record_spaces_top() PRODUCT_RETURN;
 202 };
 203 
 204 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSOLDGEN_HPP