8202331: Obsolete support for commercial features
Reviewed-by: kvn, cjplummer, dholmes
This commit is contained in:
parent
c1c2c677cf
commit
1f437b30f3
@ -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 @@ fi
|
||||
#
|
||||
# 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"
|
||||
|
||||
|
@ -351,7 +351,7 @@ test.src.dir=test/nashorn/src
|
||||
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
|
||||
|
@ -488,7 +488,7 @@ void Arguments::init_version_specific_system_properties() {
|
||||
*
|
||||
* 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
|
||||
|
@ -326,10 +326,6 @@ bool JVMFlag::is_read_write() const {
|
||||
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 @@ void JVMFlag::print_kind(outputStream* st, unsigned int width) {
|
||||
{ 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 @@ JVMFlag* JVMFlag::find_flag(const char* name, size_t length, bool allow_locked,
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -60,11 +60,10 @@ struct JVMFlag {
|
||||
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 @@ struct JVMFlag {
|
||||
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 @@ struct JVMFlag {
|
||||
bool is_notproduct() const;
|
||||
bool is_develop() const;
|
||||
bool is_read_write() const;
|
||||
bool is_commercial() const;
|
||||
|
||||
bool is_constant_in_binary() const;
|
||||
|
||||
|
@ -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 @@ void emit_constraint_double(const char* name, const double* ptr, JVMFlagConstrai
|
||||
|
||||
// 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
|
||||
|
@ -293,7 +293,6 @@ void emit_range_double(const char* name, const double* ptr, double min, double m
|
||||
|
||||
// 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
|
||||
|
@ -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 @@ void emit_writeable_double(const char* name, JVMFlagWriteable::WriteableType typ
|
||||
|
||||
// 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
|
||||
|
@ -68,22 +68,10 @@ public class CommandLineFlagCombo {
|
||||
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 @@ public class CommandLineFlagCombo {
|
||||
}
|
||||
}
|
||||
|
||||
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");
|
||||
|
@ -45,10 +45,8 @@ public class FlagCombo {
|
||||
|
||||
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");
|
||||
|
@ -55,11 +55,7 @@ public class SharedStringsStress {
|
||||
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");
|
||||
|
@ -637,10 +637,9 @@ abstract public class Debugee extends DebugeeProcess {
|
||||
|
||||
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;
|
||||
|
@ -176,16 +176,13 @@ public class VMProps implements Callable<Map<String, String>> {
|
||||
* @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";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user