comparison src/share/vm/gc_implementation/parallelScavenge/asPSYoungGen.cpp @ 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 d1605aabd0a1 12eea04c8b06
comparison
equal deleted inserted replaced
12:6432c3bb6240 13:183f41cf8bfe
84 } 84 }
85 85
86 if (eden_space()->is_empty()) { 86 if (eden_space()->is_empty()) {
87 // Respect the minimum size for eden and for the young gen as a whole. 87 // Respect the minimum size for eden and for the young gen as a whole.
88 ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap(); 88 ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
89 const size_t eden_alignment = heap->intra_generation_alignment(); 89 const size_t eden_alignment = heap->intra_heap_alignment();
90 const size_t gen_alignment = heap->young_gen_alignment(); 90 const size_t gen_alignment = heap->young_gen_alignment();
91 91
92 assert(eden_space()->capacity_in_bytes() >= eden_alignment, 92 assert(eden_space()->capacity_in_bytes() >= eden_alignment,
93 "Alignment is wrong"); 93 "Alignment is wrong");
94 size_t eden_avail = eden_space()->capacity_in_bytes() - eden_alignment; 94 size_t eden_avail = eden_space()->capacity_in_bytes() - eden_alignment;
122 // The current implementation only considers to the end of eden. 122 // The current implementation only considers to the end of eden.
123 // If to_space is below from_space, to_space is not considered. 123 // If to_space is below from_space, to_space is not considered.
124 // to_space can be. 124 // to_space can be.
125 size_t ASPSYoungGen::available_to_live() { 125 size_t ASPSYoungGen::available_to_live() {
126 ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap(); 126 ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
127 const size_t alignment = heap->intra_generation_alignment(); 127 const size_t alignment = heap->intra_heap_alignment();
128 128
129 // Include any space that is committed but is not in eden. 129 // Include any space that is committed but is not in eden.
130 size_t available = pointer_delta(eden_space()->bottom(), 130 size_t available = pointer_delta(eden_space()->bottom(),
131 virtual_space()->low(), 131 virtual_space()->low(),
132 sizeof(char)); 132 sizeof(char));
273 char* to_end = (char*)to_space()->end(); 273 char* to_end = (char*)to_space()->end();
274 274
275 assert(eden_start < from_start, "Cannot push into from_space"); 275 assert(eden_start < from_start, "Cannot push into from_space");
276 276
277 ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap(); 277 ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
278 const size_t alignment = heap->intra_generation_alignment(); 278 const size_t alignment = heap->intra_heap_alignment();
279 279
280 // Check whether from space is below to space 280 // Check whether from space is below to space
281 if (from_start < to_start) { 281 if (from_start < to_start) {
282 // Eden, from, to 282 // Eden, from, to
283 if (PrintAdaptiveSizePolicy && Verbose) { 283 if (PrintAdaptiveSizePolicy && Verbose) {