Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2024, 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
Expand Down Expand Up @@ -76,7 +76,7 @@ public static void main(String[] args) throws Exception {

final WhiteBox wb = WhiteBox.getWhiteBox();

// Line example: ccstr PrintIdealGraphAddress = 127.0.0.1 {C2 notproduct} {default}
// Line example: ccstr PrintIdealGraphAddress = 127.0.0.1 {C2 develop} {default}
Pattern flagLine = Pattern.compile("(\\w+)\\s+(\\w+)\\s+:?= (?:(.+))\\{[^}]+\\}\\s+\\{[^}]+\\}");
for (String line : lines) {
if (line.indexOf('=') != -1) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2024, 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
Expand Down Expand Up @@ -75,60 +75,52 @@ public static void main(String[] args) throws Exception {
runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:StackRedPages=0", "-version");

/*
#1.3 develop & notproduct flag on debug VM:
develop & !product_build notproduct & !product_build
-XX:+DeoptimizeALot -XX:+VerifyCodeCache
-IgnoreUnrecognizedVMOptions OK OK
+IgnoreUnrecognizedVMOptions OK OK
#1.3 develop flag on debug VM:
develop & !product_build
-XX:+DeoptimizeALot
-IgnoreUnrecognizedVMOptions OK
+IgnoreUnrecognizedVMOptions OK
*/
if (!product) {
runJavaAndCheckExitValue(true, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:+DeoptimizeALot", "-version");
runJavaAndCheckExitValue(true, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:+VerifyCodeCache", "-version");
runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:+DeoptimizeALot", "-version");
runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:+VerifyCodeCache", "-version");
}

/*
#1.4 develop & notproduct flag on product VM:
develop & !product_build notproduct & product_build
-XX:+DeoptimizeALot -XX:+VerifyCodeCache
-IgnoreUnrecognizedVMOptions ERR ERR
+IgnoreUnrecognizedVMOptions OK OK
#1.4 develop flag on product VM:
develop & product_build
-XX:+DeoptimizeALot
-IgnoreUnrecognizedVMOptions ERR
+IgnoreUnrecognizedVMOptions OK
*/
if (product) {
runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:+DeoptimizeALot", "-version");
runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:+VerifyCodeCache", "-version");
runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:+DeoptimizeALot", "-version");
runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:+VerifyCodeCache", "-version");
}


/*
#1.5 malformed develop & notproduct flag on debug VM:
develop & !product_build notproduct & !product_build
-XX:DeoptimizeALot -XX:VerifyCodeCache
-IgnoreUnrecognizedVMOptions ERR ERR
+IgnoreUnrecognizedVMOptions ERR ERR
#1.5 malformed develop flag on debug VM:
develop & !product_build
-XX:DeoptimizeALot
-IgnoreUnrecognizedVMOptions ERR
+IgnoreUnrecognizedVMOptions ERR
*/
if (!product) {
runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:DeoptimizeALot", "-version");
runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:VerifyCodeCache", "-version");
runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:DeoptimizeALot", "-version");
runJavaAndCheckExitValue(false, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:VerifyCodeCache", "-version");
}

/*
#1.6 malformed develop & notproduct flag on product VM:
develop & !product_build notproduct & product_build
-XX:DeoptimizeALot -XX:VerifyCodeCache
-IgnoreUnrecognizedVMOptions ERR ERR
+IgnoreUnrecognizedVMOptions OK OK
#1.6 malformed develop flag on product VM:
develop & !product_build
-XX:DeoptimizeALot
-IgnoreUnrecognizedVMOptions ERR
+IgnoreUnrecognizedVMOptions OK
*/
if (product) {
runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:DeoptimizeALot", "-version");
runJavaAndCheckExitValue(false, "-XX:-IgnoreUnrecognizedVMOptions", "-XX:VerifyCodeCache", "-version");
runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:DeoptimizeALot", "-version");
runJavaAndCheckExitValue(true, "-XX:+IgnoreUnrecognizedVMOptions", "-XX:VerifyCodeCache", "-version");
}

/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2024, 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
Expand Down Expand Up @@ -210,7 +210,7 @@ private static List<JVMOption> getTestSubset(String[] args) throws Exception {
public static void main(String[] args) throws Exception {
int failedTests;

allOptionsAsMap = JVMOptionsUtils.getOptionsWithRangeAsMap(origin -> (!(origin.contains("develop") || origin.contains("notproduct"))));
allOptionsAsMap = JVMOptionsUtils.getOptionsWithRangeAsMap(origin -> (!origin.contains("develop")));

/*
* Exclude VMThreadStackSize from max range testing, because it will always exit with code 1,
Expand Down
8 changes: 4 additions & 4 deletions test/hotspot/jtreg/runtime/CommandLine/VMOptionWarning.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2024, 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
Expand All @@ -24,7 +24,7 @@
/*
* @test
* @bug 8027314
* @summary Warn if diagnostic or experimental vm option is used and -XX:+UnlockDiagnosticVMOptions or -XX:+UnlockExperimentalVMOptions, respectively, isn't specified. Warn if develop or notproduct vm option is used with product version of VM.
* @summary Warn if diagnostic or experimental vm option is used and -XX:+UnlockDiagnosticVMOptions or -XX:+UnlockExperimentalVMOptions, respectively, isn't specified. Warn if develop vm option is used with product version of VM.
* @requires vm.flagless
* @library /test/lib
* @modules java.base/jdk.internal.misc
Expand All @@ -44,7 +44,7 @@ public static void main(String[] args) throws Exception {
output.shouldContain("Error: VM option 'AlwaysSafeConstructors' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions.");

if (Platform.isDebugBuild()) {
System.out.println("Skip the rest of the tests on debug builds since diagnostic, develop, and notproduct options are available on debug builds.");
System.out.println("Skip the rest of the tests on debug builds since diagnostic, and develop options are available on debug builds.");
return;
}

Expand All @@ -61,6 +61,6 @@ public static void main(String[] args) throws Exception {
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+CheckCompressedOops", "-version");
output = new OutputAnalyzer(pb.start());
output.shouldNotHaveExitValue(0);
output.shouldContain("Error: VM option 'CheckCompressedOops' is notproduct and is available only in debug version of VM.");
output.shouldContain("Error: VM option 'CheckCompressedOops' is develop and is available only in debug version of VM.");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we don't need this test of the develop option CheckCompressedOops at all, since we have
the immediately preceding test of the develop option VerifyStack.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, we've already tested this.

}
}