8185505: AArch64: Port AOT

Ningsheng Jian Ningsheng.Jian at arm.com
Tue Apr 24 05:45:53 UTC 2018


> -----Original Message-----
> From: Andrew Haley <aph at redhat.com>
> Sent: Monday, April 23, 2018 6:38 PM
> To: Yang Zhang <Yang.Zhang at arm.com>; Vladimir Kozlov
> <vladimir.kozlov at oracle.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
> 
> On 04/23/2018 08:14 AM, Yang Zhang wrote:
> 
> > 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.
> 
> Yep, I know that.  It's because there is a 30-bit limit in the range of a branch,
> and if we have a very large text section the offset to the PLT stub may be out
> of range.  There is some logic in the GNU linker to handle this, and I'll haver
> a look at how it works.
> 
> I don't want to hold up this patch for the overflow issue for two reasons.
> Firstly, if you use such a huge AOT-compiled binary your performance will
> suffer greatly.  It makes much more sense to compile only what you need
> because otherwise your startup time will actually be slower than not using
> AOT compilation at all.  Secondly, I think it will require some reworking of
> the way that the AOT compiler works to fix this, and I'd rather do that in a
> later patch.
> 

Yes, I agree to leave it as it is for now.

Specifically for the link error Yang met, since the stub code (not the GOT cases) and the call site are both in .text section, I think it might be helpful to issue warning/error when generating the relocation entry (before the long time linking phase). But since a later patch will fix this, it's OK to leave it as it is in this patch. 

Two more nits:

My Eclipse has some warnings that there are some imports never used in these files:
- AArch64JELFRelocObject.java
- AMD64JELFRelocObject.java
Maybe remove those unused imports in these two files?

In file AArch64JELFRelocObject.java, line 110:
            case Elf64_Ehdr.EM_AARCH64:
                // Return R_X86_64_* entries based on relocType
Should the comment be R_AARCH64_* ?

Otherwise, looks good to me ( not a reviewer :-) )

Thanks,
Ningsheng






More information about the hotspot-dev mailing list