Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp @ 13:183f41cf8bfe
6557851: CMS: ergonomics defaults are not set with FLAG_SET_ERGO
Summary: Default values set by cms ergonomics are set with FLAG_SET_DEFAULT so down stream the values look like the default values and affect how later parameters are set. Set these values with FLAG_SET_ERGO instead and adjust how later parameters are interpreted.
Reviewed-by: iveresov, apetrusenko, pbk, ysr
author | jmasa |
---|---|
date | Sun, 02 Mar 2008 16:10:12 -0800 |
parents | a61af66fc99e |
children | fcbfc50865ab |
comparison
equal
deleted
inserted
replaced
12:6432c3bb6240 | 13:183f41cf8bfe |
---|---|
56 HeapWord* allocate_new_tlab(size_t size); | 56 HeapWord* allocate_new_tlab(size_t size); |
57 void fill_all_tlabs(bool retire); | 57 void fill_all_tlabs(bool retire); |
58 | 58 |
59 public: | 59 public: |
60 ParallelScavengeHeap() : CollectedHeap() { | 60 ParallelScavengeHeap() : CollectedHeap() { |
61 set_alignment(_perm_gen_alignment, intra_generation_alignment()); | 61 set_alignment(_perm_gen_alignment, intra_heap_alignment()); |
62 set_alignment(_young_gen_alignment, intra_generation_alignment()); | 62 set_alignment(_young_gen_alignment, intra_heap_alignment()); |
63 set_alignment(_old_gen_alignment, intra_generation_alignment()); | 63 set_alignment(_old_gen_alignment, intra_heap_alignment()); |
64 } | 64 } |
65 | 65 |
66 // For use by VM operations | 66 // For use by VM operations |
67 enum CollectionType { | 67 enum CollectionType { |
68 Scavenge, | 68 Scavenge, |
90 // Returns JNI_OK on success | 90 // Returns JNI_OK on success |
91 virtual jint initialize(); | 91 virtual jint initialize(); |
92 | 92 |
93 void post_initialize(); | 93 void post_initialize(); |
94 void update_counters(); | 94 void update_counters(); |
95 | |
96 // The alignment used for the various generations. | 95 // The alignment used for the various generations. |
97 size_t perm_gen_alignment() const { return _perm_gen_alignment; } | 96 size_t perm_gen_alignment() const { return _perm_gen_alignment; } |
98 size_t young_gen_alignment() const { return _young_gen_alignment; } | 97 size_t young_gen_alignment() const { return _young_gen_alignment; } |
99 size_t old_gen_alignment() const { return _old_gen_alignment; } | 98 size_t old_gen_alignment() const { return _old_gen_alignment; } |
100 | 99 |
101 // The alignment used for eden and survivors within the young gen. | 100 // The alignment used for eden and survivors within the young gen |
102 size_t intra_generation_alignment() const { return 64 * K; } | 101 // and for boundary between young gen and old gen. |
102 size_t intra_heap_alignment() const { return 64 * K; } | |
103 | 103 |
104 size_t capacity() const; | 104 size_t capacity() const; |
105 size_t used() const; | 105 size_t used() const; |
106 | 106 |
107 // Return "true" if all generations (but perm) have reached the | 107 // Return "true" if all generations (but perm) have reached the |
215 }; | 215 }; |
216 | 216 |
217 inline size_t ParallelScavengeHeap::set_alignment(size_t& var, size_t val) | 217 inline size_t ParallelScavengeHeap::set_alignment(size_t& var, size_t val) |
218 { | 218 { |
219 assert(is_power_of_2((intptr_t)val), "must be a power of 2"); | 219 assert(is_power_of_2((intptr_t)val), "must be a power of 2"); |
220 var = round_to(val, intra_generation_alignment()); | 220 var = round_to(val, intra_heap_alignment()); |
221 return var; | 221 return var; |
222 } | 222 } |