< prev index next >
src/hotspot/share/gc/shared/generationSpec.cpp
Print this page
rev 47957 : 8191564: Refactor GC related servicability code into GC specific subclasses
*** 1,7 ****
/*
! * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 34,54 ****
#if INCLUDE_ALL_GCS
#include "gc/cms/concurrentMarkSweepGeneration.hpp"
#include "gc/cms/parNewGeneration.hpp"
#endif // INCLUDE_ALL_GCS
! Generation* GenerationSpec::init(ReservedSpace rs, CardTableRS* remset) {
switch (name()) {
case Generation::DefNew:
! return new DefNewGeneration(rs, init_size());
case Generation::MarkSweepCompact:
! return new TenuredGeneration(rs, init_size(), remset);
#if INCLUDE_ALL_GCS
case Generation::ParNew:
! return new ParNewGeneration(rs, init_size());
case Generation::ConcurrentMarkSweep: {
assert(UseConcMarkSweepGC, "UseConcMarkSweepGC should be set");
if (remset == NULL) {
vm_exit_during_initialization("Rem set incompatibility.");
--- 34,54 ----
#if INCLUDE_ALL_GCS
#include "gc/cms/concurrentMarkSweepGeneration.hpp"
#include "gc/cms/parNewGeneration.hpp"
#endif // INCLUDE_ALL_GCS
! Generation* GenerationSpec::init(ReservedSpace rs, CardTableRS* remset, GCMemoryManager* mem_mgr) {
switch (name()) {
case Generation::DefNew:
! return new DefNewGeneration(rs, init_size(), mem_mgr);
case Generation::MarkSweepCompact:
! return new TenuredGeneration(rs, init_size(), mem_mgr, remset);
#if INCLUDE_ALL_GCS
case Generation::ParNew:
! return new ParNewGeneration(rs, init_size(), mem_mgr);
case Generation::ConcurrentMarkSweep: {
assert(UseConcMarkSweepGC, "UseConcMarkSweepGC should be set");
if (remset == NULL) {
vm_exit_during_initialization("Rem set incompatibility.");
*** 56,66 ****
// Otherwise
// The constructor creates the CMSCollector if needed,
// else registers with an existing CMSCollector
ConcurrentMarkSweepGeneration* g = NULL;
! g = new ConcurrentMarkSweepGeneration(rs, init_size(), remset);
g->initialize_performance_counters();
return g;
}
--- 56,66 ----
// Otherwise
// The constructor creates the CMSCollector if needed,
// else registers with an existing CMSCollector
ConcurrentMarkSweepGeneration* g = NULL;
! g = new ConcurrentMarkSweepGeneration(rs, init_size(), mem_mgr, remset);
g->initialize_performance_counters();
return g;
}
< prev index next >