RFR: 8336874: WhiteBoxAPI: assert(!method->is_abstract() && (osr_bci == InvocationEntryBci || !method->is_native())) failed: cannot compile abstract/native methods [v2]
Sonia Zaldana Calles
szaldana at openjdk.org
Mon Sep 16 18:58:45 UTC 2024
On Mon, 16 Sep 2024 18:49:48 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>> Hi @lmesnik, Could you help me understand a bit better why `isMethodCompiled` should always return true? I’m cross referencing with what’s implemented in [whitebox.cpp](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/prims/whitebox.cpp#L854).
>>
>> In this case, the method handle for `m1` doesn’t have a `nmethod` so the function returns early on the `nullptr` check. Is this behaviour incorrect?
>
> Sorry, I mistaken. I meant that `isMethodCompiled` should always return false for abstract method. The compiler can't compile it. So this check is fine. But for your fix it is better to check return value of `enqueueMethodForCompilation` as I mentioned.
Understood, thanks for checking! I pushed an update checking the return value of `enqueueMethodForCompilation` instead.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20973#discussion_r1761691512
More information about the hotspot-dev
mailing list