8202331: Obsolete support for commercial features
authormikael
Thu, 21 Jun 2018 21:37:28 -0700
changeset 50708 bd3a8f48597e
parent 50707 ed45d8e6a44b
child 50709 483806baeba1
8202331: Obsolete support for commercial features Reviewed-by: kvn, cjplummer, dholmes
bin/nashorn/runopt.sh
make/nashorn/project.properties
src/hotspot/share/runtime/arguments.cpp
src/hotspot/share/runtime/flags/jvmFlag.cpp
src/hotspot/share/runtime/flags/jvmFlag.hpp
src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp
src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp
src/hotspot/share/runtime/flags/jvmFlagWriteableList.cpp
test/hotspot/jtreg/runtime/appcds/CommandLineFlagCombo.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/FlagCombo.java
test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java
test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Debugee.java
test/jtreg-ext/requires/VMProps.java
--- a/bin/nashorn/runopt.sh	Thu Jun 21 16:45:29 2018 -0700
+++ b/bin/nashorn/runopt.sh	Thu Jun 21 21:37:28 2018 -0700
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 # 
 # This code is free software; you can redistribute it and/or modify it
@@ -75,7 +75,6 @@
 #
 # see above - already in place, copy the flags down here to disable
 ENABLE_FLIGHT_RECORDER_FLAGS="\
-    -XX:+UnlockCommercialFeatures \
     -XX:+FlightRecorder \
     -XX:FlightRecorderOptions=defaultrecording=true,disk=true,dumponexit=true,dumponexitpath=$JFR_FILENAME,stackdepth=1024"
 
--- a/make/nashorn/project.properties	Thu Jun 21 16:45:29 2018 -0700
+++ b/make/nashorn/project.properties	Thu Jun 21 21:37:28 2018 -0700
@@ -351,7 +351,7 @@
 run.test.xmx=2G
 run.test.xms=2G
 
-# uncomment this jfr.args to enable light recordings. the stack needs to be cranked up to 1024 frames,
+# uncomment this jfr.args to enable flight recordings. the stack needs to be cranked up to 1024 frames,
 # or everything will as of the now drown in lambda forms and be cut off.
 #
 #jfr.args=-XX:StartFlightRecording=disk=true,dumponexit=true,dumponexitpath="test_suite.jfr",stackdepth=1024
--- a/src/hotspot/share/runtime/arguments.cpp	Thu Jun 21 16:45:29 2018 -0700
+++ b/src/hotspot/share/runtime/arguments.cpp	Thu Jun 21 21:37:28 2018 -0700
@@ -488,7 +488,7 @@
  *
  * Recommended approach for removing options:
  *
- * To remove options commonly used by customers (e.g. product, commercial -XX options), use
+ * To remove options commonly used by customers (e.g. product -XX options), use
  * the 3-step model adding major release numbers to the deprecate, obsolete and expire columns.
  *
  * To remove internal options (e.g. diagnostic, experimental, develop options), use
--- a/src/hotspot/share/runtime/flags/jvmFlag.cpp	Thu Jun 21 16:45:29 2018 -0700
+++ b/src/hotspot/share/runtime/flags/jvmFlag.cpp	Thu Jun 21 21:37:28 2018 -0700
@@ -326,10 +326,6 @@
   return (_flags & KIND_READ_WRITE) != 0;
 }
 
