mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +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
|
@ -74,6 +74,7 @@
|
|||
#include "runtime/os.inline.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/reflection.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
#include "runtime/threadSMR.hpp"
|
||||
#include "runtime/vframe.inline.hpp"
|
||||
|
@ -490,6 +491,11 @@ JVM_END
|
|||
JVM_ENTRY_NO_ENV(void, JVM_GC(void))
|
||||
JVMWrapper("JVM_GC");
|
||||
if (!DisableExplicitGC) {
|
||||
if (AsyncDeflateIdleMonitors) {
|
||||
// AsyncDeflateIdleMonitors needs to know when System.gc() is
|
||||
// called so any special deflation can be done at a safepoint.
|
||||
ObjectSynchronizer::set_is_special_deflation_requested(true);
|
||||
}
|
||||
Universe::heap()->collect(GCCause::_java_lang_system_gc);
|
||||
}
|
||||
JVM_END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue