src/hotspot/share/gc/shared/generationSpec.cpp
changeset 49982 9042ffe5b7fe
parent 47216 71c04702a3d5
child 54678 93f09ca4a7f8
equal deleted inserted replaced
49981:bd0a95bec96b 49982:9042ffe5b7fe
    21  * questions.
    21  * questions.
    22  *
    22  *
    23  */
    23  */
    24 
    24 
    25 #include "precompiled.hpp"
    25 #include "precompiled.hpp"
    26 #include "gc/serial/defNewGeneration.hpp"
       
    27 #include "gc/serial/tenuredGeneration.hpp"
       
    28 #include "gc/shared/cardTableRS.hpp"
    26 #include "gc/shared/cardTableRS.hpp"
    29 #include "gc/shared/generationSpec.hpp"
    27 #include "gc/shared/generationSpec.hpp"
    30 #include "memory/binaryTreeDictionary.hpp"
    28 #include "memory/binaryTreeDictionary.hpp"
    31 #include "memory/filemap.hpp"
    29 #include "memory/filemap.hpp"
    32 #include "runtime/java.hpp"
    30 #include "runtime/java.hpp"
    33 #include "utilities/macros.hpp"
    31 #include "utilities/macros.hpp"
    34 #if INCLUDE_ALL_GCS
    32 #if INCLUDE_CMSGC
    35 #include "gc/cms/concurrentMarkSweepGeneration.hpp"
    33 #include "gc/cms/concurrentMarkSweepGeneration.hpp"
    36 #include "gc/cms/parNewGeneration.hpp"
    34 #include "gc/cms/parNewGeneration.hpp"
    37 #endif // INCLUDE_ALL_GCS
    35 #endif
       
    36 #if INCLUDE_SERIALGC
       
    37 #include "gc/serial/defNewGeneration.hpp"
       
    38 #include "gc/serial/tenuredGeneration.hpp"
       
    39 #endif
    38 
    40 
    39 Generation* GenerationSpec::init(ReservedSpace rs, CardTableRS* remset) {
    41 Generation* GenerationSpec::init(ReservedSpace rs, CardTableRS* remset) {
    40   switch (name()) {
    42   switch (name()) {
       
    43 #if INCLUDE_SERIALGC
    41     case Generation::DefNew:
    44     case Generation::DefNew:
    42       return new DefNewGeneration(rs, init_size());
    45       return new DefNewGeneration(rs, init_size());
    43 
    46 
    44     case Generation::MarkSweepCompact:
    47     case Generation::MarkSweepCompact:
    45       return new TenuredGeneration(rs, init_size(), remset);
    48       return new TenuredGeneration(rs, init_size(), remset);
       
    49 #endif
    46 
    50 
    47 #if INCLUDE_ALL_GCS
    51 #if INCLUDE_CMSGC
    48     case Generation::ParNew:
    52     case Generation::ParNew:
    49       return new ParNewGeneration(rs, init_size());
    53       return new ParNewGeneration(rs, init_size());
    50 
    54 
    51     case Generation::ConcurrentMarkSweep: {
    55     case Generation::ConcurrentMarkSweep: {
    52       assert(UseConcMarkSweepGC, "UseConcMarkSweepGC should be set");
    56       assert(UseConcMarkSweepGC, "UseConcMarkSweepGC should be set");
    62 
    66 
    63       g->initialize_performance_counters();
    67       g->initialize_performance_counters();
    64 
    68 
    65       return g;
    69       return g;
    66     }
    70     }
    67 #endif // INCLUDE_ALL_GCS
    71 #endif // INCLUDE_CMSGC
    68 
    72 
    69     default:
    73     default:
    70       guarantee(false, "unrecognized GenerationName");
    74       guarantee(false, "unrecognized GenerationName");
    71       return NULL;
    75       return NULL;
    72   }
    76   }