United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7061192 option handling adjustments for oracle and embedded builds
JDK-7061192 : option handling adjustments for oracle and embedded builds

Details
Type:
Enhancement
Submit Date:
2011-06-30
Status:
Closed
Updated Date:
2011-11-25
Project Name:
JDK
Resolved Date:
2011-09-30
Component:
hotspot
OS:
generic
Sub-Component:
runtime
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs22
Fixed Versions:
hs22 (b01)

Related Reports
Backport:
Backport:

Sub Tasks

Description
Some options are different between oracle and openjdk builds; the differences should be eliminated to simplify development.  Some options also need different default values in embedded vs regular builds.

                                    

Comments
EVALUATION

UsePerfData defaults to false in embedded builds, true in regular SE builds.

DesiredMethodLimit was a product option in oracle builds, but a develop option in openjdk builds; make it a develop option in all builds, but issue a warning in product builds and allow the VM to run.

Make UseCompressedStrings an obsolete option.

This eliminates some tedious differences between the oracle and openjdk builds.
                                     
2011-06-30
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/eb94b7226b7a
                                     
2011-07-07
SUGGESTED FIX

changeset:   2540:eb94b7226b7a
user:        jcoomes
date:        Wed Jul 06 12:17:44 2011 -0700
summary:     7061192: option handling adjustments for oracle and embedded builds

diff -r 7d9e451f5416 -r eb94b7226b7a src/share/vm/runtime/arguments.cpp
--- a/src/share/vm/runtime/arguments.cpp	Wed Jul 06 12:03:01 2011 -0700
+++ b/src/share/vm/runtime/arguments.cpp	Wed Jul 06 12:17:44 2011 -0700
@@ -251,6 +251,11 @@
   { "UseParallelOldGCDensePrefix",
                            JDK_Version::jdk_update(6,27), JDK_Version::jdk(8) },
   { "AllowTransitionalJSR292",       JDK_Version::jdk(7), JDK_Version::jdk(8) },
+  { "UseCompressedStrings",          JDK_Version::jdk(7), JDK_Version::jdk(8) },
+#ifdef PRODUCT
+  { "DesiredMethodLimit",
+                           JDK_Version::jdk_update(7, 2), JDK_Version::jdk(8) },
+#endif // PRODUCT
   { NULL, JDK_Version(0), JDK_Version(0) }
 };
 
@@ -2912,6 +2917,18 @@
   }
 }
 
+// Disable options not supported in this release, with a warning if they
+// were explicitly requested on the command-line
+#define UNSUPPORTED_OPTION(opt, description)                    \
+do {                                                            \
+  if (opt) {                                                    \
+    if (FLAG_IS_CMDLINE(opt)) {                                 \
+      warning(description " is disabled in this release.");     \
+    }                                                           \
+    FLAG_SET_DEFAULT(opt, false);                               \
+  }                                                             \
+} while(0)
+
 // Parse entry point called from JNI_CreateJavaVM
 
 jint Arguments::parse(const JavaVMInitArgs* args) {
@@ -3009,6 +3026,13 @@
     return result;
   }
 
+#ifdef JAVASE_EMBEDDED
+  #ifdef PPC
+    UNSUPPORTED_OPTION(EnableInvokeDynamic, "Invoke dynamic");
+  #endif
+  UNSUPPORTED_OPTION(UseG1GC, "G1 GC");
+#endif
+
 #ifndef PRODUCT
   if (TraceBytecodesAt != 0) {
     TraceBytecodes = true;
diff -r 7d9e451f5416 -r eb94b7226b7a src/share/vm/runtime/globals.hpp
--- a/src/share/vm/runtime/globals.hpp	Wed Jul 06 12:03:01 2011 -0700
+++ b/src/share/vm/runtime/globals.hpp	Wed Jul 06 12:17:44 2011 -0700
@@ -343,6 +343,12 @@
 #define falseInTiered true
 #endif
 
+#ifdef JAVASE_EMBEDDED
+#define falseInEmbedded false
+#else
+#define falseInEmbedded true
+#endif
+
 // develop flags are settable / visible only during development and are constant in the PRODUCT version
 // product flags are always settable / visible
 // notproduct flags are settable / visible only during development and are not declared in the PRODUCT version
@@ -3611,13 +3617,9 @@
                                                                             \
   /* flags for performance data collection */                               \
                                                                             \
-  NOT_EMBEDDED(product(bool, UsePerfData, true,                             \
+  product(bool, UsePerfData, falseInEmbedded,                               \
           "Flag to disable jvmstat instrumentation for performance testing" \
-          "and problem isolation purposes."))                               \
-                                                                            \
-  EMBEDDED_ONLY(product(bool, UsePerfData, false,                           \
-          "Flag to disable jvmstat instrumentation for performance testing" \
-          "and problem isolation purposes."))                               \
+          "and problem isolation purposes.")                                \
                                                                             \
   product(bool, PerfDataSaveToFile, false,                                  \
           "Save PerfData memory to hsperfdata_<pid> file on exit")          \
                                     
2011-07-08
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/eb94b7226b7a
                                     
2011-07-13
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/eb94b7226b7a
                                     
2011-07-17



Hardware and Software, Engineered to Work Together