RFR (XS) 8229176: Shenandoah should acquire CodeCache_lock without safepoint check

Aleksey Shipilev shade at redhat.com
Tue Aug 6 09:10:31 UTC 2019


P1 bug:
  https://bugs.openjdk.java.net/browse/JDK-8229176

CodeCache_lock is defined with Monitor::_safepoint_check_never, should be acquired without safepoint
check. New stronger assert introduced by JDK-8229000 fails because of that.

Fix:

diff -r 8f067351c370 src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp   Mon Aug 05 16:27:30 2019 -0700
+++ b/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp   Tue Aug 06 11:08:36 2019 +0200
@@ -201,5 +201,5 @@
     }
     case 2: {
-      CodeCache_lock->lock();
+      CodeCache_lock->lock_without_safepoint_check();
       break;
     }

Testing: hotspot_gc_shenandoah (massive failures before, no failures after)

-- 
Thanks,
-Aleksey




More information about the hotspot-gc-dev mailing list