RFR: 8294538: missing is_unloading() check in SharedRuntime::fixup_callers_callsite()
Dean Long
dlong at openjdk.org
Fri Oct 21 07:01:52 UTC 2022
On Thu, 20 Oct 2022 07:35:14 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:
>> This change adds a missing is_unloading() check for the callee in SharedRuntime::fixup_callers_callsite() and removes from_compiled_entry_no_trampoline() because it is no longer used.
>
> src/hotspot/share/runtime/sharedRuntime.cpp line 2119:
>
>> 2117:
>> 2118: CodeBlob* cb = CodeCache::find_blob(caller_pc);
>> 2119: if (cb == NULL || !cb->is_compiled() || callee->is_unloading()) {
>
> Why not move the is_unloading check on callee to the if statement just above that checks the callee (as opposed to the callsite)?
I guess I was thinking is_unloading() can be a bit expensive the first time it is called, so it might be better to fail for other reasons first. But I believe is_unloading will eventually be called for every nmethod each unloading cycle, so avoiding the cost here just means moving it to somewhere else. I can move it to where you suggest if you like.
-------------
PR: https://git.openjdk.org/jdk/pull/10747
More information about the hotspot-dev
mailing list