< prev index next >

src/share/vm/runtime/objectMonitor.cpp

Print this page
rev 13331 : Simplify parallel synchronizer roots iterator.


2427 
2428     if ((sizeof(PaddedEnd<ObjectMonitor>) % cache_line_size) != 0) {
2429       tty->print_cr("WARNING: PaddedEnd<ObjectMonitor> size is not a "
2430                     "multiple of a cache line which permits false sharing.");
2431       warning_cnt++;
2432     }
2433   }
2434 
2435   ObjectSynchronizer::sanity_checks(verbose, cache_line_size, &error_cnt,
2436                                     &warning_cnt);
2437 
2438   if (verbose || error_cnt != 0 || warning_cnt != 0) {
2439     tty->print_cr("INFO: error_cnt=%d", error_cnt);
2440     tty->print_cr("INFO: warning_cnt=%d", warning_cnt);
2441   }
2442 
2443   guarantee(error_cnt == 0,
2444             "Fatal error(s) found in ObjectMonitor::sanity_checks()");
2445 }
2446 
2447 void* ObjectMonitor::cas_set_object(void* obj, void* expected) {
2448   return Atomic::cmpxchg_ptr(obj, (volatile void*)&_object, expected);
2449 }
2450 
2451 #ifndef PRODUCT
2452 void ObjectMonitor::verify() {
2453 }
2454 
2455 void ObjectMonitor::print() {
2456 }
2457 
2458 void ObjectMonitor_test() {
2459   ObjectMonitor::sanity_checks();
2460 }
2461 #endif


2427 
2428     if ((sizeof(PaddedEnd<ObjectMonitor>) % cache_line_size) != 0) {
2429       tty->print_cr("WARNING: PaddedEnd<ObjectMonitor> size is not a "
2430                     "multiple of a cache line which permits false sharing.");
2431       warning_cnt++;
2432     }
2433   }
2434 
2435   ObjectSynchronizer::sanity_checks(verbose, cache_line_size, &error_cnt,
2436                                     &warning_cnt);
2437 
2438   if (verbose || error_cnt != 0 || warning_cnt != 0) {
2439     tty->print_cr("INFO: error_cnt=%d", error_cnt);
2440     tty->print_cr("INFO: warning_cnt=%d", warning_cnt);
2441   }
2442 
2443   guarantee(error_cnt == 0,
2444             "Fatal error(s) found in ObjectMonitor::sanity_checks()");
2445 }
2446 




2447 #ifndef PRODUCT
2448 void ObjectMonitor::verify() {
2449 }
2450 
2451 void ObjectMonitor::print() {
2452 }
2453 
2454 void ObjectMonitor_test() {
2455   ObjectMonitor::sanity_checks();
2456 }
2457 #endif
< prev index next >