RFR [11,8]: Fix Windows build failures

Aleksey Shipilev shade at redhat.com
Thu Nov 1 11:25:45 UTC 2018


This fixes a trivial build failure in sh/jdk11 on Windows, and makes sure this code looks the same
across all repositories.

*) sh/jdk11 patch:

diff -r e48900685530 src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp  Thu Oct 25 20:38:26 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp  Thu Nov 01 12:23:34 2018 +0100
@@ -593,11 +593,11 @@

   int region_size_log = log2_long((jlong) region_size);
   // Recalculate the region size to make sure it's a power of
   // 2. This means that region_size is the largest power of 2 that's
   // <= what we've calculated so far.
-  region_size = (1u << region_size_log);
+  region_size = size_t(1) << region_size_log;

   // Now, set up the globals.
   guarantee(RegionSizeBytesShift == 0, "we should only set it once");
   RegionSizeBytesShift = (size_t)region_size_log;


*) sh/jdk8 patch:

diff -r 0f8d2b4af256 src/share/vm/gc_implementation/shenandoah/shenandoahHeapRegion.cpp
--- a/src/share/vm/gc_implementation/shenandoah/shenandoahHeapRegion.cpp        Thu Oct 25 20:38:26
2018 +0200
+++ b/src/share/vm/gc_implementation/shenandoah/shenandoahHeapRegion.cpp        Thu Nov 01 12:20:38
2018 +0100
@@ -545,11 +545,11 @@

   int region_size_log = log2_long((jlong) region_size);
   // Recalculate the region size to make sure it's a power of
   // 2. This means that region_size is the largest power of 2 that's
   // <= what we've calculated so far.
-  region_size = (size_t(1) << region_size_log);
+  region_size = size_t(1) << region_size_log;

   // Now, set up the globals.
   guarantee(RegionSizeBytesShift == 0, "we should only set it once");
   RegionSizeBytesShift = (size_t)region_size_log;


Testing: Windows builds for sh/jdk8 and sh/jdk11

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list