--- old/src/share/vm/gc/shared/gcTraceSend.cpp 2015-12-14 21:50:30.730701545 -0800 +++ new/src/share/vm/gc/shared/gcTraceSend.cpp 2015-12-14 21:50:30.638701549 -0800 @@ -420,28 +420,39 @@ class PhaseSender : public PhaseVisitor { public: template - void send_phase(PausePhase* pause) { + void send_phase(GCPhase* phase) { T event(UNTIMED); if (event.should_commit()) { event.set_gcId(GCId::current()); - event.set_name(pause->name()); - event.set_starttime(pause->start()); - event.set_endtime(pause->end()); + event.set_name(phase->name()); + event.set_starttime(phase->start()); + event.set_endtime(phase->end()); event.commit(); } } - void visit(GCPhase* pause) { ShouldNotReachHere(); } - void visit(ConcurrentPhase* pause) { Unimplemented(); } - void visit(PausePhase* pause) { - assert(PhasesStack::PHASE_LEVELS == 5, "Need more event types"); + void visit(GCPhase* phase) { + switch (phase->type()) { + case GCPhase::PausePhaseType: + assert(phase->level() < PhasesStack::PHASE_LEVELS, "Need more event types for PausePhase"); - switch (pause->level()) { - case 0: send_phase(pause); break; - case 1: send_phase(pause); break; - case 2: send_phase(pause); break; - case 3: send_phase(pause); break; - default: /* Ignore sending this phase */ break; + switch (phase->level()) { + case 0: send_phase(phase); break; + case 1: send_phase(phase); break; + case 2: send_phase(phase); break; + case 3: send_phase(phase); break; + default: /* Ignore sending this phase */ break; + } + break; + + case GCPhase::ConcurrentPhaseType: + assert(phase->level() < 1, "There's only one level for ConcurrentPhase"); + + switch (phase->level()) { + case 0: send_phase(phase); break; + default: /* Ignore sending this phase */ break; + } + break; } } };