RFR: Basic support for x86_32: build and run in STW configuration

Aleksey Shipilev shade at redhat.com
Mon Apr 16 10:58:55 UTC 2018


Our current code allows us to support x86_32, without concurrent phases enabled. Having
semi-functional 32-bit build is interesting for footprint experiments.

The patch is trivial:

diff -r b72dda8b7c36 src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp	Mon Apr 16 11:32:52 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp	Mon Apr 16 12:50:15 2018 +0200
@@ -32,10 +32,31 @@

 void ShenandoahArguments::initialize_flags() {

-#if !(defined AARCH64 || defined AMD64)
+#if !(defined AARCH64 || defined AMD64 || defined IA32)
   vm_exit_during_initialization("Shenandoah GC is not supported on this platform.");
 #endif

+#ifdef IA32
+  log_warning(gc)("Shenandoah GC is not fully supported on this platform:");
+  log_warning(gc)("  concurrent modes are not supported, only STW cycles are enabled;");
+  log_warning(gc)("  arch-specific barrier code is not implemented, disabling barriers;");
+
+  FLAG_SET_DEFAULT(ShenandoahGCHeuristics,           "passive");
+
+  FLAG_SET_DEFAULT(ShenandoahSATBBarrier,            false);
+  FLAG_SET_DEFAULT(ShenandoahConditionalSATBBarrier, false);
+  FLAG_SET_DEFAULT(ShenandoahKeepAliveBarrier,       false);
+  FLAG_SET_DEFAULT(ShenandoahWriteBarrier,           false);
+  FLAG_SET_DEFAULT(ShenandoahReadBarrier,            false);
+  FLAG_SET_DEFAULT(ShenandoahStoreValEnqueueBarrier, false);
+  FLAG_SET_DEFAULT(ShenandoahStoreValWriteBarrier,   false);
+  FLAG_SET_DEFAULT(ShenandoahStoreValReadBarrier,    false);
+  FLAG_SET_DEFAULT(ShenandoahCASBarrier,             false);
+  FLAG_SET_DEFAULT(ShenandoahAcmpBarrier,            false);
+  FLAG_SET_DEFAULT(ShenandoahCloneBarrier,           false);
+  FLAG_SET_DEFAULT(UseShenandoahMatrix,              false);
+#endif
+
 #ifdef _LP64
   // The optimized ObjArrayChunkedTask takes some bits away from the full 64 addressable
   // bits, fail if we ever attempt to address more than we can. Only valid on 64bit.


Testing: x86_32 build and run, hotspot_gc_shenandoah on x86_32 (some tests fail with dull errors,
not worth fixing specifically for x86_32).

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list