On Fri, 16 Oct 2026 15:22:06 GMT, Serguei Spitsyn <[email protected]> wrote:

> Current implementation of JVMTI SetExtensionEventCallback() registers the 
> callback but does not enable the event. This behavior matches normal events, 
> so there is a symmetry between normal and extension events.
> 
> However, the SetExtensionEventCallback spec states this:
> 
> Sets the callback function for an extension event and enables the event. Or, 
> if the callback is NULL, disables the event. Note that unlike standard 
> events, setting the callback and enabling the event are a single operation.
> 
> This wording about enabling/disabling the events has to be removed from 
> SetExtensionEventCallback spec.
> It seems that extension events are not used by the JVMTI agents. Two 
> extension events are used in number of tests:
>  - `VirtualThreadMount` and `VirtualThreadUnmount`
> 
> Testing: N/A
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: 39331686
Author:    Serguei Spitsyn <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/39331686589aa71aa13f83f7bc353d94d2b46edd
Stats:     8 lines in 1 file changed: 1 ins; 1 del; 6 mod

8394716: SetExtensionEventCallback should not enable the event

Reviewed-by: lmesnik, cjplummer

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

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

Reply via email to