equal
deleted
inserted
replaced
689 |
689 |
690 if (PrintCodeCacheOnCompilation) { |
690 if (PrintCodeCacheOnCompilation) { |
691 stringStream s; |
691 stringStream s; |
692 // Dump code cache into a buffer before locking the tty, |
692 // Dump code cache into a buffer before locking the tty, |
693 { |
693 { |
694 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
694 MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
695 CodeCache::print_summary(&s, false); |
695 CodeCache::print_summary(&s, false); |
696 } |
696 } |
697 ttyLocker ttyl; |
697 ttyLocker ttyl; |
698 tty->print_raw_cr(s.as_string()); |
698 tty->print_raw_cr(s.as_string()); |
699 } |
699 } |
704 if (installed_code_handle.not_null()) { |
704 if (installed_code_handle.not_null()) { |
705 assert(installed_code_handle->is_a(InstalledCode::klass()), "wrong type"); |
705 assert(installed_code_handle->is_a(InstalledCode::klass()), "wrong type"); |
706 nmethod::invalidate_installed_code(installed_code_handle, CHECK_0); |
706 nmethod::invalidate_installed_code(installed_code_handle, CHECK_0); |
707 { |
707 { |
708 // Ensure that all updates to the InstalledCode fields are consistent. |
708 // Ensure that all updates to the InstalledCode fields are consistent. |
709 MutexLockerEx pl(Patching_lock, Mutex::_no_safepoint_check_flag); |
709 MutexLocker pl(Patching_lock, Mutex::_no_safepoint_check_flag); |
710 InstalledCode::set_address(installed_code_handle, (jlong) cb); |
710 InstalledCode::set_address(installed_code_handle, (jlong) cb); |
711 InstalledCode::set_version(installed_code_handle, InstalledCode::version(installed_code_handle) + 1); |
711 InstalledCode::set_version(installed_code_handle, InstalledCode::version(installed_code_handle) + 1); |
712 if (cb->is_nmethod()) { |
712 if (cb->is_nmethod()) { |
713 InstalledCode::set_entryPoint(installed_code_handle, (jlong) cb->as_nmethod_or_null()->verified_entry_point()); |
713 InstalledCode::set_entryPoint(installed_code_handle, (jlong) cb->as_nmethod_or_null()->verified_entry_point()); |
714 } else { |
714 } else { |