1808 (void) JavaThread::current()->reguard_stack(); |
1808 (void) JavaThread::current()->reguard_stack(); |
1809 JRT_END |
1809 JRT_END |
1810 |
1810 |
1811 |
1811 |
1812 // Handles the uncommon case in locking, i.e., contention or an inflated lock. |
1812 // Handles the uncommon case in locking, i.e., contention or an inflated lock. |
1813 #ifndef PRODUCT |
|
1814 int SharedRuntime::_monitor_enter_ctr=0; |
|
1815 #endif |
|
1816 JRT_ENTRY_NO_ASYNC(void, SharedRuntime::complete_monitor_locking_C(oopDesc* _obj, BasicLock* lock, JavaThread* thread)) |
1813 JRT_ENTRY_NO_ASYNC(void, SharedRuntime::complete_monitor_locking_C(oopDesc* _obj, BasicLock* lock, JavaThread* thread)) |
1817 oop obj(_obj); |
1814 oop obj(_obj); |
1818 #ifndef PRODUCT |
|
1819 _monitor_enter_ctr++; // monitor enter slow |
|
1820 #endif |
|
1821 if (PrintBiasedLockingStatistics) { |
1815 if (PrintBiasedLockingStatistics) { |
1822 Atomic::inc(BiasedLocking::slow_path_entry_count_addr()); |
1816 Atomic::inc(BiasedLocking::slow_path_entry_count_addr()); |
1823 } |
1817 } |
1824 Handle h_obj(THREAD, obj); |
1818 Handle h_obj(THREAD, obj); |
1825 if (UseBiasedLocking) { |
1819 if (UseBiasedLocking) { |
1829 ObjectSynchronizer::slow_enter(h_obj, lock, CHECK); |
1823 ObjectSynchronizer::slow_enter(h_obj, lock, CHECK); |
1830 } |
1824 } |
1831 assert(!HAS_PENDING_EXCEPTION, "Should have no exception here"); |
1825 assert(!HAS_PENDING_EXCEPTION, "Should have no exception here"); |
1832 JRT_END |
1826 JRT_END |
1833 |
1827 |
1834 #ifndef PRODUCT |
|
1835 int SharedRuntime::_monitor_exit_ctr=0; |
|
1836 #endif |
|
1837 // Handles the uncommon cases of monitor unlocking in compiled code |
1828 // Handles the uncommon cases of monitor unlocking in compiled code |
1838 JRT_LEAF(void, SharedRuntime::complete_monitor_unlocking_C(oopDesc* _obj, BasicLock* lock)) |
1829 JRT_LEAF(void, SharedRuntime::complete_monitor_unlocking_C(oopDesc* _obj, BasicLock* lock)) |
1839 oop obj(_obj); |
1830 oop obj(_obj); |
1840 #ifndef PRODUCT |
|
1841 _monitor_exit_ctr++; // monitor exit slow |
|
1842 #endif |
|
1843 Thread* THREAD = JavaThread::current(); |
1831 Thread* THREAD = JavaThread::current(); |
1844 // I'm not convinced we need the code contained by MIGHT_HAVE_PENDING anymore |
1832 // I'm not convinced we need the code contained by MIGHT_HAVE_PENDING anymore |
1845 // testing was unable to ever fire the assert that guarded it so I have removed it. |
1833 // testing was unable to ever fire the assert that guarded it so I have removed it. |
1846 assert(!HAS_PENDING_EXCEPTION, "Do we need code below anymore?"); |
1834 assert(!HAS_PENDING_EXCEPTION, "Do we need code below anymore?"); |
1847 #undef MIGHT_HAVE_PENDING |
1835 #undef MIGHT_HAVE_PENDING |
1877 |
1865 |
1878 void SharedRuntime::print_statistics() { |
1866 void SharedRuntime::print_statistics() { |
1879 ttyLocker ttyl; |
1867 ttyLocker ttyl; |
1880 if (xtty != NULL) xtty->head("statistics type='SharedRuntime'"); |
1868 if (xtty != NULL) xtty->head("statistics type='SharedRuntime'"); |
1881 |
1869 |
1882 if (_monitor_enter_ctr) tty->print_cr("%5d monitor enter slow", _monitor_enter_ctr); |
|
1883 if (_monitor_exit_ctr) tty->print_cr("%5d monitor exit slow", _monitor_exit_ctr); |
|
1884 if (_throw_null_ctr) tty->print_cr("%5d implicit null throw", _throw_null_ctr); |
1870 if (_throw_null_ctr) tty->print_cr("%5d implicit null throw", _throw_null_ctr); |
1885 |
1871 |
1886 SharedRuntime::print_ic_miss_histogram(); |
1872 SharedRuntime::print_ic_miss_histogram(); |
1887 |
1873 |
1888 if (CountRemovableExceptions) { |
1874 if (CountRemovableExceptions) { |
2462 #ifndef PRODUCT |
2448 #ifndef PRODUCT |
2463 // debugging suppport |
2449 // debugging suppport |
2464 if (PrintAdapterHandlers || PrintStubCode) { |
2450 if (PrintAdapterHandlers || PrintStubCode) { |
2465 ttyLocker ttyl; |
2451 ttyLocker ttyl; |
2466 entry->print_adapter_on(tty); |
2452 entry->print_adapter_on(tty); |
2467 tty->print_cr("i2c argument handler #%d for: %s %s (%d bytes generated)", |
2453 tty->print_cr("i2c argument handler #%d for: %s %s %s (%d bytes generated)", |
2468 _adapters->number_of_entries(), (method->is_static() ? "static" : "receiver"), |
2454 _adapters->number_of_entries(), (method->is_static() ? "static" : "receiver"), |
2469 method->signature()->as_C_string(), insts_size); |
2455 method->signature()->as_C_string(), fingerprint->as_string(), insts_size); |
2470 tty->print_cr("c2i argument handler starts at %p", entry->get_c2i_entry()); |
2456 tty->print_cr("c2i argument handler starts at %p", entry->get_c2i_entry()); |
2471 if (Verbose || PrintStubCode) { |
2457 if (Verbose || PrintStubCode) { |
2472 address first_pc = entry->base_address(); |
2458 address first_pc = entry->base_address(); |
2473 if (first_pc != NULL) { |
2459 if (first_pc != NULL) { |
2474 Disassembler::decode(first_pc, first_pc + insts_size); |
2460 Disassembler::decode(first_pc, first_pc + insts_size); |