> 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.
Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision: minot tweaks in the VirtualThreadStartTest ------------- Changes: - all: https://git.openjdk.org/jdk/pull/13874/files - new: https://git.openjdk.org/jdk/pull/13874/files/2af76a26..c5122e4e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=13874&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13874&range=00-01 Stats: 4 lines in 2 files changed: 1 ins; 2 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/13874.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/13874/head:pull/13874 PR: https://git.openjdk.org/jdk/pull/13874