-bool JVMFlag::is_commercial() const {
-  return (_flags & KIND_COMMERCIAL) != 0;
-}
-
 /**
  * Returns if this flag is a constant in the binary.  Right now this is
  * true for notproduct and develop flags in product builds.
@@ -642,7 +638,6 @@
     { KIND_MANAGEABLE, "manageable" },
     { KIND_DIAGNOSTIC, "diagnostic" },
     { KIND_EXPERIMENTAL, "experimental" },
-    { KIND_COMMERCIAL, "commercial" },
     { KIND_NOT_PRODUCT, "notproduct" },
     { KIND_DEVELOP, "develop" },
     { KIND_LP64_PRODUCT, "lp64_product" },
@@ -911,7 +906,7 @@
       if (!(current->is_unlocked() || current->is_unlocker())) {
         if (!allow_locked) {
           // disable use of locked flags, e.g. diagnostic, experimental,
-          // commercial... until they are explicitly unlocked
+          // etc. until they are explicitly unlocked
           return NULL;
         }
       }
--- a/src/hotspot/share/runtime/flags/jvmFlag.hpp	Thu Jun 21 16:45:29 2018 -0700
+++ b/src/hotspot/share/runtime/flags/jvmFlag.hpp	Thu Jun 21 21:37:28 2018 -0700
@@ -60,11 +60,10 @@
     KIND_C2                 = 1 << 13,
     KIND_ARCH               = 1 << 14,
     KIND_LP64_PRODUCT       = 1 << 15,
-    KIND_COMMERCIAL         = 1 << 16,
-    KIND_JVMCI              = 1 << 17,
+    KIND_JVMCI              = 1 << 16,
 
     // set this bit if the flag was set on the command line
-    ORIG_COMMAND_LINE       = 1 << 18,
+    ORIG_COMMAND_LINE       = 1 << 17,
 
     KIND_MASK = ~(VALUE_ORIGIN_MASK | ORIG_COMMAND_LINE)
   };
@@ -101,9 +100,7 @@
     DIAGNOSTIC_FLAG_BUT_LOCKED,
     EXPERIMENTAL_FLAG_BUT_LOCKED,
     DEVELOPER_FLAG_BUT_PRODUCT_BUILD,
-    NOTPRODUCT_FLAG_BUT_PRODUCT_BUILD,
-    COMMERCIAL_FLAG_BUT_DISABLED,
-    COMMERCIAL_FLAG_BUT_LOCKED
+    NOTPRODUCT_FLAG_BUT_PRODUCT_BUILD
   };
 
   const char* _type;
@@ -187,7 +184,6 @@
   bool is_notproduct() const;
   bool is_develop() const;
   bool is_read_write() const;
-  bool is_commercial() const;
 
   bool is_constant_in_binary() const;
 
--- a/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp	Thu Jun 21 16:45:29 2018 -0700
+++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp	Thu Jun 21 21:37:28 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -242,7 +242,6 @@
 
 // Generate code to call emit_constraint_xxx function
 #define EMIT_CONSTRAINT_PRODUCT_FLAG(type, name, value, doc)      ); emit_constraint_##type(#name,&name
-#define EMIT_CONSTRAINT_COMMERCIAL_FLAG(type, name, value, doc)   ); emit_constraint_##type(#name,&name
 #define EMIT_CONSTRAINT_DIAGNOSTIC_FLAG(type, name, value, doc)   ); emit_constraint_##type(#name,&name
 #define EMIT_CONSTRAINT_EXPERIMENTAL_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name
 #define EMIT_CONSTRAINT_MANAGEABLE_FLAG(type, name, value, doc)   ); emit_constraint_##type(#name,&name
--- a/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp	Thu Jun 21 16:45:29 2018 -0700
+++ b/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp	Thu Jun 21 21:37:28 2018 -0700
@@ -293,7 +293,6 @@
 
 // Generate code to call emit_range_xxx function
 #define EMIT_RANGE_PRODUCT_FLAG(type, name, value, doc)      ); emit_range_##type(#name,&name
-#define EMIT_RANGE_COMMERCIAL_FLAG(type, name, value, doc)   ); emit_range_##type(#name,&name
 #define EMIT_RANGE_DIAGNOSTIC_FLAG(type, name, value, doc)   ); emit_range_##type(#name,&name
 #define EMIT_RANGE_EXPERIMENTAL_FLAG(type, name, value, doc) ); emit_range_##type(#name,&name
 #define EMIT_RANGE_MANAGEABLE_FLAG(type, name, value, doc)   ); emit_range_##type(#name,&name
--- a/src/hotspot/share/runtime/flags/jvmFlagWriteableList.cpp	Thu Jun 21 16:45:29 2018 -0700
+++ b/src/hotspot/share/runtime/flags/jvmFlagWriteableList.cpp	Thu Jun 21 21:37:28 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -94,7 +94,6 @@
 
 // Generate code to call emit_writeable_xxx function
 #define EMIT_WRITEABLE_PRODUCT_FLAG(type, name, value, doc)      ); emit_writeable_##type(#name
-#define EMIT_WRITEABLE_COMMERCIAL_FLAG(type, name, value, doc)   ); emit_writeable_##type(#name
 #define EMIT_WRITEABLE_DIAGNOSTIC_FLAG(type, name, value, doc)   ); emit_writeable_##type(#name
 #define EMIT_WRITEABLE_EXPERIMENTAL_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
 #define EMIT_WRITEABLE_MANAGEABLE_FLAG(type, name, value, doc)   ); emit_writeable_##type(#name
--- a/test/hotspot/jtreg/runtime/appcds/CommandLineFlagCombo.java	Thu Jun 21 16:45:29 2018 -0700
+++ b/test/hotspot/jtreg/runtime/appcds/CommandLineFlagCombo.java	Thu Jun 21 21:37:28 2018 -0700
@@ -68,22 +68,10 @@
             if (skipTestCase(testEntry))
                 continue;
 
-            OutputAnalyzer dumpOutput;
-
-            if (testEntry.equals("-XX:+FlightRecorder")) {
-                dumpOutput = TestCommon.dump(appJar, classList, "-XX:+UnlockCommercialFeatures", testEntry);
-            } else {
-                dumpOutput = TestCommon.dump(appJar, classList, testEntry);
-            }
-
+            OutputAnalyzer dumpOutput = TestCommon.dump(appJar, classList, testEntry);
             TestCommon.checkDump(dumpOutput, "Loading classes to share");
 
-            OutputAnalyzer execOutput;
-            if (testEntry.equals("-XX:+FlightRecorder")) {
-                execOutput = TestCommon.exec(appJar, "-XX:+UnlockCommercialFeatures", testEntry, "Hello");
-            } else {
-                execOutput = TestCommon.exec(appJar, testEntry, "Hello");
-            }
+            OutputAnalyzer execOutput = TestCommon.exec(appJar, testEntry, "Hello");
             TestCommon.checkExec(execOutput, "Hello World");
         }
 
@@ -121,11 +109,6 @@
             }
         }
 
-        if (!BuildHelper.isCommercialBuild() && testEntry.equals("-XX:+FlightRecorder"))
-        {
-            System.out.println("Test case not applicable on non-commercial builds");
-            return true;
-        }
         if (Compiler.isGraalEnabled() && testEntry.equals("-XX:+UseConcMarkSweepGC"))
         {
             System.out.println("Graal does not support CMS");
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/FlagCombo.java	Thu Jun 21 16:45:29 2018 -0700
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/FlagCombo.java	Thu Jun 21 21:37:28 2018 -0700
@@ -45,10 +45,8 @@
 
         SharedStringsUtils.runWithArchive("HelloString", "-XX:+UseG1GC");
 
-        if (BuildHelper.isCommercialBuild()) {
-            SharedStringsUtils.runWithArchiveAuto("HelloString", "-XX:+UnlockCommercialFeatures",
-                "-XX:StartFlightRecording=dumponexit=true");
-        }
+        SharedStringsUtils.runWithArchiveAuto("HelloString",
+           "-XX:StartFlightRecording=dumponexit=true");
 
         SharedStringsUtils.runWithArchive("HelloString", "-XX:+UnlockDiagnosticVMOptions",
            "-XX:NativeMemoryTracking=detail", "-XX:+PrintNMTStatistics");
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java	Thu Jun 21 16:45:29 2018 -0700
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java	Thu Jun 21 21:37:28 2018 -0700
@@ -55,11 +55,7 @@
             out.close();
         }
 
-        // Set NewSize to 8m due to dumping could fail in hs-tier6 testing with
-        // the vm options: -XX:+UnlockCommercialFeatures -XX:+UseDeterministicG1GC
-        // resulting in vm initialization error:
-        // "GC triggered before VM initialization completed. Try increasing NewSize, current value 1331K."
-        OutputAnalyzer dumpOutput = TestCommon.dump(appJar, TestCommon.list("HelloString"), "-XX:NewSize=8m",
+        OutputAnalyzer dumpOutput = TestCommon.dump(appJar, TestCommon.list("HelloString"),
                                                     "-XX:SharedArchiveConfigFile=" + sharedArchiveConfigFile);
         TestCommon.checkDump(dumpOutput);
         OutputAnalyzer execOutput = TestCommon.exec(appJar, "HelloString");
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Debugee.java	Thu Jun 21 16:45:29 2018 -0700
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Debugee.java	Thu Jun 21 21:37:28 2018 -0700
@@ -637,10 +637,9 @@
 
     public boolean isJFR_active() {
         String opts = argumentHandler.getLaunchOptions();
-        int unlockPos = opts.indexOf("-XX:+UnlockCommercialFeatures");
         int jfrPos = opts.indexOf("-XX:+FlightRecorder");
 
-        if (unlockPos >= 0 && jfrPos >= 0 && jfrPos > unlockPos)
+        if (jfrPos >= 0)
             return true;
         else
             return false;
--- a/test/jtreg-ext/requires/VMProps.java	Thu Jun 21 16:45:29 2018 -0700
+++ b/test/jtreg-ext/requires/VMProps.java	Thu Jun 21 21:37:28 2018 -0700
@@ -176,16 +176,13 @@
      * @return "true" if Flight Recorder is enabled, "false" if is disabled.
      */
     protected String vmFlightRecorder() {
-        Boolean isUnlockedCommercialFatures = WB.getBooleanVMFlag("UnlockCommercialFeatures");
         Boolean isFlightRecorder = WB.getBooleanVMFlag("FlightRecorder");
         String startFROptions = WB.getStringVMFlag("StartFlightRecording");
-        if (isUnlockedCommercialFatures != null && isUnlockedCommercialFatures) {
-            if (isFlightRecorder != null && isFlightRecorder) {
-                return "true";
-            }
-            if (startFROptions != null && !startFROptions.isEmpty()) {
-                return "true";
-            }
+        if (isFlightRecorder != null && isFlightRecorder) {
+            return "true";
+        }
+        if (startFROptions != null && !startFROptions.isEmpty()) {
+            return "true";
         }
         return "false";
     }