Skip to content

Commit 914d48c

Browse files
Yi-Fan TsaiPaul Hohensee
Yi-Fan Tsai
authored and
Paul Hohensee
committed
8232533: G1 uses only a single thread for pretouching the java heap
Backport-of: 9611320
1 parent ec03928 commit 914d48c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ void G1PageBasedVirtualSpace::pretouch(size_t start_page, size_t size_in_pages,
263263
if (pretouch_gang != NULL) {
264264
size_t num_chunks = MAX2((size_t)1, size_in_pages * _page_size / MAX2(G1PretouchTask::chunk_size(), _page_size));
265265

266-
uint num_workers = MIN2((uint)num_chunks, pretouch_gang->active_workers());
266+
uint num_workers = MIN2((uint)num_chunks, pretouch_gang->total_workers());
267267
log_debug(gc, heap)("Running %s with %u workers for " SIZE_FORMAT " work units pre-touching " SIZE_FORMAT "B.",
268268
cl.name(), num_workers, num_chunks, size_in_pages * _page_size);
269269
pretouch_gang->run_task(&cl, num_workers);

0 commit comments

Comments
 (0)