RFR #2 (M) 8148146: Integrate new internal Unsafe entry points, and basic intrinsic support for VarHandles
Vladimir Kozlov
vladimir.kozlov at oracle.com
Wed Feb 17 19:16:06 UTC 2016
In general it looks good to me. My main question is about implementation of new functionality on other platforms.
When it will be done? Yes, it works now because you have guard match_rule_supported(). But we usually do implementation
on platforms at least as separate RFE. What is your plan?
SAP guys should also test it on PPC64.
What test/compiler/unsafe/generate-unsafe-tests.sh is for? It is not used by regression testing as far as I see.
And please, push it into hs-comp for nightly testing.
Thanks,
Vladimir
On 2/17/16 3:24 AM, Aleksey Shipilev wrote:
> On 02/17/2016 12:29 AM, Andrew Dinn wrote:
>> On 15/02/16 14:13, Andrew Dinn wrote:
>>>> The changes are supposed to generate the same code for old Unsafe
>>>> methods -- the refactoring shuffles the compiler code around, but
>>>> the sequence of accesses/barriers should stay the same. Eyeballing
>>>> x86_64 assembly indeed shows it is the same, but I haven't looked
>>>> beyond x86.
>>
>> Unfortunately, the graphs are not quite the same and that affects the
>> generated code on AArch64 even though it has no visible effect on x86.
>> The critical difference is that for volatile puts and gets you have
>> omitted to insert the MemBarRelease and MemBarAcquire nodes.
>
> Dang. You are right, I have mistranslated the original code. Thanks for
> catching this one!
>
> New version that includes a variant of your fix, and also trims down on
> Unsafe changes, as John suggested in a separate thread:
> http://cr.openjdk.java.net/~shade/8148146/webrev.hs.02/
> http://cr.openjdk.java.net/~shade/8148146/webrev.jdk.02/
>
> This version still passes JPRT, microbenchmark results are fine. I am
> respinning other tests to see if anything is broken.
>
> Cheers,
> -Aleksey
>
> P.S. Andrew, if you have before/after builds for AArch64 and a suitable
> physical rig, you might be interested to run Unsafe benchmarks (this is
> a JMH runnable JAR):
> http://cr.openjdk.java.net/~shade/varhandles/unsafe-bench.jar
>
>
More information about the jdk9-dev
mailing list