253 JvmtiExport::gc_epilogue();
254
255 COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
256
257 ref_processor()->enqueue_discovered_references(NULL);
258
259 // Update time of last GC
260 reset_millis_since_last_gc();
261
262 // Let the size policy know we're done
263 size_policy->major_collection_end(old_gen->used_in_bytes(), gc_cause);
264
265 if (UseAdaptiveSizePolicy) {
266
267 if (PrintAdaptiveSizePolicy) {
268 gclog_or_tty->print("AdaptiveSizeStart: ");
269 gclog_or_tty->stamp();
270 gclog_or_tty->print_cr(" collection: %d ",
271 heap->total_collections());
272 if (Verbose) {
273 gclog_or_tty->print("old_gen_capacity: %d young_gen_capacity: %d",
274 old_gen->capacity_in_bytes(), young_gen->capacity_in_bytes());
275 }
276 }
277
278 // Don't check if the size_policy is ready here. Let
279 // the size_policy check that internally.
280 if (UseAdaptiveGenerationSizePolicyAtMajorCollection &&
281 ((gc_cause != GCCause::_java_lang_system_gc) ||
282 UseAdaptiveSizePolicyWithSystemGC)) {
283 // Swap the survivor spaces if from_space is empty. The
284 // resize_young_gen() called below is normally used after
285 // a successful young GC and swapping of survivor spaces;
286 // otherwise, it will fail to resize the young gen with
287 // the current implementation.
288 if (young_gen->from_space()->is_empty()) {
289 young_gen->from_space()->clear(SpaceDecorator::Mangle);
290 young_gen->swap_spaces();
291 }
292
293 // Calculate optimal free space amounts
|
253 JvmtiExport::gc_epilogue();
254
255 COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
256
257 ref_processor()->enqueue_discovered_references(NULL);
258
259 // Update time of last GC
260 reset_millis_since_last_gc();
261
262 // Let the size policy know we're done
263 size_policy->major_collection_end(old_gen->used_in_bytes(), gc_cause);
264
265 if (UseAdaptiveSizePolicy) {
266
267 if (PrintAdaptiveSizePolicy) {
268 gclog_or_tty->print("AdaptiveSizeStart: ");
269 gclog_or_tty->stamp();
270 gclog_or_tty->print_cr(" collection: %d ",
271 heap->total_collections());
272 if (Verbose) {
273 gclog_or_tty->print("old_gen_capacity: " SIZE_FORMAT
274 " young_gen_capacity: " SIZE_FORMAT,
275 old_gen->capacity_in_bytes(), young_gen->capacity_in_bytes());
276 }
277 }
278
279 // Don't check if the size_policy is ready here. Let
280 // the size_policy check that internally.
281 if (UseAdaptiveGenerationSizePolicyAtMajorCollection &&
282 ((gc_cause != GCCause::_java_lang_system_gc) ||
283 UseAdaptiveSizePolicyWithSystemGC)) {
284 // Swap the survivor spaces if from_space is empty. The
285 // resize_young_gen() called below is normally used after
286 // a successful young GC and swapping of survivor spaces;
287 // otherwise, it will fail to resize the young gen with
288 // the current implementation.
289 if (young_gen->from_space()->is_empty()) {
290 young_gen->from_space()->clear(SpaceDecorator::Mangle);
291 young_gen->swap_spaces();
292 }
293
294 // Calculate optimal free space amounts
|