On Fri, 5 Dec 2025 22:23:46 GMT, Chad Rakoczy <[email protected]> wrote:
> [JDK-8369150](https://bugs.openjdk.org/browse/JDK-8369150) > > The test checks for JVMTI `COMPILED_METHOD_LOAD` and `COMPILED_METHOD_UNLOAD` > events to be published for a relocated nmethod. JVMTI events however are not > guaranteed to be published before the JVM exits which can occasionally cause > the test to fail. Instead of failing if the events are not receive the test > was modified to print an error and pass. However, the test will still fail if > the method fails to compile or if the nmethod fails to relocate. Changes requested by lmesnik (Reviewer). test/hotspot/jtreg/serviceability/jvmti/NMethodRelocation/NMethodRelocationTest.java line 172: > 170: WHITE_BOX.lockCompilation(); > 171: > 172: System.out.printf("Relocated nmethod from 0x%016x to 0x%016x%n", > originalNMethod.code_begin, relocatedNMethod.code_begin); I think it is better to wait until method_unload is generated rather then don't check it in the test. If tests times out while waiting for jvmti event we could analyze process dumps and logs trying to understand while jvmti event hasn't been posted. it might be sense to call WB.fullGC(), check if jvmti event posted sleep some time and repeat in the loop. ------------- PR Review: https://git.openjdk.org/jdk/pull/28683#pullrequestreview-3565945862 PR Review Comment: https://git.openjdk.org/jdk/pull/28683#discussion_r2609358927
