To clarify. I agree with this renaming to be pushed into JDK 9.

AOT testing failures will be fixed separately as fix for 8180785 bug which requires changes in Graal. Renaming should be pushed first before we fix Graal to simplify Graal changes (no need to condition for JDK 10 and 9).

Thanks,
Vladimir

On 6/1/17 11:28 AM, Vladimir Kozlov wrote:
Thank you, Paul, for backporting it.

On 6/1/17 8:56 AM, Paul Sandoz wrote:
Hi,

To make it easier on 166 and Graal code to support both 9 and 10 we should back 
port the renaming of the internal Unsafe.compareAndSwap to Unsafe.compareAndSet:

   
http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8181292-unsafe-cas-rename-jdk/webrev/
   
http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8181292-unsafe-cas-rename-hotspot/webrev/

Hotspot changes are fine to me.


This is an explicit back port with a new bug. This is the easiest approach 
given the current nature of how 9 and 10 are currently kept in sync.

The change sets are the same as those associated with the following issues and 
apply cleanly without modification:

   Rename internal Unsafe.compare methods
   https://bugs.openjdk.java.net/browse/JDK-8159995

   [TESTBUG] Some hotspot tests broken after internal Unsafe name changes
   https://bugs.openjdk.java.net/browse/JDK-8180479


When running JPRT tests i observe a Graal test error on 
linux_x64_3.8-fastdebug-c2-hotspot_fast_compiler [*]. I dunno how this is 
manifesting given i cannot find any explicit reference to
jdk.internal.Unsafe.compareAndSwap. Any idea?

This is Graal bug I told about before - not all places in Graal are fixed with 
8181292 changes (only a test was fixed):

https://bugs.openjdk.java.net/browse/JDK-8180785

After you do backport we will fix Graal in JDK 9 and JDK 10. So don't worry 
about those failures. I will update 'Affected' and 'Fix' version later.

Thanks,
Vladimir


Paul.

[*]
[2017-05-31 12:33:08,163] Agent[4]: stdout: Error: Failed compilation: 
compiler.calls.common.InvokeInterface.caller()V: 
org.graalvm.compiler.java.BytecodeParser$BytecodeParserError:
java.lang.InternalError: java.lang.NoSuchMethodException: 
jdk.internal.misc.Unsafe.compareAndSwapInt(java.lang.Object, long, int, int)
[2017-05-31 12:33:08,163] Agent[4]: stdout:     at parsing 
app//compiler.calls.common.InvokeInterface.caller(InvokeInterface.java:45)
[2017-05-31 12:33:08,213] Agent[5]: stdout: Error: Failed compilation: 
compiler.calls.common.InvokeInterface.callerNative()V: 
org.graalvm.compiler.java.BytecodeParser$BytecodeParserError:
java.lang.InternalError: java.lang.NoSuchMethodException: 
jdk.internal.misc.Unsafe.compareAndSwapInt(java.lang.Object, long, int, int)
[2017-05-31 12:33:08,214] Agent[5]: stdout:     at parsing 
app//compiler.calls.common.InvokeInterface.callerNative(InvokeInterface.java:82)
[2017-05-31 12:33:08,214] Agent[5]: stdout: Error: Failed compilation: 
compiler.calls.common.InvokeInterface.<init>()V: 
org.graalvm.compiler.java.BytecodeParser$BytecodeParserError:
java.lang.InternalError: java.lang.NoSuchMethodException: 
jdk.internal.misc.Unsafe.compareAndSwapInt(java.lang.Object, long, int, int)
[2017-05-31 12:33:08,214] Agent[5]: stdout:     at parsing 
app//compiler.calls.common.InvokeInterface.<init>(InvokeInterface.java:31)
[2017-05-31 12:33:08,214] Agent[5]: stdout: Error: Failed compilation: 
compiler.calls.common.InvokeInterface.main([Ljava/lang/String;)V: 
org.graalvm.compiler.java.BytecodeParser$BytecodeParserError:
java.lang.InternalError: java.lang.NoSuchMethodException: 
jdk.internal.misc.Unsafe.compareAndSwapInt(java.lang.Object, long, int, int)
[2017-05-31 12:33:08,214] Agent[5]: stdout:     at parsing 
app//compiler.calls.common.InvokeInterface.main(InvokeInterface.java:35)
[2017-05-31 12:33:08,214] Agent[5]: stdout: Error: Failed compilation: 
compiler.calls.common.InvokeInterface.callee(IJFDLjava/lang/String;)Z:
org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: 
java.lang.InternalError: java.lang.NoSuchMethodException: 
jdk.internal.misc.Unsafe.compareAndSwapInt(java.lang.Object, long, int, int)
[2017-05-31 12:33:08,214] Agent[5]: stdout:     at parsing 
app//compiler.calls.common.InvokeInterface.callee(InvokeInterface.java:60)
[2017-05-31 12:33:08,214] Agent[5]: stdout: Error: Failed compilation: 
compiler.calls.common.InvokeInterface.caller()V: 
org.graalvm.compiler.java.BytecodeParser$BytecodeParserError:
java.lang.InternalError: java.lang.NoSuchMethodException: 
jdk.internal.misc.Unsafe.compareAndSwapInt(java.lang.Object, long, int, int)
[2017-05-31 12:33:08,214] Agent[5]: stdout:     at parsing 
app//compiler.calls.common.InvokeInterface.caller(InvokeInterface.java:45)
[2017-05-31 12:33:08,428] Agent[3]: stdout: Error: Failed compilation: 
compiler.calls.common.InvokeInterface.caller()V: 
org.graalvm.compiler.java.BytecodeParser$BytecodeParserError:
java.lang.InternalError: java.lang.NoSuchMethodException: 
jdk.internal.misc.Unsafe.compareAndSwapInt(java.lang.Object, long, int, int)
[2017-05-31 12:33:08,429] Agent[3]: stdout:     at parsing 
app//compiler.calls.common.InvokeInterface.caller(InvokeInterface.java:45)
TEST: compiler/aot/calls/fromAot/AotInvokeInterface2AotTest.java
TEST JDK: /opt/jprt/T/P1/191630.sandoz/testproduct/linux_x64_3.8-fastdebug

Reply via email to