[RFR] [8u] 8236829: JDK-8232102 backport breaks s390

Andrew John Hughes gnu.andrew at redhat.com
Thu Jan 9 02:02:00 UTC 2020


Bug: https://bugs.openjdk.java.net/browse/JDK-8236829
Webrev: https://cr.openjdk.java.net/~andrew/shenandoah-8/8236829/webrev.01/

The backport of JDK-8232102 to the 8u Shenandoah port - specifically the
use of byte_size_in_proper_unit - broke the build on s390 (31-bit). This
is the recurring problem that size_t and uint are not the same on this
platform.

Hence we get several format warnings such as:

/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.242.b05-0.1.ea.el7.s390/openjdk/hotspot/src/share/vm/gc_implementation/shenandoah
/shenandoahHeapRegion.cpp: In static member function 'static void
ShenandoahHeapRegion::setup_sizes(size_t)':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.242.b05-0.1.ea.el7.s390/openjdk/hotspot/src/share/vm/gc_implementation/shenandoah
/shenandoahHeapRegion.cpp:482:124: error: format '%zu' expects argument
of type 'size_t', but argument 6 has type 'unsigned int'
 [-Werror=format=]

byte_size_in_proper_unit(ShenandoahMinRegionSize),
proper_unit_for_byte_size(ShenandoahMinRegionSize));

Forcing byte_size_in_proper_unit to use size_t, as we did before in
https://hg.openjdk.java.net/aarch64-port/jdk8u-shenandoah/hotspot/rev/ad280373e7cc,
fixes the problem and allowed s390 to build 8u242 b05 & b06.

Thanks,
-- 
Andrew :)

Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew



More information about the shenandoah-dev mailing list