mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8171157: Convert ObjectMonitor_test to GTest
Migration of the ObjectMonitor test to GTest. Two GTests were actually created, one for ObjectMonitor and one for ObjectSynchronizer. Reviewed-by: dcubed, hseigel
This commit is contained in:
parent
c1bbdfaa2c
commit
2d1029c256
7 changed files with 140 additions and 124 deletions
|
@ -103,11 +103,11 @@ class ObjectWaiter : public StackObj {
|
|||
// coherency misses. There is no single optimal layout for both
|
||||
// single-threaded and multi-threaded environments.
|
||||
//
|
||||
// - See ObjectMonitor::sanity_checks() for how critical restrictions are
|
||||
// enforced and advisory recommendations are reported.
|
||||
// - See TEST_VM(ObjectMonitor, sanity) gtest for how critical restrictions are
|
||||
// enforced.
|
||||
// - Adjacent ObjectMonitors should be separated by enough space to avoid
|
||||
// false sharing. This is handled by the ObjectMonitor allocation code
|
||||
// in synchronizer.cpp. Also see ObjectSynchronizer::sanity_checks().
|
||||
// in synchronizer.cpp. Also see TEST_VM(SynchronizerTest, sanity) gtest.
|
||||
//
|
||||
// Futures notes:
|
||||
// - Separating _owner from the <remaining_fields> by enough space to
|
||||
|
@ -294,8 +294,6 @@ class ObjectMonitor {
|
|||
bool check(TRAPS); // true if the thread owns the monitor.
|
||||
void check_slow(TRAPS);
|
||||
void clear();
|
||||
static void sanity_checks(); // public for -XX:+ExecuteInternalVMTests
|
||||
// in PRODUCT for -XX:SyncKnobs=Verbose=1
|
||||
|
||||
void enter(TRAPS);
|
||||
void exit(bool not_suspended, TRAPS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue