8155229: Tune thread usage for live data clearing
Reviewed-by: mgerdin, drwhite
This commit is contained in:
parent
53d670b469
commit
39d3c3f512
@ -424,9 +424,12 @@ void G1CardLiveData::clear(WorkGang* workers) {
|
||||
guarantee(Universe::is_fully_initialized(), "Should not call this during initialization.");
|
||||
|
||||
size_t const num_chunks = align_size_up(live_cards_bm().size_in_bytes(), G1ClearCardLiveDataTask::chunk_size()) / G1ClearCardLiveDataTask::chunk_size();
|
||||
uint const num_workers = (uint)MIN2(num_chunks, (size_t)workers->active_workers());
|
||||
|
||||
G1ClearCardLiveDataTask cl(live_cards_bm(), num_chunks);
|
||||
workers->run_task(&cl);
|
||||
|
||||
log_debug(gc, ergo)("Running %s using %u workers for " SIZE_FORMAT " work units.", cl.name(), num_workers, num_chunks);
|
||||
workers->run_task(&cl, num_workers);
|
||||
|
||||
// The region live bitmap is always very small, even for huge heaps. Clear
|
||||
// directly.
|
||||
|
Loading…
x
Reference in New Issue
Block a user