Integrated: 8307399: get rid of compatibility ThreadStart/ThreadEnd events for virtual threads

Serguei Spitsyn sspitsyn at openjdk.org
Wed May 10 01:50:38 UTC 2023


On Tue, 9 May 2023 01:26:43 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

> The compatible lifecycle `ThreadStart/ThreadEnd` events were added in JDK 19 to support legacy virtual thread unaware JVMTI agents which do not enable the can_support_virtual_threads capability. When this capability is enabled then the `VirtualThreadStart/VirtualThreadEnd` instead of the `ThreadStart/ThreadEnd` events are generated for virtual threads and can be managed (enabled/disabled) separately. If the the `can_support_virtual_threads` capability is disabled then the `ThreadStart/ThreadEnd` events are generated for virtual threads.
> This enhancement is to get rid of the compatible lifecycle `ThreadStart/ThreadEnd` events.
> Motivation: Performance overhead from compatible lifecycle events can be significant when a lot of virtual threads are created.
> 
> Also, there is an experimental VM flag `PostVirtualThreadCompatibleLifecycleEvents` (enabled by default).
> If it is turned on then the default compatible lifecycle `ThreadStart/ThreadEnd` events for virtual threads are generated. This VM flag has to be removed now.
> 
> Testing:
> The mach5 tiers 1-6 were submitted and passed.

This pull request has now been integrated.

Changeset: 2be1f10f
Author:    Serguei Spitsyn <sspitsyn at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/2be1f10fec37057a4532fbbc3467b41240c4dba9
Stats:     72 lines in 6 files changed: 19 ins; 31 del; 22 mod

8307399: get rid of compatibility ThreadStart/ThreadEnd events for virtual threads

Reviewed-by: alanb, pchilanomate, cjplummer

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

PR: https://git.openjdk.org/jdk/pull/13874


More information about the hotspot-dev mailing list