1789 (void) JavaThread::current()->reguard_stack(); |
1789 (void) JavaThread::current()->reguard_stack(); |
1790 JRT_END |
1790 JRT_END |
1791 |
1791 |
1792 |
1792 |
1793 // Handles the uncommon case in locking, i.e., contention or an inflated lock. |
1793 // Handles the uncommon case in locking, i.e., contention or an inflated lock. |
1794 #ifndef PRODUCT |
|
1795 int SharedRuntime::_monitor_enter_ctr=0; |
|
1796 #endif |
|
1797 JRT_ENTRY_NO_ASYNC(void, SharedRuntime::complete_monitor_locking_C(oopDesc* _obj, BasicLock* lock, JavaThread* thread)) |
1794 JRT_ENTRY_NO_ASYNC(void, SharedRuntime::complete_monitor_locking_C(oopDesc* _obj, BasicLock* lock, JavaThread* thread)) |
1798 oop obj(_obj); |
1795 oop obj(_obj); |
1799 #ifndef PRODUCT |
|
1800 _monitor_enter_ctr++; // monitor enter slow |
|
1801 #endif |
|
1802 if (PrintBiasedLockingStatistics) { |
1796 if (PrintBiasedLockingStatistics) { |
1803 Atomic::inc(BiasedLocking::slow_path_entry_count_addr()); |
1797 Atomic::inc(BiasedLocking::slow_path_entry_count_addr()); |
1804 } |
1798 } |
1805 Handle h_obj(THREAD, obj); |
1799 Handle h_obj(THREAD, obj); |
1806 if (UseBiasedLocking) { |
1800 if (UseBiasedLocking) { |
1810 ObjectSynchronizer::slow_enter(h_obj, lock, CHECK); |
1804 ObjectSynchronizer::slow_enter(h_obj, lock, CHECK); |
1811 } |
1805 } |
1812 assert(!HAS_PENDING_EXCEPTION, "Should have no exception here"); |
1806 assert(!HAS_PENDING_EXCEPTION, "Should have no exception here"); |
1813 JRT_END |
1807 JRT_END |
1814 |
1808 |
1815 #ifndef PRODUCT |
|
1816 int SharedRuntime::_monitor_exit_ctr=0; |
|
1817 #endif |
|
1818 // Handles the uncommon cases of monitor unlocking in compiled code |
1809 // Handles the uncommon cases of monitor unlocking in compiled code |
1819 JRT_LEAF(void, SharedRuntime::complete_monitor_unlocking_C(oopDesc* _obj, BasicLock* lock)) |
1810 JRT_LEAF(void, SharedRuntime::complete_monitor_unlocking_C(oopDesc* _obj, BasicLock* lock)) |
1820 oop obj(_obj); |
1811 oop obj(_obj); |
1821 #ifndef PRODUCT |
|
1822 _monitor_exit_ctr++; // monitor exit slow |
|
1823 #endif |
|
1824 Thread* THREAD = JavaThread::current(); |
1812 Thread* THREAD = JavaThread::current(); |
1825 // I'm not convinced we need the code contained by MIGHT_HAVE_PENDING anymore |
1813 // I'm not convinced we need the code contained by MIGHT_HAVE_PENDING anymore |
1826 // testing was unable to ever fire the assert that guarded it so I have removed it. |
1814 // testing was unable to ever fire the assert that guarded it so I have removed it. |
1827 assert(!HAS_PENDING_EXCEPTION, "Do we need code below anymore?"); |
1815 assert(!HAS_PENDING_EXCEPTION, "Do we need code below anymore?"); |
1828 #undef MIGHT_HAVE_PENDING |
1816 #undef MIGHT_HAVE_PENDING |
1858 |
1846 |
1859 void SharedRuntime::print_statistics() { |
1847 void SharedRuntime::print_statistics() { |
1860 ttyLocker ttyl; |
1848 ttyLocker ttyl; |
1861 if (xtty != NULL) xtty->head("statistics type='SharedRuntime'"); |
1849 if (xtty != NULL) xtty->head("statistics type='SharedRuntime'"); |
1862 |
1850 |
1863 if (_monitor_enter_ctr) tty->print_cr("%5d monitor enter slow", _monitor_enter_ctr); |
|
1864 if (_monitor_exit_ctr) tty->print_cr("%5d monitor exit slow", _monitor_exit_ctr); |
|
1865 if (_throw_null_ctr) tty->print_cr("%5d implicit null throw", _throw_null_ctr); |
1851 if (_throw_null_ctr) tty->print_cr("%5d implicit null throw", _throw_null_ctr); |
1866 |
1852 |
1867 SharedRuntime::print_ic_miss_histogram(); |
1853 SharedRuntime::print_ic_miss_histogram(); |
1868 |
1854 |
1869 if (CountRemovableExceptions) { |
1855 if (CountRemovableExceptions) { |
2443 #ifndef PRODUCT |
2429 #ifndef PRODUCT |
2444 // debugging suppport |
2430 // debugging suppport |
2445 if (PrintAdapterHandlers || PrintStubCode) { |
2431 if (PrintAdapterHandlers || PrintStubCode) { |
2446 ttyLocker ttyl; |
2432 ttyLocker ttyl; |
2447 entry->print_adapter_on(tty); |
2433 entry->print_adapter_on(tty); |
2448 tty->print_cr("i2c argument handler #%d for: %s %s (%d bytes generated)", |
2434 tty->print_cr("i2c argument handler #%d for: %s %s %s (%d bytes generated)", |
2449 _adapters->number_of_entries(), (method->is_static() ? "static" : "receiver"), |
2435 _adapters->number_of_entries(), (method->is_static() ? "static" : "receiver"), |
2450 method->signature()->as_C_string(), insts_size); |
2436 method->signature()->as_C_string(), fingerprint->as_string(), insts_size); |
2451 tty->print_cr("c2i argument handler starts at %p", entry->get_c2i_entry()); |
2437 tty->print_cr("c2i argument handler starts at %p", entry->get_c2i_entry()); |
2452 if (Verbose || PrintStubCode) { |
2438 if (Verbose || PrintStubCode) { |
2453 address first_pc = entry->base_address(); |
2439 address first_pc = entry->base_address(); |
2454 if (first_pc != NULL) { |
2440 if (first_pc != NULL) { |
2455 Disassembler::decode(first_pc, first_pc + insts_size); |
2441 Disassembler::decode(first_pc, first_pc + insts_size); |