< prev index next >
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Print this page
rev 51898 : 8211228: Zero build is broken after JDK-8196341 (Add JFR events for parallel phases of G1)
Reviewed-by: XXX
@@ -3167,28 +3167,28 @@
_evacuation_failed_info_array[worker_id].register_copy_failure(obj->size());
_preserved_marks_set.get(worker_id)->push_if_necessary(obj, m);
}
bool G1ParEvacuateFollowersClosure::offer_termination() {
- EventGCPhaseParallel event;
+ JFR_ONLY(EventGCPhaseParallel event;)
G1ParScanThreadState* const pss = par_scan_state();
start_term_time();
const bool res = terminator()->offer_termination();
end_term_time();
- event.commit(GCId::current(), pss->worker_id(), G1GCPhaseTimes::phase_name(G1GCPhaseTimes::Termination));
+ JFR_ONLY(event.commit(GCId::current(), pss->worker_id(), G1GCPhaseTimes::phase_name(G1GCPhaseTimes::Termination));)
return res;
}
void G1ParEvacuateFollowersClosure::do_void() {
- EventGCPhaseParallel event;
+ JFR_ONLY(EventGCPhaseParallel event;)
G1ParScanThreadState* const pss = par_scan_state();
pss->trim_queue();
- event.commit(GCId::current(), pss->worker_id(), G1GCPhaseTimes::phase_name(G1GCPhaseTimes::ObjCopy));
+ JFR_ONLY(event.commit(GCId::current(), pss->worker_id(), G1GCPhaseTimes::phase_name(G1GCPhaseTimes::ObjCopy));)
do {
- EventGCPhaseParallel event;
+ JFR_ONLY(EventGCPhaseParallel event;)
pss->steal_and_trim_queue(queues());
- event.commit(GCId::current(), pss->worker_id(), G1GCPhaseTimes::phase_name(G1GCPhaseTimes::ObjCopy));
+ JFR_ONLY(event.commit(GCId::current(), pss->worker_id(), G1GCPhaseTimes::phase_name(G1GCPhaseTimes::ObjCopy));)
} while (!offer_termination());
}
class G1ParTask : public AbstractGangTask {
protected:
@@ -4054,11 +4054,11 @@
if (cur >= _num_work_items) {
break;
}
- EventGCPhaseParallel event;
+ JFR_ONLY(EventGCPhaseParallel event;)
double start_time = os::elapsedTime();
end = MIN2(end, _num_work_items);
for (; cur < end; cur++) {
@@ -4069,15 +4069,15 @@
double end_time = os::elapsedTime();
double time_taken = end_time - start_time;
if (is_young) {
young_time += time_taken;
has_young_time = true;
- event.commit(GCId::current(), worker_id, G1GCPhaseTimes::phase_name(G1GCPhaseTimes::YoungFreeCSet));
+ JFR_ONLY(event.commit(GCId::current(), worker_id, G1GCPhaseTimes::phase_name(G1GCPhaseTimes::YoungFreeCSet));)
} else {
non_young_time += time_taken;
has_non_young_time = true;
- event.commit(GCId::current(), worker_id, G1GCPhaseTimes::phase_name(G1GCPhaseTimes::NonYoungFreeCSet));
+ JFR_ONLY(event.commit(GCId::current(), worker_id, G1GCPhaseTimes::phase_name(G1GCPhaseTimes::NonYoungFreeCSet));)
}
start_time = end_time;
}
}
< prev index next >