899 // This function is called after potential safepoints so that nmethod |
899 // This function is called after potential safepoints so that nmethod |
900 // or adapter that it points to is still live and valid. |
900 // or adapter that it points to is still live and valid. |
901 // This function must not hit a safepoint! |
901 // This function must not hit a safepoint! |
902 address Method::verified_code_entry() { |
902 address Method::verified_code_entry() { |
903 debug_only(No_Safepoint_Verifier nsv;) |
903 debug_only(No_Safepoint_Verifier nsv;) |
904 nmethod *code = (nmethod *)OrderAccess::load_ptr_acquire(&_code); |
|
905 if (code == NULL && UseCodeCacheFlushing) { |
|
906 nmethod *saved_code = CodeCache::reanimate_saved_code(this); |
|
907 if (saved_code != NULL) { |
|
908 methodHandle method(this); |
|
909 assert( ! saved_code->is_osr_method(), "should not get here for osr" ); |
|
910 set_code( method, saved_code ); |
|
911 } |
|
912 } |
|
913 |
|
914 assert(_from_compiled_entry != NULL, "must be set"); |
904 assert(_from_compiled_entry != NULL, "must be set"); |
915 return _from_compiled_entry; |
905 return _from_compiled_entry; |
916 } |
906 } |
917 |
907 |
918 // Check that if an nmethod ref exists, it has a backlink to this or no backlink at all |
908 // Check that if an nmethod ref exists, it has a backlink to this or no backlink at all |