CompareAndSwapNode support
Christian Thalinger
christian.thalinger at oracle.com
Thu Oct 24 18:00:53 PDT 2013
On Oct 24, 2013, at 3:24 PM, Deneau, Tom <tom.deneau at amd.com> wrote:
> Some additional information on this...
>
> The original junit test was written using lambdas and so could not be run under java 7. Since our junit framework also supports java7 style tests, I rewrote the test to be java 7, and rebuilt graal with java 7. And with no other changes to graal, the test now passes.
>
> Does this make any sense?
>
> -- Tom
>
> From: Deneau, Tom
> Sent: Thursday, October 24, 2013 3:21 PM
> To: graal-dev at openjdk.java.net
> Subject: CompareAndSwapNode support
>
> In the HSAIL backend, we had support for CompareAndSwapNode. (we had not pushed this out to the trunk yet).
>
> As part of the merge with the new runtime infrastructure changes, I see that our CompareAndSwapNode support is broken.
> I'm trying to understand how to get it working again.
>
> In the particular test I'm looking at the java code calls atomicInt.getAndAdd(constant)
Do you mean getAndAddInt? If you are talking about the Unsafe guys these exist since 1.8. So compiling (and running) with 7 or 8 definitely makes a difference.
>
> First I noticed that we were getting Invoke nodes for things like getIntVolatile and compareAndSwapInt.
> So I assumed the UnsafeSubstitutions needed to be enabled for our backend.
>
> When I enabled these, I got the following error which doesn't mean anything to me...
>
> java.lang.AssertionError: <unknown> has unexpected usage 20|LoadField#value of checkcast 19|GuardingPi at <unknown>
> at com.oracle.graal.replacements.NodeIntrinsificationPhase.checkCheckCastUsage(NodeIntrinsificationPhase.java:387)
> at com.oracle.graal.replacements.NodeIntrinsificationPhase.checkCheckCastUsage(NodeIntrinsificationPhase.java:382)
> at com.oracle.graal.replacements.NodeIntrinsificationPhase.cleanUpReturnCheckCast(NodeIntrinsificationPhase.java:328)
> at com.oracle.graal.replacements.NodeIntrinsificationPhase.run(NodeIntrinsificationPhase.java:67)
>
> Any suggestions?
>
> -- Tom
>
More information about the graal-dev
mailing list