Mercurial > hg > truffle
diff src/share/vm/code/nmethod.cpp @ 10475:3489047ffea2
Restructure the handling of HotSpotInstalledCode and their link to nmethods.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 21 Jun 2013 18:26:52 +0200 |
parents | 836a62f43af9 |
children | 0b1b5356b566 |
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp Fri Jun 21 17:52:19 2013 +0200 +++ b/src/share/vm/code/nmethod.cpp Fri Jun 21 18:26:52 2013 +0200 @@ -1397,9 +1397,10 @@ if (!is_osr_method() && !is_not_entrant()) { address stub = SharedRuntime::get_handle_wrong_method_stub(); #ifdef GRAAL - if (_graal_installed_code != NULL && !HotSpotNmethod::isDefault(_graal_installed_code)) { - // This was manually installed machine code. Patch entry with stub that throws an exception. - stub = SharedRuntime::get_deoptimized_installed_code_stub(); + if (_graal_installed_code != NULL) { + // Break the link between nmethod and HotSpotInstalledCode such that the nmethod can subsequently be flushed safely. + HotSpotInstalledCode::set_codeBlob(_graal_installed_code, 0); + _graal_installed_code = NULL; } #endif NativeJump::patch_verified_entry(entry_point(), verified_entry_point(), stub);