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:
Patricio Chilano Mateo 2018-07-27 16:29:36 -04:00 committed by Daniel D. Daugherty
parent c1bbdfaa2c
commit 2d1029c256
7 changed files with 140 additions and 124 deletions

View file

@ -153,12 +153,11 @@ class ObjectSynchronizer : AllStatic {
static void thread_local_used_oops_do(Thread* thread, OopClosure* f);
// debugging
static void sanity_checks(const bool verbose,
const unsigned int cache_line_size,
int *error_cnt_ptr, int *warning_cnt_ptr);
static int verify_objmon_isinpool(ObjectMonitor *addr) PRODUCT_RETURN0;
private:
friend class SynchronizerTest;
enum { _BLOCKSIZE = 128 };
// global list of blocks of monitors
static PaddedEnd<ObjectMonitor> * volatile gBlockList;
@ -177,6 +176,11 @@ class ObjectSynchronizer : AllStatic {
// Process oops in monitors on the given list
static void list_oops_do(ObjectMonitor* list, OopClosure* f);
// Support for SynchronizerTest access to GVars fields:
static u_char* get_gvars_addr();
static u_char* get_gvars_hcSequence_addr();
static size_t get_gvars_size();
static u_char* get_gvars_stwRandom_addr();
};
// ObjectLocker enforced balanced locking and can never thrown an