On Fri, 5 Jun 2026 17:20:23 GMT, Frederic Parain <[email protected]> wrote:
>> This change refactors the super class scalar argument checking code and >> deoptimization so that it is only called at link time and not for >> frame::describe() and other places that are only retrieving the calling >> convention. The only time that we detect a mismatch is during class >> linking, before the overriding subclass method can run. >> >> This avoids running vm code while thread_in_Java, which is unsafe, and >> removes the ThreadInVMfromUnknown, which was even more unsafe. >> >> Tested with tier1-4. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > src/hotspot/share/runtime/sharedRuntime.cpp line 2847: > >> 2845: } >> 2846: >> 2847: bool CompiledEntrySignature::check_supers_and_deoptimize(int arg_num) { > > compute_calling_conventions() checks the thread state vs the link_time > argument, but shouldn't this method, check_supers_and_deoptimize(), be > protected by an assert ensuring current thread state is _thread_in_vm? Yeah, I could move the assert down. And run the valhalla-comp-stress tests too. I ran local tests with -Xlog:continuations=trace:rt.log since freezing and thawing calls frame::describe a lot. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2517#discussion_r3364372429
