[15] RFR (XS) 8247474: Shenandoah: Windows build warning after JDK-8247310

Aleksey Shipilev shade at redhat.com
Fri Jun 12 10:56:18 UTC 2020


(resending from proper email)

Bug:
  https://bugs.openjdk.java.net/browse/JDK-8247474

Since the underlying cause is the changeset in 15, I am planning to push it to jdk/jdk15.

Fix:

diff -r a39eb5a4f1c1 src/hotspot/share/gc/shenandoah/shenandoahPacer.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahPacer.cpp       Thu Jun 11 18:16:32 2020 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahPacer.cpp       Fri Jun 12 12:38:30 2020 +0200
@@ -279,10 +279,11 @@
 }

-void ShenandoahPacer::wait(long time_ms) {
+void ShenandoahPacer::wait(size_t time_ms) {
   // Perform timed wait. It works like like sleep(), except without modifying
   // the thread interruptible status. MonitorLocker also checks for safepoints.
   assert(time_ms > 0, "Should not call this with zero argument, as it would stall until notify");
+  assert(time_ms <= LONG_MAX, "Sanity");
   MonitorLocker locker(_wait_monitor);
-  _wait_monitor->wait(time_ms);
+  _wait_monitor->wait((long)time_ms);
 }

diff -r a39eb5a4f1c1 src/hotspot/share/gc/shenandoah/shenandoahPacer.hpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahPacer.hpp       Thu Jun 11 18:16:32 2020 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahPacer.hpp       Fri Jun 12 12:38:30 2020 +0200
@@ -102,5 +102,5 @@
   size_t update_and_get_progress_history();

-  void wait(long time_ms);
+  void wait(size_t time_ms);
   void notify_waiters();
 };


Testing: Linux, Windows builds; hotspot_gc_shenandoah

Thanks,
-Aleksey



More information about the hotspot-gc-dev mailing list