Skip to content

Commit 1f437b3

Browse files
committed
8202331: Obsolete support for commercial features
Reviewed-by: kvn, cjplummer, dholmes
1 parent c1c2c67 commit 1f437b3

13 files changed

Lines changed: 20 additions & 60 deletions

File tree

bin/nashorn/runopt.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
#
3-
# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
3+
# Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
44
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
#
66
# This code is free software; you can redistribute it and/or modify it
@@ -75,7 +75,6 @@ fi
7575
#
7676
# see above - already in place, copy the flags down here to disable
7777
ENABLE_FLIGHT_RECORDER_FLAGS="\
78-
-XX:+UnlockCommercialFeatures \
7978
-XX:+FlightRecorder \
8079
-XX:FlightRecorderOptions=defaultrecording=true,disk=true,dumponexit=true,dumponexitpath=$JFR_FILENAME,stackdepth=1024"
8180

make/nashorn/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ test.src.dir=test/nashorn/src
351351
run.test.xmx=2G
352352
run.test.xms=2G
353353

354-
# uncomment this jfr.args to enable light recordings. the stack needs to be cranked up to 1024 frames,
354+
# uncomment this jfr.args to enable flight recordings. the stack needs to be cranked up to 1024 frames,
355355
# or everything will as of the now drown in lambda forms and be cut off.
356356
#
357357
#jfr.args=-XX:StartFlightRecording=disk=true,dumponexit=true,dumponexitpath="test_suite.jfr",stackdepth=1024

