--- old/src/hotspot/share/c1/c1_Runtime1.cpp 2019-01-15 22:00:25.177162785 -0800 +++ new/src/hotspot/share/c1/c1_Runtime1.cpp 2019-01-15 22:00:24.989155875 -0800 @@ -127,6 +127,7 @@ int Runtime1::_throw_null_pointer_exception_count = 0; int Runtime1::_throw_class_cast_exception_count = 0; int Runtime1::_throw_incompatible_class_change_error_count = 0; +int Runtime1::_throw_illegal_monitor_state_exception_count = 0; int Runtime1::_throw_array_store_exception_count = 0; int Runtime1::_throw_count = 0; @@ -696,6 +697,13 @@ JRT_END +JRT_ENTRY(void, Runtime1::throw_illegal_monitor_state_exception(JavaThread* thread)) + NOT_PRODUCT(_throw_illegal_monitor_state_exception_count++;) + ResourceMark rm(thread); + SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_IllegalMonitorStateException()); +JRT_END + + JRT_ENTRY_NO_ASYNC(void, Runtime1::monitorenter(JavaThread* thread, oopDesc* obj, BasicObjectLock* lock)) NOT_PRODUCT(_monitorenter_slowcase_cnt++;) if (PrintBiasedLockingStatistics) { @@ -1502,6 +1510,7 @@ tty->print_cr(" _throw_null_pointer_exception_count: %d:", _throw_null_pointer_exception_count); tty->print_cr(" _throw_class_cast_exception_count: %d:", _throw_class_cast_exception_count); tty->print_cr(" _throw_incompatible_class_change_error_count: %d:", _throw_incompatible_class_change_error_count); + tty->print_cr(" _throw_illegal_monitor_state_exception_count: %d:", _throw_illegal_monitor_state_exception_count); tty->print_cr(" _throw_array_store_exception_count: %d:", _throw_array_store_exception_count); tty->print_cr(" _throw_count: %d:", _throw_count);