Mercurial > hg > graal-jvmci-8
diff src/share/vm/gc_implementation/parallelScavenge/generationSizer.hpp @ 13060:8f07aa079343
8016309: assert(eden_size > 0 && survivor_size > 0) failed: just checking
7057939: jmap shows MaxNewSize=4GB when Java is using parallel collector
Summary: Major cleanup of the collectorpolicy classes
Reviewed-by: tschatzl, jcoomes
author | jwilhelm |
---|---|
date | Fri, 01 Nov 2013 17:09:38 +0100 |
parents | c49c7f835e8d |
children |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/parallelScavenge/generationSizer.hpp Mon Oct 21 18:56:20 2013 +0200 +++ b/src/share/vm/gc_implementation/parallelScavenge/generationSizer.hpp Fri Nov 01 17:09:38 2013 +0100 @@ -31,41 +31,17 @@ // TwoGenerationCollectorPolicy. Lets reuse it! class GenerationSizer : public TwoGenerationCollectorPolicy { - public: - GenerationSizer() { - // Partial init only! - initialize_flags(); - initialize_size_info(); - } + private: - void initialize_flags() { - // Do basic sizing work - TwoGenerationCollectorPolicy::initialize_flags(); + void trace_gen_sizes(const char* const str); - assert(UseSerialGC || - !FLAG_IS_DEFAULT(ParallelGCThreads) || - (ParallelGCThreads > 0), - "ParallelGCThreads should be set before flag initialization"); + // The alignment used for boundary between young gen and old gen + static size_t default_gen_alignment() { return 64 * K * HeapWordSize; } - // The survivor ratio's are calculated "raw", unlike the - // default gc, which adds 2 to the ratio value. We need to - // make sure the values are valid before using them. - if (MinSurvivorRatio < 3) { - MinSurvivorRatio = 3; - } + protected: - if (InitialSurvivorRatio < 3) { - InitialSurvivorRatio = 3; - } - } - - size_t min_young_gen_size() { return _min_gen0_size; } - size_t young_gen_size() { return _initial_gen0_size; } - size_t max_young_gen_size() { return _max_gen0_size; } - - size_t min_old_gen_size() { return _min_gen1_size; } - size_t old_gen_size() { return _initial_gen1_size; } - size_t max_old_gen_size() { return _max_gen1_size; } + void initialize_alignments(); + void initialize_flags(); + void initialize_size_info(); }; - #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_GENERATIONSIZER_HPP