415 PSKeepAliveClosure keep_alive(promotion_manager);
416 PSEvacuateFollowersClosure evac_followers(promotion_manager);
417 ReferenceProcessorStats stats;
418 if (reference_processor()->processing_is_mt()) {
419 PSRefProcTaskExecutor task_executor;
420 stats = reference_processor()->process_discovered_references(
421 &_is_alive_closure, &keep_alive, &evac_followers, &task_executor,
422 &_gc_timer);
423 } else {
424 stats = reference_processor()->process_discovered_references(
425 &_is_alive_closure, &keep_alive, &evac_followers, NULL, &_gc_timer);
426 }
427
428 _gc_tracer.report_gc_reference_stats(stats);
429
430 // Enqueue reference objects discovered during scavenge.
431 if (reference_processor()->processing_is_mt()) {
432 PSRefProcTaskExecutor task_executor;
433 reference_processor()->enqueue_discovered_references(&task_executor, &_gc_timer);
434 } else {
435 reference_processor()->enqueue_discovered_references(NULL);
436 }
437 }
438
439 {
440 GCTraceTime(Debug, gc, phases) tm("Scrub String Table", &_gc_timer);
441 // Unlink any dead interned Strings and process the remaining live ones.
442 PSScavengeRootsClosure root_closure(promotion_manager);
443 StringTable::unlink_or_oops_do(&_is_alive_closure, &root_closure);
444 }
445
446 // Finally, flush the promotion_manager's labs, and deallocate its stacks.
447 promotion_failure_occurred = PSPromotionManager::post_scavenge(_gc_tracer);
448 if (promotion_failure_occurred) {
449 clean_up_failed_promotion();
450 log_info(gc, promotion)("Promotion failed");
451 }
452
453 _gc_tracer.report_tenuring_threshold(tenuring_threshold());
454
455 // Let the size policy know we're done. Note that we count promotion
|
415 PSKeepAliveClosure keep_alive(promotion_manager);
416 PSEvacuateFollowersClosure evac_followers(promotion_manager);
417 ReferenceProcessorStats stats;
418 if (reference_processor()->processing_is_mt()) {
419 PSRefProcTaskExecutor task_executor;
420 stats = reference_processor()->process_discovered_references(
421 &_is_alive_closure, &keep_alive, &evac_followers, &task_executor,
422 &_gc_timer);
423 } else {
424 stats = reference_processor()->process_discovered_references(
425 &_is_alive_closure, &keep_alive, &evac_followers, NULL, &_gc_timer);
426 }
427
428 _gc_tracer.report_gc_reference_stats(stats);
429
430 // Enqueue reference objects discovered during scavenge.
431 if (reference_processor()->processing_is_mt()) {
432 PSRefProcTaskExecutor task_executor;
433 reference_processor()->enqueue_discovered_references(&task_executor, &_gc_timer);
434 } else {
435 reference_processor()->enqueue_discovered_references(NULL, &_gc_timer);
436 }
437 }
438
439 {
440 GCTraceTime(Debug, gc, phases) tm("Scrub String Table", &_gc_timer);
441 // Unlink any dead interned Strings and process the remaining live ones.
442 PSScavengeRootsClosure root_closure(promotion_manager);
443 StringTable::unlink_or_oops_do(&_is_alive_closure, &root_closure);
444 }
445
446 // Finally, flush the promotion_manager's labs, and deallocate its stacks.
447 promotion_failure_occurred = PSPromotionManager::post_scavenge(_gc_tracer);
448 if (promotion_failure_occurred) {
449 clean_up_failed_promotion();
450 log_info(gc, promotion)("Promotion failed");
451 }
452
453 _gc_tracer.report_tenuring_threshold(tenuring_threshold());
454
455 // Let the size policy know we're done. Note that we count promotion
|