On Fri, 20 May 2022 20:09:59 GMT, Leonid Mesnik <lmes...@openjdk.org> wrote:

>> The fix disables EscapeBarrier and EscapeAnalysis when certain JVMTI 
>> capabilities are enabled and --enable-preview.
>> 
>> It restores the same behavior as it was before 
>> https://bugs.openjdk.java.net/browse/JDK-8227745 "Enable Escape Analysis for 
>> Better Performance in the Presence of JVMTI Agents" is implemented when 
>> Continuations are enabled.
>
> Leonid Mesnik has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   2nd v

After discussion with @sspitsyn and more testing, I realized that it is not 
enough to disable EA with some capabilities. The IterateHeap requires a 
capability which is enabled by default. Moreover, code might be compiled before 
the agent requests any caps. So the new proposed fix is to apply EscapeBarriers 
for platform threads only. For virtual threads, the behavior is the same as 
before JDK-8227745. This should be fixed by 
https://bugs.openjdk.java.net/browse/JDK-8264699

The fix has been pushed into loom repo already and it is a backport:
https://github.com/openjdk/loom/commit/6520b71a62baf64d214ff94c9291bfc513dfbe51

-------------

PR: https://git.openjdk.java.net/jdk/pull/8589

Reply via email to