RFR: 8292584: assert(cb != __null) failed: must be with -XX:-Inline
Dean Long
dlong at openjdk.org
Wed Aug 24 00:07:31 UTC 2022
On Tue, 23 Aug 2022 22:24:30 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
> There is option DisableIntrinsic to disable an intrinsic (for both, C2 and C1). What happens in this case with Loom?
DisableIntrinsic seems to work if the caller is compiled and the intrinsic is not native. So with
`-Xint -XX:DisableIntrinsic=_Continuation_doYield -XX:DisableIntrinsic=_Continuation_enterSpecial`
the intrinsic code still gets called. With compilers enabled, enterSpecial intrinsic code is called, but doYield throws an exception because the Java code is executed:
`throw new Error("Intrinsic not installed");`
Looking at gen_continuation_enter() for enterSpecial again, the compiled entry point tries to inline the equivalent of an i2c adapter, but like doYield, I don't think that will work if it was reached through a c2i adapter. Like the comment here:
https://github.com/openjdk/jdk/blob/6a8a531359295849113aa14fd6cba21c886decf3/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp#L775-L780
Because of this, I would argue my currently proposed fix with this PR is correct, especially if we think of it as a special, inlined, "smart i2c adapter" that handles the c2i --> i2c problem. We may need a similar fix for enterSpecial.
-------------
PR: https://git.openjdk.org/jdk/pull/9974
More information about the hotspot-compiler-dev
mailing list