Mercurial > hg > graal-jvmci-8
comparison 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 |
comparison
equal
deleted
inserted
replaced
13059:46d7652b223c | 13060:8f07aa079343 |
---|---|
29 | 29 |
30 // There is a nice batch of tested generation sizing code in | 30 // There is a nice batch of tested generation sizing code in |
31 // TwoGenerationCollectorPolicy. Lets reuse it! | 31 // TwoGenerationCollectorPolicy. Lets reuse it! |
32 | 32 |
33 class GenerationSizer : public TwoGenerationCollectorPolicy { | 33 class GenerationSizer : public TwoGenerationCollectorPolicy { |
34 public: | 34 private: |
35 GenerationSizer() { | |
36 // Partial init only! | |
37 initialize_flags(); | |
38 initialize_size_info(); | |
39 } | |
40 | 35 |
41 void initialize_flags() { | 36 void trace_gen_sizes(const char* const str); |
42 // Do basic sizing work | |
43 TwoGenerationCollectorPolicy::initialize_flags(); | |
44 | 37 |
45 assert(UseSerialGC || | 38 // The alignment used for boundary between young gen and old gen |
46 !FLAG_IS_DEFAULT(ParallelGCThreads) || | 39 static size_t default_gen_alignment() { return 64 * K * HeapWordSize; } |
47 (ParallelGCThreads > 0), | |
48 "ParallelGCThreads should be set before flag initialization"); | |
49 | 40 |
50 // The survivor ratio's are calculated "raw", unlike the | 41 protected: |
51 // default gc, which adds 2 to the ratio value. We need to | |
52 // make sure the values are valid before using them. | |
53 if (MinSurvivorRatio < 3) { | |
54 MinSurvivorRatio = 3; | |
55 } | |
56 | 42 |
57 if (InitialSurvivorRatio < 3) { | 43 void initialize_alignments(); |
58 InitialSurvivorRatio = 3; | 44 void initialize_flags(); |
59 } | 45 void initialize_size_info(); |
60 } | |
61 | |
62 size_t min_young_gen_size() { return _min_gen0_size; } | |
63 size_t young_gen_size() { return _initial_gen0_size; } | |
64 size_t max_young_gen_size() { return _max_gen0_size; } | |
65 | |
66 size_t min_old_gen_size() { return _min_gen1_size; } | |
67 size_t old_gen_size() { return _initial_gen1_size; } | |
68 size_t max_old_gen_size() { return _max_gen1_size; } | |
69 }; | 46 }; |
70 | |
71 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_GENERATIONSIZER_HPP | 47 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_GENERATIONSIZER_HPP |