A question about the patching instruction order of CompiledIC::internal_set_ic_destination
Roland Westrelin
rwestrel at redhat.com
Thu Feb 17 12:09:40 UTC 2022
> For CompiledIC::set_to_monomorphic and the callee is a compiled code, icstub is created when the context is not safe.
>
> ```
> bool safe = SafepointSynchronize::is_at_safepoint() ||
> (!is_in_transition_state() && (info.is_optimized() || static_bound || is_clean()));
>
> ```
>
> If the call site is clean, the patching action directly occurs without creating an icstub. In this case, if we patch the call instruction first, it could cause the cache mismatched situation I mentioned in the first email
MAybe the call to SharedRuntime::handle_wrong_method_ic_miss() that
could happen in this case is harmless (that is it detects that there's
nothing to do).
Roland.
More information about the hotspot-compiler-dev
mailing list