void GCTracer::send_phase_events(TimePartitions* time_partitions) const { PhaseSender phase_reporter(_shared_gc_info.id()); TimePartitionPhasesIterator iter(time_partitions); while (iter.has_next()) { GCPhase* phase = iter.next(); phase->accept(&phase_reporter); } }
void TimePartitions::report_gc_phase_start(const char* name, const Ticks& time, GCPhase::PhaseType type) { assert(_phases->length() <= 1000, "Too many recored phases?"); int level = _active_phases.count(); GCPhase phase; phase.set_type(type); phase.set_level(level); phase.set_name(name); phase.set_start(time); int index = _phases->append(phase); _active_phases.push(index); }
void TimePartitions::report_gc_phase_end(const Ticks& time, GCPhase::PhaseType type) { int phase_index = _active_phases.pop(); GCPhase* phase = _phases->adr_at(phase_index); phase->set_end(time); update_statistics(phase); }
void TimePartitions::report_gc_phase_end(jlong time) { int phase_index = _active_phases.pop(); GCPhase* phase = _phases->adr_at(phase_index); phase->set_end(time); update_statistics(phase); }