On Mon, 11 May 2026 22:05:15 GMT, Leonid Mesnik <[email protected]> wrote:
> Please review following test fix that improve synchronization of compiled > method load/unload events. > > The CompiledMethodLoad/CompiledMethodUnload might be already executing while > SetEventCallbacks removed their callbacks. > Thus they hit 'newEventCount' after setting it to zero and cause test to fail. > > The simple monitor inside event doesn't help, because race might happen while > callback is calling in VM or before it obtain lock. > > --------- > - [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: df3b9395 Author: Leonid Mesnik <[email protected]> URL: https://git.openjdk.org/jdk/commit/df3b93959c451ef33a2e05cb957d5aebe28dad19 Stats: 25 lines in 1 file changed: 11 ins; 11 del; 3 mod 8373645: Test vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t003/TestDescription.java failed: Unexpected event JVMTI_EVENT_COMPILED_METHOD_LOAD Reviewed-by: cjplummer, sspitsyn ------------- PR: https://git.openjdk.org/jdk/pull/31128
