comparison src/share/vm/gc_implementation/parallelScavenge/asPSYoungGen.cpp @ 5649:46d7652b223c

8026853: Prepare GC code for collector policy regression fix Summary: Cleanup related to the NewSize and MaxNewSize bugs Reviewed-by: tschatzl, jcoomes, ehelin
author jwilhelm
date Mon, 21 Oct 2013 18:56:20 +0200
parents f95d63e2154a
children 8f07aa079343
comparison
equal deleted inserted replaced
7:c59a9483253a 8:ac264e2e7a2d
68 initialize_virtual_space(rs, alignment); 68 initialize_virtual_space(rs, alignment);
69 initialize_work(); 69 initialize_work();
70 } 70 }
71 71
72 size_t ASPSYoungGen::available_for_expansion() { 72 size_t ASPSYoungGen::available_for_expansion() {
73
74 size_t current_committed_size = virtual_space()->committed_size(); 73 size_t current_committed_size = virtual_space()->committed_size();
75 assert((gen_size_limit() >= current_committed_size), 74 assert((gen_size_limit() >= current_committed_size),
76 "generation size limit is wrong"); 75 "generation size limit is wrong");
77 ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap(); 76 ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
78 size_t result = gen_size_limit() - current_committed_size; 77 size_t result = gen_size_limit() - current_committed_size;
83 // Return the number of bytes the young gen is willing give up. 82 // Return the number of bytes the young gen is willing give up.
84 // 83 //
85 // Future implementations could check the survivors and if to_space is in the 84 // Future implementations could check the survivors and if to_space is in the
86 // right place (below from_space), take a chunk from to_space. 85 // right place (below from_space), take a chunk from to_space.
87 size_t ASPSYoungGen::available_for_contraction() { 86 size_t ASPSYoungGen::available_for_contraction() {
88
89 size_t uncommitted_bytes = virtual_space()->uncommitted_size(); 87 size_t uncommitted_bytes = virtual_space()->uncommitted_size();
90 if (uncommitted_bytes != 0) { 88 if (uncommitted_bytes != 0) {
91 return uncommitted_bytes; 89 return uncommitted_bytes;
92 } 90 }
93 91
119 gclog_or_tty->print_cr(" max_contraction %d K", max_contraction/K); 117 gclog_or_tty->print_cr(" max_contraction %d K", max_contraction/K);
120 gclog_or_tty->print_cr(" eden_avail %d K", eden_avail/K); 118 gclog_or_tty->print_cr(" eden_avail %d K", eden_avail/K);
121 gclog_or_tty->print_cr(" gen_avail %d K", gen_avail/K); 119 gclog_or_tty->print_cr(" gen_avail %d K", gen_avail/K);
122 } 120 }
123 return result_aligned; 121 return result_aligned;
124
125 } 122 }
126 123
127 return 0; 124 return 0;
128 } 125 }
129 126