On Wed, 23 Nov 2022 10:16:44 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:
> There is also `switchToCarrierThread()` method that returns the > `notifyJvmtiEvents` value. > It seems to be an optimization. I'm not sure yet, if we need to fix these > places as well. It was to ensure that hide(true) and hide(false) are balanced. If it were to re-poll notifyJvmtiEvents and a JVMTI agent enables the capability while a thread in doing a temporary transition then you may get a hide(false) without the corresponding hide(true). ------------- PR: https://git.openjdk.org/jdk/pull/11304