8151594: Move concurrent refinement thread activation logging out of GC pause

Reviewed-by: tschatzl, ayang
This commit is contained in:
Kim Barrett 2021-11-30 22:43:53 +00:00
parent f1c20e91d8
commit 65251f7693

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -104,10 +104,6 @@ void G1ConcurrentRefineThread::run_service() {
break;
}
log_debug(gc, refine)("Activated worker %d, on threshold: " SIZE_FORMAT ", current: " SIZE_FORMAT,
_worker_id, _cr->activation_threshold(_worker_id),
G1BarrierSet::dirty_card_queue_set().num_cards());
// For logging.
G1ConcurrentRefineStats start_stats = *_refinement_stats;
G1ConcurrentRefineStats total_stats; // Accumulate over activation.
@ -115,6 +111,10 @@ void G1ConcurrentRefineThread::run_service() {
{
SuspendibleThreadSetJoiner sts_join;
log_debug(gc, refine)("Activated worker %d, on threshold: %zu, current: %zu",
_worker_id, _cr->activation_threshold(_worker_id),
G1BarrierSet::dirty_card_queue_set().num_cards());
while (!should_terminate()) {
if (sts_join.should_yield()) {
// Accumulate changed stats before possible GC that resets stats.