8171848: ObjectMonitor verify() and print() methods are empty

Reviewed-by: dholmes
This commit is contained in:
Kirill Zhaldybin 2016-12-21 12:47:29 +03:00
parent 3af1da4533
commit 98bf7d7727
4 changed files with 0 additions and 28 deletions

View file

@ -2445,12 +2445,6 @@ void ObjectMonitor::sanity_checks() {
} }
#ifndef PRODUCT #ifndef PRODUCT
void ObjectMonitor::verify() {
}
void ObjectMonitor::print() {
}
void ObjectMonitor_test() { void ObjectMonitor_test() {
ObjectMonitor::sanity_checks(); ObjectMonitor::sanity_checks();
} }

View file

@ -313,10 +313,6 @@ class ObjectMonitor {
void clear(); void clear();
static void sanity_checks(); // public for -XX:+ExecuteInternalVMTests static void sanity_checks(); // public for -XX:+ExecuteInternalVMTests
// in PRODUCT for -XX:SyncKnobs=Verbose=1 // in PRODUCT for -XX:SyncKnobs=Verbose=1
#ifndef PRODUCT
void verify();
void print();
#endif
void enter(TRAPS); void enter(TRAPS);
void exit(bool not_suspended, TRAPS); void exit(bool not_suspended, TRAPS);

View file

@ -1879,23 +1879,6 @@ void ObjectSynchronizer::sanity_checks(const bool verbose,
#ifndef PRODUCT #ifndef PRODUCT
// Verify all monitors in the monitor cache, the verification is weak.
void ObjectSynchronizer::verify() {
PaddedEnd<ObjectMonitor> * block =
(PaddedEnd<ObjectMonitor> *)OrderAccess::load_ptr_acquire(&gBlockList);
while (block != NULL) {
assert(block->object() == CHAINMARKER, "must be a block header");
for (int i = 1; i < _BLOCKSIZE; i++) {
ObjectMonitor* mid = (ObjectMonitor *)(block + i);
oop object = (oop)mid->object();
if (object != NULL) {
mid->verify();
}
}
block = (PaddedEnd<ObjectMonitor> *)block->FreeNext;
}
}
// Check if monitor belongs to the monitor cache // Check if monitor belongs to the monitor cache
// The list is grow-only so it's *relatively* safe to traverse // The list is grow-only so it's *relatively* safe to traverse
// the list of extant blocks without taking a lock. // the list of extant blocks without taking a lock.

View file

@ -141,7 +141,6 @@ class ObjectSynchronizer : AllStatic {
static void sanity_checks(const bool verbose, static void sanity_checks(const bool verbose,
const unsigned int cache_line_size, const unsigned int cache_line_size,
int *error_cnt_ptr, int *warning_cnt_ptr); int *error_cnt_ptr, int *warning_cnt_ptr);
static void verify() PRODUCT_RETURN;
static int verify_objmon_isinpool(ObjectMonitor *addr) PRODUCT_RETURN0; static int verify_objmon_isinpool(ObjectMonitor *addr) PRODUCT_RETURN0;
private: private: