RFR: 8369150: NMethodRelocationTest fails when JVMTI events not published before JVM exit [v2]

Leonid Mesnik lmesnik at openjdk.org
Thu Jan 1 20:04:12 UTC 2026


On Tue, 30 Dec 2025 23:17:20 GMT, Chad Rakoczy <duke at openjdk.org> wrote:

>> test/hotspot/jtreg/serviceability/jvmti/NMethodRelocation/NMethodRelocationTest.java line 188:
>> 
>>> 186:         WHITE_BOX.deoptimizeAll();
>>> 187: 
>>> 188:         while (true) {
>> 
>> It would be better to have some variable that is set in 'callbackCompiledMethodUnload' to sync exit.
>> I think that it is more reliable then using stdout for this (even with flushing). 
>> However, it might be fixed later, if we find any issues with current version.
>
> I agree I don't think we should rely on stdout. I updated the test so all the event checking happens in the agent, and I kept some of the logging for debugging.

Thank for moving logic into test process. I wonder if separate process is needed at all now?
Might be it is possible to eliminate 
`ProcessTools.createTestJavaProcessBuilder(`
and just do ll checks in the test?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28683#discussion_r2656577743


More information about the serviceability-dev mailing list