RFR: Fix Shenandoah build on s390
Andrew Hughes
gnu.andrew at redhat.com
Thu Aug 23 03:37:49 UTC 2018
Bug: https://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3619
Webrev: http://cr.openjdk.java.net/~andrew/shenandoah-8/pr3619/
A couple of build issues were found when trying to build the
Shenandoah source code base on s390. As the build failures in the
linked bug show, issues arise on s390 that are not visible on other
platforms, because size_t is not equal to uintx on that platform. On
s390, uintx is a unsigned int, while size_t is a long unsigned int.
The attached patch fixes the build issues by switching two format
specifiers in the heuristics code from UINTX_FORMAT to SIZE_FORMAT,
and casting the region size from uintx to size_t in
shenandoahHeapRegion.cpp. The latter is necessary, as otherwise the
calls to MAX2 have mismatched types (uintx, size_t). A possible
alternative may be to use a size_t for the region size instead, but I
went with the solution that seemed the lowest risk on all platforms.
The changes are applied against aarch64/shenandoah-jdk8u, as that's
where s390 builds were tested, but all but the first of the two
changes in shenandoahHeapRegion.cpp are also present in the
shenandoah/jdk11 code. I don't currently have an easy means to test
the shenandoah/jdk11 code on s390, so there may be other issues there
too.
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Web Site: http://fuseyism.com
Twitter: https://twitter.com/gnu_andrew_java
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
More information about the shenandoah-dev
mailing list