Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8232533: G1 uses only a single thread for pretouching the java heap
Backport-of: 9611320
  • Loading branch information
yftsai authored and Paul Hohensee committed Jan 21, 2022
1 parent ec03928 commit 914d48c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp
Expand Up @@ -263,7 +263,7 @@ void G1PageBasedVirtualSpace::pretouch(size_t start_page, size_t size_in_pages,
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);
Expand Down

1 comment on commit 914d48c

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.