Skip to content

Commit da9cc5c

Browse files
author
Thomas Schatzl
committed
8290806: Only add eager reclaim task to G1 post evacuate tasks if there were candidates
Reviewed-by: kbarrett, sangheki
1 parent 330adc0 commit da9cc5c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,9 @@ G1PostEvacuateCollectionSetCleanupTask2::G1PostEvacuateCollectionSetCleanupTask2
670670
#if COMPILER2_OR_JVMCI
671671
add_serial_task(new UpdateDerivedPointersTask());
672672
#endif
673-
add_serial_task(new EagerlyReclaimHumongousObjectsTask());
673+
if (G1CollectedHeap::heap()->has_humongous_reclaim_candidates()) {
674+
add_serial_task(new EagerlyReclaimHumongousObjectsTask());
675+
}
674676

675677
if (evac_failure_regions->evacuation_failed()) {
676678
add_parallel_task(new RestorePreservedMarksTask(per_thread_states->preserved_marks_set()));

0 commit comments

Comments
 (0)