RFR: 8369147: Various issues with new tests added by JDK-8316694

Evgeny Astigeevich eastigeevich at openjdk.org
Wed Oct 15 15:54:23 UTC 2025


On Tue, 14 Oct 2025 23:44:39 GMT, Chad Rakoczy <duke at openjdk.org> wrote:

>> [JDK-8369147](https://bugs.openjdk.org/browse/JDK-8369147)
>> 
>> Fixes tests added in [JDK-8316694](https://bugs.openjdk.org/browse/JDK-8316694)
>> 
>> `DeoptimizeRelocatedNMethod.java` and `RelocateNMethod.java` failed because they attempted to relocate nmethods to the `MethodProfiled` code heap which does not exist when `TieredCompilation` is false. Updated the tests to use `MethodNonProfiled` heap which exists regardless of `TieredCompilation`
>> 
>> `StressNMethodRelocation.java` runs for 60 seconds and also compiles 1024 methods with C2. This was causing the test to timeout if the compilation took too much time. Increasing the timeout to 5 minutes should give C2 enough time to compile the functions
>> 
>> `NMethodRelocationTest.java` runs using SerialGC which caused a multiple GC error when trying to run with another GC. Added a requires to force SerialGC
>
> The following occurs when running DeoptimizeRelocatedNMethod on PPC64
> 
> #  Internal Error (jdk/src/hotspot/cpu/ppc/nativeInst_ppc.cpp:405)
> #  assert(!decode(i1, i2)) failed: already patched
> 
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
> V  [libjvm.so+0x1701784]  NativePostCallNop::patch(int, int)+0xf4  (nativeInst_ppc.cpp:405)
> V  [libjvm.so+0x1718414]  nmethod::finalize_relocations()+0x6f4  (nmethod.cpp:2059)
> V  [libjvm.so+0x171891c]  nmethod::post_init()+0x5c  (nmethod.cpp:1252)
> V  [libjvm.so+0x171a8dc]  nmethod::relocate(CodeBlobType)+0x1ec  (nmethod.cpp:1515)
> V  [libjvm.so+0x200b598]  WB_RelocateNMethodFromMethod+0x388  (whitebox.cpp:1653)
> j  jdk.test.whitebox.WhiteBox.relocateNMethodFromMethod0(Ljava/lang/reflect/Executable;I)V+0
> j  jdk.test.whitebox.WhiteBox.relocateNMethodFromMethod(Ljava/lang/reflect/Executable;I)V+8
> j  compiler.whitebox.DeoptimizeRelocatedNMethod.main([Ljava/lang/String;)V+50
> 
> 
> @TheRealMDoerr @reinrich Do you have any ideas on a solution for this? I don't have any experience working with PPC so guidance would be greatly appreciated

@chadrako 
> StressNMethodRelocation.java runs for 60 seconds and also compiles 1024 methods with C2. This was causing the test to timeout if the compilation took too much time. 

Maybe instead of hardcoding the number of methods (1024), we can have a reasonable time slice, e.g. 10 seconds, and compile as many methods as possible.

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

PR Comment: https://git.openjdk.org/jdk/pull/27659#issuecomment-3407142928


More information about the serviceability-dev mailing list