8232533: G1 uses only a single thread for pretouching the java heap
Reviewed-by: tschatzl, sjohanss
--- a/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp Tue Nov 19 10:02:46 2019 -0800
+++ b/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp Tue Nov 19 12:28:39 2019 -0800
@@ -279,7 +279,7 @@
if (pretouch_gang != NULL) {
size_t num_chunks = MAX2((size_t)1, size_in_pages * _page_size / MAX2(G1PretouchTask::chunk_size(), _page_size));
- uint num_workers = MIN2((uint)num_chunks, pretouch_gang->active_workers());
+ uint num_workers = MIN2((uint)num_chunks, pretouch_gang->total_workers());
log_debug(gc, heap)("Running %s with %u workers for " SIZE_FORMAT " work units pre-touching " SIZE_FORMAT "B.",
cl.name(), num_workers, num_chunks, size_in_pages * _page_size);
pretouch_gang->run_task(&cl, num_workers);