mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
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:
parent
30aa1b0689
commit
00f223e22f
23 changed files with 1496 additions and 250 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2020, 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
|
||||
|
@ -41,6 +41,7 @@
|
|||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/interfaceSupport.inline.hpp"
|
||||
#include "runtime/sweeper.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
#include "runtime/threadSMR.inline.hpp"
|
||||
#include "runtime/vmOperations.hpp"
|
||||
|
@ -433,6 +434,17 @@ int VM_Exit::wait_for_threads_in_native_to_block() {
|
|||
}
|
||||
}
|
||||
|
||||
bool VM_Exit::doit_prologue() {
|
||||
if (AsyncDeflateIdleMonitors && log_is_enabled(Info, monitorinflation)) {
|
||||
// AsyncDeflateIdleMonitors does a special deflation at the VM_Exit
|
||||
// safepoint in order to reduce the in-use monitor population that
|
||||
// is reported by ObjectSynchronizer::log_in_use_monitor_details()
|
||||
// at VM exit.
|
||||
ObjectSynchronizer::set_is_special_deflation_requested(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void VM_Exit::doit() {
|
||||
|
||||
if (VerifyBeforeExit) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue