99 |
99 |
100 GenMarkSweep::restore_marks(); |
100 GenMarkSweep::restore_marks(); |
101 BiasedLocking::restore_marks(); |
101 BiasedLocking::restore_marks(); |
102 GenMarkSweep::deallocate_stacks(); |
102 GenMarkSweep::deallocate_stacks(); |
103 |
103 |
104 // "free at last gc" is calculated from these. |
|
105 // CHF: cheating for now!!! |
|
106 // Universe::set_heap_capacity_at_last_gc(Universe::heap()->capacity()); |
|
107 // Universe::set_heap_used_at_last_gc(Universe::heap()->used()); |
|
108 |
|
109 CodeCache::gc_epilogue(); |
104 CodeCache::gc_epilogue(); |
110 JvmtiExport::gc_epilogue(); |
105 JvmtiExport::gc_epilogue(); |
111 |
106 |
112 // refs processing: clean slate |
107 // refs processing: clean slate |
113 GenMarkSweep::_ref_processor = NULL; |
108 GenMarkSweep::_ref_processor = NULL; |
165 |
160 |
166 // Prune dead klasses from subklass/sibling/implementor lists. |
161 // Prune dead klasses from subklass/sibling/implementor lists. |
167 Klass::clean_weak_klass_links(&GenMarkSweep::is_alive); |
162 Klass::clean_weak_klass_links(&GenMarkSweep::is_alive); |
168 |
163 |
169 // Delete entries for dead interned string and clean up unreferenced symbols in symbol table. |
164 // Delete entries for dead interned string and clean up unreferenced symbols in symbol table. |
170 G1CollectedHeap::heap()->unlink_string_and_symbol_table(&GenMarkSweep::is_alive); |
165 g1h->unlink_string_and_symbol_table(&GenMarkSweep::is_alive); |
171 |
166 |
172 if (VerifyDuringGC) { |
167 if (VerifyDuringGC) { |
173 HandleMark hm; // handle scope |
168 HandleMark hm; // handle scope |
174 COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact); |
169 COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact); |
175 Universe::heap()->prepare_for_verify(); |
170 g1h->prepare_for_verify(); |
176 // Note: we can verify only the heap here. When an object is |
171 // Note: we can verify only the heap here. When an object is |
177 // marked, the previous value of the mark word (including |
172 // marked, the previous value of the mark word (including |
178 // identity hash values, ages, etc) is preserved, and the mark |
173 // identity hash values, ages, etc) is preserved, and the mark |
179 // word is set to markOop::marked_value - effectively removing |
174 // word is set to markOop::marked_value - effectively removing |
180 // any hash values from the mark word. These hash values are |
175 // any hash values from the mark word. These hash values are |
184 // (including hash values) are restored to the appropriate |
179 // (including hash values) are restored to the appropriate |
185 // objects. |
180 // objects. |
186 if (!VerifySilently) { |
181 if (!VerifySilently) { |
187 gclog_or_tty->print(" VerifyDuringGC:(full)[Verifying "); |
182 gclog_or_tty->print(" VerifyDuringGC:(full)[Verifying "); |
188 } |
183 } |
189 Universe::heap()->verify(VerifySilently, VerifyOption_G1UseMarkWord); |
184 g1h->verify(VerifySilently, VerifyOption_G1UseMarkWord); |
190 if (!VerifySilently) { |
185 if (!VerifySilently) { |
191 gclog_or_tty->print_cr("]"); |
186 gclog_or_tty->print_cr("]"); |
192 } |
187 } |
193 } |
188 } |
194 |
189 |