< prev index next >

src/share/vm/gc/shared/gcTraceSend.cpp

Print this page
rev 9733 : [mq]: webrev.00
rev 9734 : [mq]: webrev.01

*** 416,460 **** e.commit(); } } class PhaseSender : public PhaseVisitor { ! public: ! template<typename T> ! void send_phase(GCPhase* phase) { ! T event(UNTIMED); ! if (event.should_commit()) { ! event.set_gcId(GCId::current()); ! event.set_name(phase->name()); ! event.set_starttime(phase->start()); ! event.set_endtime(phase->end()); ! event.commit(); ! } ! } ! ! void visit(GCPhase* phase) { ! switch (phase->type()) { ! case GCPhase::PausePhaseType: assert(phase->level() < PhasesStack::PHASE_LEVELS, "Need more event types for PausePhase"); switch (phase->level()) { case 0: send_phase<EventGCPhasePause>(phase); break; case 1: send_phase<EventGCPhasePauseLevel1>(phase); break; case 2: send_phase<EventGCPhasePauseLevel2>(phase); break; case 3: send_phase<EventGCPhasePauseLevel3>(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<EventGCPhaseConcurrent>(phase); break; default: /* Ignore sending this phase */ break; } ! break; } } }; void GCTracer::send_phase_events(TimePartitions* time_partitions) const { --- 416,465 ---- e.commit(); } } class PhaseSender : public PhaseVisitor { ! void visit_pause(GCPhase* phase) { assert(phase->level() < PhasesStack::PHASE_LEVELS, "Need more event types for PausePhase"); switch (phase->level()) { case 0: send_phase<EventGCPhasePause>(phase); break; case 1: send_phase<EventGCPhasePauseLevel1>(phase); break; case 2: send_phase<EventGCPhasePauseLevel2>(phase); break; case 3: send_phase<EventGCPhasePauseLevel3>(phase); break; default: /* Ignore sending this phase */ break; } ! } ! void visit_concurrent(GCPhase* phase) { ! assert(phase->level() < 1, "There is only one level for ConcurrentPhase"); switch (phase->level()) { case 0: send_phase<EventGCPhaseConcurrent>(phase); break; default: /* Ignore sending this phase */ break; } ! } ! ! public: ! template<typename T> ! void send_phase(GCPhase* phase) { ! T event(UNTIMED); ! if (event.should_commit()) { ! event.set_gcId(GCId::current()); ! event.set_name(phase->name()); ! event.set_starttime(phase->start()); ! event.set_endtime(phase->end()); ! event.commit(); ! } ! } ! ! void visit(GCPhase* phase) { ! if (phase->type() == GCPhase::PausePhaseType) { ! visit_pause(phase); ! } else { ! assert(phase->type() == GCPhase::ConcurrentPhaseType, "Should be ConcurrentPhaseType"); ! visit_concurrent(phase); } } }; void GCTracer::send_phase_events(TimePartitions* time_partitions) const {
< prev index next >