8153224: Monitor deflation prolong safepoints

Add support for AsyncDeflateIdleMonitors (default true); the async deflation work is performed by the ServiceThread.

Co-authored-by: Carsten Varming <varming@gmail.com>
Reviewed-by: dcubed, rehn, rkennke, cvarming, coleenp, acorn, dholmes, eosterlund
This commit is contained in:
Daniel D. Daugherty 2020-06-01 23:37:14 -04:00
parent 30aa1b0689
commit 00f223e22f
23 changed files with 1496 additions and 250 deletions

View file

@ -172,8 +172,12 @@ void exit_globals() {
if (log_is_enabled(Info, monitorinflation)) {
// The ObjectMonitor subsystem uses perf counters so
// do this before perfMemory_exit().
// ObjectSynchronizer::finish_deflate_idle_monitors()'s call
// to audit_and_print_stats() is done at the Debug level.
// These other two audit_and_print_stats() calls are done at the
// Debug level at a safepoint:
// - for safepoint based deflation auditing:
// ObjectSynchronizer::finish_deflate_idle_monitors()
// - for async deflation auditing:
// ObjectSynchronizer::do_safepoint_work()
ObjectSynchronizer::audit_and_print_stats(true /* on_exit */);
}
perfMemory_exit();