# HG changeset patch # User sangheki # Date 1574195319 28800 # Node ID 302c4d2e7b3a8151cb928238966862e77749fb77 # Parent faac483dfb308788f37b7a3864ee9627f082a59f 8232533: G1 uses only a single thread for pretouching the java heap Reviewed-by: tschatzl, sjohanss diff -r faac483dfb30 -r 302c4d2e7b3a src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp --- 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);