< prev index next >

src/share/vm/gc/serial/tenuredGeneration.cpp

Print this page
rev 8362 : 8079792: GC directory structure cleanup
Reviewed-by:


   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/shared/collectorCounters.hpp"
  27 #include "gc_implementation/shared/gcTimer.hpp"







  28 #include "memory/allocation.inline.hpp"
  29 #include "memory/blockOffsetTable.inline.hpp"
  30 #include "memory/cardGeneration.inline.hpp"
  31 #include "memory/generationSpec.hpp"
  32 #include "memory/genMarkSweep.hpp"
  33 #include "memory/genOopClosures.inline.hpp"
  34 #include "memory/space.hpp"
  35 #include "memory/tenuredGeneration.inline.hpp"
  36 #include "oops/oop.inline.hpp"
  37 #include "runtime/java.hpp"
  38 #include "utilities/macros.hpp"
  39 #if INCLUDE_ALL_GCS
  40 #include "gc_implementation/parNew/parOopClosures.hpp"
  41 #endif
  42 
  43 TenuredGeneration::TenuredGeneration(ReservedSpace rs,
  44                                      size_t initial_byte_size, int level,
  45                                      GenRemSet* remset) :
  46   CardGeneration(rs, initial_byte_size, level, remset)
  47 {
  48   HeapWord* bottom = (HeapWord*) _virtual_space.low();
  49   HeapWord* end    = (HeapWord*) _virtual_space.high();
  50   _the_space  = new TenuredSpace(_bts, MemRegion(bottom, end));
  51   _the_space->reset_saved_mark();
  52   _shrink_factor = 0;
  53   _capacity_at_prologue = 0;
  54 
  55   _gc_stats = new GCStats();
  56 
  57   // initialize performance counters
  58 
  59   const char* gen_name = "old";
  60   GenCollectorPolicy* gcp = (GenCollectorPolicy*) GenCollectedHeap::heap()->collector_policy();




   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/serial/genMarkSweep.hpp"
  27 #include "gc/serial/tenuredGeneration.inline.hpp"
  28 #include "gc/shared/blockOffsetTable.inline.hpp"
  29 #include "gc/shared/cardGeneration.inline.hpp"
  30 #include "gc/shared/collectorCounters.hpp"
  31 #include "gc/shared/gcTimer.hpp"
  32 #include "gc/shared/genOopClosures.inline.hpp"
  33 #include "gc/shared/generationSpec.hpp"
  34 #include "gc/shared/space.hpp"
  35 #include "memory/allocation.inline.hpp"







  36 #include "oops/oop.inline.hpp"
  37 #include "runtime/java.hpp"
  38 #include "utilities/macros.hpp"
  39 #if INCLUDE_ALL_GCS
  40 #include "gc/cms/parOopClosures.hpp"
  41 #endif
  42 
  43 TenuredGeneration::TenuredGeneration(ReservedSpace rs,
  44                                      size_t initial_byte_size, int level,
  45                                      GenRemSet* remset) :
  46   CardGeneration(rs, initial_byte_size, level, remset)
  47 {
  48   HeapWord* bottom = (HeapWord*) _virtual_space.low();
  49   HeapWord* end    = (HeapWord*) _virtual_space.high();
  50   _the_space  = new TenuredSpace(_bts, MemRegion(bottom, end));
  51   _the_space->reset_saved_mark();
  52   _shrink_factor = 0;
  53   _capacity_at_prologue = 0;
  54 
  55   _gc_stats = new GCStats();
  56 
  57   // initialize performance counters
  58 
  59   const char* gen_name = "old";
  60   GenCollectorPolicy* gcp = (GenCollectorPolicy*) GenCollectedHeap::heap()->collector_policy();


< prev index next >