RFR: Disable AOT without noise in stderr

Aleksey Shipilev shade at redhat.com
Wed Jun 13 07:09:48 UTC 2018


Current AOT disabling is noisy: it always prints the warning message, because +UseAOT is by default.
Also, the block is in the wrong place, should be in shenandoahArguments.

Fix:

diff -r 68c7a2b7aab5 src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp	Tue Jun 12 19:32:23 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp	Wed Jun 13 09:08:17 2018 +0200
@@ -173,6 +173,14 @@
     FLAG_SET_DEFAULT(ClassUnloadingWithConcurrentMark, false);
   }

+  // AOT is not supported yet
+  if (UseAOT) {
+    if (!FLAG_IS_DEFAULT(UseAOT)) {
+      warning("Shenandoah does not support AOT at this moment, disabling UseAOT");
+    }
+    FLAG_SET_DEFAULT(UseAOT, false);
+  }
+
   // JNI fast get field stuff is not currently supported by Shenandoah.
   // It would introduce another heap memory access for reading the forwarding
   // pointer, which would have to be guarded by the signal handler machinery.
diff -r 68c7a2b7aab5 src/hotspot/share/gc/shenandoah/shenandoahHeuristics.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeuristics.cpp	Tue Jun 12 19:32:23 2018 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeuristics.cpp	Wed Jun 13 09:08:17 2018 +0200
@@ -86,11 +86,6 @@
   if (!ClassUnloadingWithConcurrentMark) {
     FLAG_SET_DEFAULT(ShenandoahUnloadClassesFrequency, 0);
   }
-
-  if (UseAOT) {
-    warning("Shenandoah does not support AOT at this moment");
-    FLAG_SET_DEFAULT(UseAOT, false);
-  }
 }

 ShenandoahHeuristics::~ShenandoahHeuristics() {

Testing: ad-hoc +/-UseAOT runs

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list