< prev index next >
test/hotspot/jtreg/compiler/testlibrary/rtm/AbortProvoker.java
Print this page
rev 59757 : Add whitebox support for deflating idle monitors including ObjectSynchronizer::request_deflate_idle_monitors(); drop ObjectSynchronizer::_is_special_deflation_requested flag, functions and uses; switch to ObjectSynchronizer::request_deflate_idle_monitors() as needed; _last_async_deflation_time_ns should be set at the end of async deflation;
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -96,11 +96,13 @@
* @throws RuntimeException if the {@code monitor} in a wrong state.
*/
public static void verifyMonitorState(Object monitor,
boolean shouldBeInflated) {
if (!shouldBeInflated && WHITE_BOX.isMonitorInflated(monitor)) {
- WHITE_BOX.forceSafepoint();
+ boolean did_deflation = WHITE_BOX.deflateIdleMonitors();
+ Asserts.assertEQ(did_deflation, true,
+ "deflateIdleMonitors() should have worked.");
}
Asserts.assertEQ(WHITE_BOX.isMonitorInflated(monitor), shouldBeInflated,
"Monitor in a wrong state.");
}
/**
< prev index next >