src/hotspot/share/runtime/arguments.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ void Arguments::init_version_specific_system_properties() {
488488
*
489489
* Recommended approach for removing options:
490490
*
491-
* To remove options commonly used by customers (e.g. product, commercial -XX options), use
491+
* To remove options commonly used by customers (e.g. product -XX options), use
492492
* the 3-step model adding major release numbers to the deprecate, obsolete and expire columns.
493493
*
494494
* To remove internal options (e.g. diagnostic, experimental, develop options), use

src/hotspot/share/runtime/flags/jvmFlag.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,6 @@ bool JVMFlag::is_read_write() const {
326326
return (_flags & KIND_READ_WRITE) != 0;
327327
}
328328

329-
bool JVMFlag::is_commercial() const {
330-
return (_flags & KIND_COMMERCIAL) != 0;
331-
}
332-
333329
/**
334330
* Returns if this flag is a constant in the binary. Right now this is
335331
* true for notproduct and develop flags in product builds.
@@ -642,7 +638,6 @@ void JVMFlag::print_kind(outputStream* st, unsigned int width) {
642638
{ KIND_MANAGEABLE, "manageable" },
643639
{ KIND_DIAGNOSTIC, "diagnostic" },
644640
{ KIND_EXPERIMENTAL, "experimental" },
645-
{ KIND_COMMERCIAL, "commercial" },
646641
{ KIND_NOT_PRODUCT, "notproduct" },
647642
{ KIND_DEVELOP, "develop" },
648643
{ KIND_LP64_PRODUCT, "lp64_product" },
@@ -911,7 +906,7 @@ JVMFlag* JVMFlag::find_flag(const char* name, size_t length, bool allow_locked,
911906
if (!(current->is_unlocked() || current->is_unlocker())) {
912907
if (!allow_locked) {
913908
// disable use of locked flags, e.g. diagnostic, experimental,
914-
// commercial... until they are explicitly unlocked
909+
// etc. until they are explicitly unlocked
915910
return NULL;
916911
}
917912
}

src/hotspot/share/runtime/flags/jvmFlag.hpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,10 @@ struct JVMFlag {
6060
KIND_C2 = 1 << 13,
6161
KIND_ARCH = 1 << 14,
6262
KIND_LP64_PRODUCT = 1 << 15,
63-
KIND_COMMERCIAL = 1 << 16,
64-
KIND_JVMCI = 1 << 17,
63+
KIND_JVMCI = 1 << 16,
6564

6665
// set this bit if the flag was set on the command line
67-
ORIG_COMMAND_LINE = 1 << 18,
66+
ORIG_COMMAND_LINE = 1 << 17,
6867

6968
KIND_MASK = ~(VALUE_ORIGIN_MASK | ORIG_COMMAND_LINE)
7069
};
@@ -101,9 +100,7 @@ struct JVMFlag {
101100
DIAGNOSTIC_FLAG_BUT_LOCKED,
102101
EXPERIMENTAL_FLAG_BUT_LOCKED,
103102
DEVELOPER_FLAG_BUT_PRODUCT_BUILD,
104-
NOTPRODUCT_FLAG_BUT_PRODUCT_BUILD,
105-
COMMERCIAL_FLAG_BUT_DISABLED,
106-
COMMERCIAL_FLAG_BUT_LOCKED
103+
NOTPRODUCT_FLAG_BUT_PRODUCT_BUILD
107104
};
108105

109106
const char* _type;
@@ -187,7 +184,6 @@ struct JVMFlag {
187184
bool is_notproduct() const;
188185
bool is_develop() const;
189186
bool is_read_write() const;
190-
bool is_commercial() const;
191187

192188
bool is_constant_in_binary() const;
193189

src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -242,7 +242,6 @@ void emit_constraint_double(const char* name, const double* ptr, JVMFlagConstrai
242242

243243
// Generate code to call emit_constraint_xxx function
244244
#define EMIT_CONSTRAINT_PRODUCT_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name
245-
#define EMIT_CONSTRAINT_COMMERCIAL_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name
246245
#define EMIT_CONSTRAINT_DIAGNOSTIC_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name
247246
#define EMIT_CONSTRAINT_EXPERIMENTAL_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name
248247
#define EMIT_CONSTRAINT_MANAGEABLE_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name

src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ void emit_range_double(const char* name, const double* ptr, double min, double m
293293

294294
// Generate code to call emit_range_xxx function
295295
#define EMIT_RANGE_PRODUCT_FLAG(type, name, value, doc) ); emit_range_##type(#name,&name
296-
#define EMIT_RANGE_COMMERCIAL_FLAG(type, name, value, doc) ); emit_range_##type(#name,&name
297296
#define EMIT_RANGE_DIAGNOSTIC_FLAG(type, name, value, doc) ); emit_range_##type(#name,&name
298297
#define EMIT_RANGE_EXPERIMENTAL_FLAG(type, name, value, doc) ); emit_range_##type(#name,&name
299298
#define EMIT_RANGE_MANAGEABLE_FLAG(type, name, value, doc) ); emit_range_##type(#name,&name

src/hotspot/share/runtime/flags/jvmFlagWriteableList.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -94,7 +94,6 @@ void emit_writeable_double(const char* name, JVMFlagWriteable::WriteableType typ
9494

9595
// Generate code to call emit_writeable_xxx function
9696
#define EMIT_WRITEABLE_PRODUCT_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
97-
#define EMIT_WRITEABLE_COMMERCIAL_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
9897
#define EMIT_WRITEABLE_DIAGNOSTIC_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
9998
#define EMIT_WRITEABLE_EXPERIMENTAL_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
10099
#define EMIT_WRITEABLE_MANAGEABLE_FLAG(type, name, value, doc) ); emit_writeable_##type(#name

test/hotspot/jtreg/runtime/appcds/CommandLineFlagCombo.java

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,22 +68,10 @@ public static void main(String[] args) throws Exception {
6868
if (skipTestCase(testEntry))
6969
continue;
7070

71-
OutputAnalyzer dumpOutput;
72-
73-
if (testEntry.equals("-XX:+FlightRecorder")) {
74-
dumpOutput = TestCommon.dump(appJar, classList, "-XX:+UnlockCommercialFeatures", testEntry);
75-
} else {
76-
dumpOutput = TestCommon.dump(appJar, classList, testEntry);
77-
}
78-
71+
OutputAnalyzer dumpOutput = TestCommon.dump(appJar, classList, testEntry);
7972
TestCommon.checkDump(dumpOutput, "Loading classes to share");
8073

81-
OutputAnalyzer execOutput;
82-
if (testEntry.equals("-XX:+FlightRecorder")) {
83-
execOutput = TestCommon.exec(appJar, "-XX:+UnlockCommercialFeatures", testEntry, "Hello");
84-
} else {
85-
execOutput = TestCommon.exec(appJar, testEntry, "Hello");
86-
}
74+
OutputAnalyzer execOutput = TestCommon.exec(appJar, testEntry, "Hello");
8775
TestCommon.checkExec(execOutput, "Hello World");
8876
}
8977

@@ -121,11 +109,6 @@ private static boolean skipTestCase(String testEntry) throws Exception {
121109
}
122110
}
123111

124-
if (!BuildHelper.isCommercialBuild() && testEntry.equals("-XX:+FlightRecorder"))
125-
{
126-
System.out.println("Test case not applicable on non-commercial builds");
127-
return true;
128-
}
129112
if (Compiler.isGraalEnabled() && testEntry.equals("-XX:+UseConcMarkSweepGC"))
130113
{
131114
System.out.println("Graal does not support CMS");

test/hotspot/jtreg/runtime/appcds/sharedStrings/FlagCombo.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,8 @@ public static void main(String[] args) throws Exception {
4545

4646
SharedStringsUtils.runWithArchive("HelloString", "-XX:+UseG1GC");
4747

48-
if (BuildHelper.isCommercialBuild()) {
49-
SharedStringsUtils.runWithArchiveAuto("HelloString", "-XX:+UnlockCommercialFeatures",
50-
"-XX:StartFlightRecording=dumponexit=true");
51-
}
48+
SharedStringsUtils.runWithArchiveAuto("HelloString",
49+
"-XX:StartFlightRecording=dumponexit=true");
5250

5351
SharedStringsUtils.runWithArchive("HelloString", "-XX:+UnlockDiagnosticVMOptions",
5452
"-XX:NativeMemoryTracking=detail", "-XX:+PrintNMTStatistics");

0 commit comments

Comments
 (0)