Functional: David H. discussion about JDK-8230249: - Use ref_counts to protect ObjectMonitor* cached in JavaThread current_pending_monitor and current_waiting_monitor fields - Update current_pending_monitor() and current_waiting_monitor() callers to use ObjectMonitorHandles and new set_om_ptr_if_safe() David H. 1 of 3 CR7 review: - Remove unnecessary load_acquire() and release_store() calls from the counter fields. Robbin CR7 review: - Add mark_next_for_traversal() for implementing safe traversal of lists by concurrent readers. - Update ObjectMonitor audit and checking functions to do safe traversal of the lists where needed. David H. 3 of 3 CR7 review: - owner_is_DEFLATER_MARKER() and ref_count no longer use load_acquire(). - Rename three param set_owner_from() to simply_set_owner_from() and drop cmpxchg() so the set of the _owner field to new_value happens without any memory sync. - Add two param simply_set_owner_from() that sets the _owner field to new_value without any memory sync. - Rename set_owner_from_BasicLock() to simply_set_owner_from_BasicLock(), drop "assert(is_lock_owned(basic_lock_p))" since all the callers already check that. Erik O. bug fix: - The BasicLock needs to be initialized to markWord::unused_mark before C2 inc_om_ref_count() can take a branch to DONE_LABEL for the slow path. David H. CR7 follow-up: - mark_next() does not need load_acquire(&_next_om) since it is followed by cmpxchg(); regular load will do. - g_block_list is only changed by cmpxchg() so load_acquire(&g_block_list) is not needed; missed these from a previous David H. comment. Self-review: - Verify that all primary list head changes are made with mark_list_head() which uses cmpxchg(); list head loads can be done with regular loads instead of load_acquire() and all unmarking of list heads can be done with a regular store followed by an OrderAccess::storestore() instead of a release_store(). Test update: - no changes Collateral: - Drop 'ObjectMonitorHandle(ObjectMonitor*)' ctr and use new set_om_ptr_if_safe() in monitors_iterate() - Drop 'ObjectMonitor::is_active()' and use '!ObjectMonitor::is_free()' directly. Cleanup: - Add spaces around a few binary operators. - ObjectSynchronizer::finish_deflate_idle_monitors() should do nothing with async deflation unless a special deflation has been requested. - restore finish_deflate_idle_monitors() to mostly match the baseline - audit_and_print_stats() is now called from do_safepoint_work() after async deflation is requested. - deflate_idle_monitors_using_JT() now logs the global list counters at the Info level for async deflation. David H. 3 of 3 CR7 review: - Update assert()'s and guarantee()'s that refer to ref_count() to save a local copy of the value, do the check with the local copy and report any failure with the local copy and the current ref_count() value for comparison. - Update (monitorinflation, owner) log messages to provide more caller context. - Restore "assert(this->object() != NULL)" in ObjectMonitor::enter() to the baseline version. - Add a clarifying comment in is_busy_to_string(). - Delete stale baseline comment in ObjectMonitor::exit(). Temporary: - no changes