8185505: AArch64: Port AOT

Yang Zhang Yang.Zhang at arm.com
Mon Apr 23 07:14:08 UTC 2018


Hi Andrew

I have tested the patches in my environment. AOT test cases in jtreg are passed, and there aren't new failed cases in hotspot jtreg on no matter aarch64 or x86 platform.
But when using jaotc to compile java.base with an option "--compile-for-tiered", there is an overflow error on aarch64 platform. There isn't such an error on x86 platform.

PS. Error log:
In function `sun.net.idn.StringPrep.prepare(Lsun/text/normalizer/UCharacterIterator;I)Ljava/lang/StringBuffer;':(.text+0x440c): relocation truncated to fit: R_AARCH64_CALL26 against `Stub<backedge_event(MethodCountersPointer,int,int)void>'libjava.base.o: In function `sun.net.idn.StringPrep.<init>(Ljava/io/InputStream;)V':(.text+0x6108): additional relocation overflows omitted from the output
        at jdk.aot/jdk.tools.jaotc.Linker.link(Linker.java:131)
        at jdk.aot/jdk.tools.jaotc.Main.run(Main.java:220)
        at jdk.aot/jdk.tools.jaotc.Main.run(Main.java:101)
        at jdk.aot/jdk.tools.jaotc.Main.main(Main.java:80)

Regards
Yang

-----Original Message-----
From: hotspot-dev <hotspot-dev-bounces at openjdk.java.net> On Behalf Of Vladimir Kozlov
Sent: Wednesday, April 18, 2018 8:30 AM
To: Andrew Haley <aph at redhat.com>; Ningsheng Jian <Ningsheng.Jian at arm.com>; hotspot-dev at openjdk.java.net
Cc: nd <nd at arm.com>
Subject: Re: 8185505: AArch64: Port AOT

And I forgot to say that changes looks good to me.

Thanks,
Vladimir

On 4/17/18 9:53 AM, Vladimir Kozlov wrote:
> On 4/16/18 2:03 AM, Andrew Haley wrote:
>> On 04/16/2018 09:53 AM, Ningsheng Jian wrote:
>>> I can see both the jdk patch and Graal PR contain changes of 
>>> AArch64Assembler.java and AArch64MacroAssembler.java, but the changes looks somewhat different. How will they be synced?
>>
>> The changes to Graal in JDK do no more than allow OpenJDK to build.  
>> They are not called by anything, and will disappear at the next Graal import.
>>
>>> I noticed that in make/hotspot/lib/JvmFeatures.gmk line ~144, there's:
>>>
>>>    JVM_EXCLUDE_FILES += \
>>>        compiledIC_aot_x86_64.cpp
>>>
>>> Do you want to add compiledIC_aot_aarch64.cpp to that list?
>>
>> I don't really know what this does, so I have no idea.
> 
> It was done when we did not support/build AOT on Win and MacOS. It 
> also work when AOT is disabled in
> build: configure --disable-aot
> We have to exclude to AOT files to avoid build failure because they do not have #ifdef INCLUDE_AOT.
> 
> I think compiledIC_aot_aarch64.cpp should be added to exclude list 
> too. And you can test you code with --disable-aot
> 
> Vladimir
> 
>>
>>> I also found that _immutable_PIC and its getters/setters are in the 
>>> INCLUDE_AOT block, but some of their uses are not:
>>>
>>> src/hotspot/cpu/aarch64/compiledIC_aarch64.cpp:
>>>
>>> 61   if (cbuf.immutable_PIC()) {
>>>
>>> src/hotspot/share/jvmci/jvmciCodeInstaller.cpp:
>>>
>>> 594   buffer.set_immutable_PIC(_immutable_pic_compilation);
>>> 628   buffer.set_immutable_PIC(_immutable_pic_compilation);
>>
>> Thank you.  For the sake of consistency I will change it.
>>


More information about the hotspot-dev mailing list