[aarch64-port-dev ] [aarch64-port-dev] Compile error in stubGenerator_aarch64.cpp

Daniel Stewart daniel.stewart at linaro.org
Wed Aug 9 14:26:10 UTC 2017


I agree that the change itself is not innocuous due to potential
overlapping. I was more interested why it failed at compile time. Being new
to OpenJDK, I figured there must be something I'm missing. I thought the
change would compile fine but fail during runtime. But this code is somehow
tied to some dynamic insertion (??) which is used to make
jbyte_conjoint_arraycopy, jbyte_disjoint_arraycopy, etc.

I just don't understand how that part works.

Daniel

On Wed, Aug 9, 2017 at 10:19 AM, Andrew Dinn <adinn at redhat.com> wrote:

> On 09/08/17 14:50, Daniel Stewart wrote:
> > Moving this to a different thread to avoid stepping on Andrew’s original
> > thread..
> >
> > I had been trying to look into the copy_memory() routine (which gets used
> > by both disjoint and conjoint copies) to see if interleaving the loads
> and
> > stores (as referenced in the document you mention) obtains better
> > performance than all the loads followed by all the stores, as is
> currently
> > implemented.
> >
> > However, even when trying to do this only for disjoint copies, I seem to
> > have an issue with it. It seems any sort of change I make to the
> > stubGenerator_aarch64.cpp file for JDK9 or 10 results in errors
> compiling.
> >
> > Is there some magic a new person to OpenJDK like myself is missing when
> > trying to modify this file?
> >
> >
> > Here’s the diff I did:
> > diff -r 41421b726632 src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
> > --- a/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp      Mon Jul 24
> 17:26:41
> > 2017 +0000
> > +++ b/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp      Wed Aug 09
> 13:13:24
> > 2017 +0000
> > @@ -1231,11 +1231,12 @@
> >        __ stpq(v2, v3, Address(dend, -32));
> >      } else {
> >        __ ldp(t0, t1, Address(s, 0));
> > +      __ stp(t0, t1, Address(d, 0));
> >        __ ldp(t2, t3, Address(s, 16));
> >        __ ldp(t4, t5, Address(send, -32));
> >        __ ldp(t6, t7, Address(send, -16));
> >
> > -      __ stp(t0, t1, Address(d, 0));
> > +//      __ stp(t0, t1, Address(d, 0));
> >        __ stp(t2, t3, Address(d, 16));
> >        __ stp(t4, t5, Address(dend, -32));
> >        __ stp(t6, t7, Address(dend, -16));
> >
> >
> > And here’s the error I get:
> > Creating support/demos/image/jfc/Metalworks/Metalworks.jar
> > Creating interim jimage
> > Invalid path in metadata, skipping
> > /modules/java.base/META-INF/services/java.nio.file.spi.
> FileSystemProvider
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/AESCipher$
> AES128_ECB_NoPadding.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/AESCipher$
> AES128_OFB_NoPadding.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/AESCipher$OidImpl.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/BlockCipherParamsCore.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/CipherForKeyProtector.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/DESedeWrapCipher.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/GaloisCounterMode.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/KeyGeneratorCore$HmacSHA2KG$
> SHA224.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/KeyGeneratorCore$HmacSHA2KG.
> class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/OAEPParameters.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/PBEKey.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/PBEKeyFactory$
> PBEWithHmacSHA1AndAES_128.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/PBEKeyFactory$
> PBEWithHmacSHA256AndAES_256.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/PBEKeyFactory$
> PBEWithMD5AndDES.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/PBEKeyFactory$
> PBEWithSHA1AndRC2_40.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/PBEParameters.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/PBES2Core$
> HmacSHA224AndAES_256.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/PBES2Parameters$
> HmacSHA384AndAES_128.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/PBES2Parameters.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/PBKDF2Core$HmacSHA512.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/PBKDF2Core.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/PBMAC1Core$HmacSHA1.class
> > Invalid path in metadata, skipping
> > /modules/java.base/com/sun/crypto/provider/PKCS12PBECipherCore$
> PBEWithSHA1AndRC2_40.class
> > …
> > Invalid path in metadata, skipping
> > /modules/java.logging/java/util/logging/FileHandler$
> InitializationErrorManager.class
> > Invalid path in metadata, skipping
> > /modules/java.logging/java/util/logging/Level$1.class
> > Invalid path in metadata, skipping
> > /modules/java.logging/java/util/logging/Logger.class
> > Invalid path in metadata, skipping /modules/java.logging/java/util
> Invalid
> > path in metadata, skipping
> > /modules/java.logging/sun/util/logging/resources/logging_sv.class
> > Invalid path in metadata, skipping
> > /modules/java.logging/sun/util/logging/resources/logging_zh_HK.class
> > Creating support/classlist.jar
> > gmake[3]: ***
> > [/home/stewartd/openjdk/OpenJDK10/hs/build/linux-
> aarch64-normal-server-release/support/link_opt/classlist]
> > Error 1
> > gmake[3]: *** Deleting file
> > `/home/stewartd/openjdk/OpenJDK10/hs/build/linux-
> aarch64-normal-server-release/support/link_opt/classlist'
> > gmake[2]: *** [generate-link-opt-data] Error 1
> >
> > ERROR: Build failed for target 'images' in configuration
> > 'linux-aarch64-normal-server-release' (exit code 2) Stopping sjavac
> server
> That change doesn't look like it is guaranteed to be innocuous to me.
> Does it do the right thing if you are copying data from an array into
> itself? -- say, for example, that you are shuffling String text along in
> a byte[] or char[]. Is it possible for the distance between the load and
> store addresses to be such that your early write to Address(d, 0) can
> change the values read at Address(s, 16/-32/-16)?
>
> I say that because the error messages suggest that what is going wrong
> is to do with paths i.e. text.
>
> regards,
>
>
> Andrew Dinn
> -----------
> Senior Principal Software Engineer
> Red Hat UK Ltd
> Registered in England and Wales under Company Registration No. 03798903
> Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
>



-- 
Daniel Stewart


More information about the aarch64-port-dev mailing list