--- old/src/share/vm/gc/g1/g1ConcurrentMark.cpp 2017-08-03 16:11:33.797642205 -0700 +++ new/src/share/vm/gc/g1/g1ConcurrentMark.cpp 2017-08-03 16:11:33.697642209 -0700 @@ -1718,14 +1718,17 @@ // Reference lists are balanced (see balance_all_queues() and balance_queues()). rp->set_active_mt_degree(active_workers); + ReferenceProcessorPhaseTimes pt(_gc_timer_cm, rp->num_q()); + // Process the weak references. const ReferenceProcessorStats& stats = rp->process_discovered_references(&g1_is_alive, &g1_keep_alive, &g1_drain_mark_stack, executor, - _gc_timer_cm); + &pt); _gc_tracer_cm->report_gc_reference_stats(stats); + pt.print_all_references(); // The do_oop work routines of the keep_alive and drain_marking_stack // oop closures will set the has_overflown flag if we overflow the @@ -1736,9 +1739,12 @@ assert(rp->num_q() == active_workers, "why not"); - rp->enqueue_discovered_references(executor); + rp->enqueue_discovered_references(executor, &pt); rp->verify_no_references_recorded(); + + pt.print_enqueue_phase(); + assert(!rp->discovery_enabled(), "Post condition"); }