diff --git a/src/hotspot/share/prims/jvmti.xml b/src/hotspot/share/prims/jvmti.xml index f52428c0eab..78c597a09f5 100644 --- a/src/hotspot/share/prims/jvmti.xml +++ b/src/hotspot/share/prims/jvmti.xml @@ -12892,15 +12892,21 @@ myInit() { id="ThreadStart" const="JVMTI_EVENT_THREAD_START" num="52" phase="start"> A thread start event is generated by a new thread before its initial - method executes. The capability + method executes. +

+ This event is generated by platform threads. It is also generated by + virtual threads when the capability - can_support_virtual_threads determines - if a new virtual thread generates a ThreadStart event or - a event. If disabled, a virtual - thread generates a ThreadStart event. If enabled, a virtual - thread generates a VirtualThreadStart event. + can_support_virtual_threads is not enabled. + Agents without support for virtual threads that enable this event will + therefore be notified by all newly started threads. +

+ If the capability can_support_virtual_threads is enabled then + this event is not generated by virtual threads. Agents with support for + virtual threads can enable + to be notified by newly started virtual threads.

- A thread may be listed in the array returned by + A platform thread may be listed in the array returned by before its thread start event is generated. It is possible for other events to be generated @@ -12934,21 +12940,26 @@ myInit() { A thread end event is generated by a terminating thread after its initial method has finished execution. - The capability +

+ This event is generated by platform threads. It is also generated by + virtual threads when the capability - can_support_virtual_threads determines - if a terminating virtual thread generates a ThreadEnd - event or a event. If disabled, a - virtual thread generates a ThreadEnd event. If enabled, - a virtual thread generates a VirtualThreadEnd event. + can_support_virtual_threads is not enabled. + Agents without support for virtual threads that enable this event for + all threads will therefore be notified by all terminating threads. +

+ If the capability can_support_virtual_threads is enabled then + this event is not generated by virtual threads. Agents with support for + virtual threads can enable + to be notified by terminating virtual threads.

- A thread may be listed in the array returned by + A platform thread may be listed in the array returned by after its thread end event is generated. No events are generated on a thread after its thread end event.

- The event is sent on the dying . + The event is sent on the terminating . jvmdi @@ -12980,7 +12991,7 @@ myInit() {

A virtual thread start event is generated before its initial method executes.

- The event is sent on the . + The event is sent on the newly started . new @@ -13013,7 +13024,7 @@ myInit() {

A virtual thread end event is generated after its initial method has finished execution.

- The event is sent on the . + The event is sent on the terminating . new diff --git a/src/hotspot/share/prims/jvmtiH.xsl b/src/hotspot/share/prims/jvmtiH.xsl index 975758b4edb..0679c1ff3c7 100644 --- a/src/hotspot/share/prims/jvmtiH.xsl +++ b/src/hotspot/share/prims/jvmtiH.xsl @@ -115,6 +115,7 @@ enum { JVMTI_VERSION_1_2 = 0x30010200, JVMTI_VERSION_9 = 0x30090000, JVMTI_VERSION_11 = 0x300B0000, + JVMTI_VERSION_19 = 0x30130000, JVMTI_VERSION = 0x30000000 + (