[PATCH] linux-sparc build fixes

Erik Helin erik.helin at oracle.com
Wed Jun 14 11:50:06 UTC 2017

Hey Adrian,

thanks for contributing and signing the OCA!

I think the first three patches (hotspot-add-missing-log-header.diff, 
hotspot-fix-checkbytebuffer.diff, rename-sparc-linux-atomic-header.diff) 
all look good, thanks for fixing broken code. Consider them Reviewed by 
me. Every patch needs a corresponding issue in the bug tracker, so I 
went ahead and created:
- https://bugs.openjdk.java.net/browse/JDK-8182163
- https://bugs.openjdk.java.net/browse/JDK-8182164
- https://bugs.openjdk.java.net/browse/JDK-8182165

For the last of those three patches, 
rename-space-linux-atomic-header.diff, did you do `hg mv` when renaming 
the file (in order to preserve version control history)?

For the fourth patch, fix-zero-build-on-sparc.diff, I'm not so sure. For 
example, the following is a bit surprising to me (mostly because I'm not 
familiar with zero):

--- a/hotspot/src/share/vm/gc/shared/memset_with_concurrent_readers.hpp
+++ b/hotspot/src/share/vm/gc/shared/memset_with_concurrent_readers.hpp
@@ -37,7 +37,7 @@
  // understanding that there may be concurrent readers of that memory.
  void memset_with_concurrent_readers(void* to, int value, size_t size);

-#ifdef SPARC
+#if defined(SPARC) && !defined(ZERO)

When this code was written, the intent was clearly to have a specialized 
version of this function for SPARC. When writing such code, do we always 
have to take into account the zero case with !defined(ZERO)? That 
doesn't seem like the right (or a scalable) approach to me.

Severin and/or Roman, do you guys know more about Zero and how this 
should work? If I want to write a function that I want to specialize for 
e.g. x86-64 or arm, do I always have to take Zero into account? Or 
should some other define be used, like #ifdef TARGET_ARCH_sparc?


On 06/09/2017 12:20 PM, John Paul Adrian Glaubitz wrote:
> Hi!
> I am currently working on fixing OpenJDK-9 on all non-mainstream
> targets available in Debian. For Debian/sparc64, the attached four
> patches were necessary to make the build succeed [1].
> I know the patches cannot be merged right now, but I'm posting them
> anyway in case someone else is interested in using them.
> All patches are:
>     Signed-off-by: John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de>
> I also signed the OCA.
> I'm now looking into fixing the builds on alpha (DEC Alpha), armel
> (ARMv4T), m68k (680x0), powerpc (PPC32) and sh4 (SuperH/J-Core).
> Cheers,
> Adrian
>> [1] https://buildd.debian.org/status/fetch.php?pkg=openjdk-9&arch=sparc64&ver=9%7Eb170-2&stamp=1496931563&raw=0

More information about the hotspot-dev mailing list