Thu, 31 Oct 2013 21:20:00 +0100
Merge
1.1 --- a/src/share/vm/runtime/arguments.cpp Wed Oct 30 16:31:33 2013 -0700 1.2 +++ b/src/share/vm/runtime/arguments.cpp Thu Oct 31 21:20:00 2013 +0100 1.3 @@ -1988,6 +1988,15 @@ 1.4 warning("DefaultMaxRAMFraction is deprecated and will likely be removed in a future release. " 1.5 "Use MaxRAMFraction instead."); 1.6 } 1.7 + if (FLAG_IS_CMDLINE(UseCMSCompactAtFullCollection)) { 1.8 + warning("UseCMSCompactAtFullCollection is deprecated and will likely be removed in a future release."); 1.9 + } 1.10 + if (FLAG_IS_CMDLINE(CMSFullGCsBeforeCompaction)) { 1.11 + warning("CMSFullGCsBeforeCompaction is deprecated and will likely be removed in a future release."); 1.12 + } 1.13 + if (FLAG_IS_CMDLINE(UseCMSCollectionPassing)) { 1.14 + warning("UseCMSCollectionPassing is deprecated and will likely be removed in a future release."); 1.15 + } 1.16 } 1.17 1.18 // Check stack pages settings
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/test/gc/startup_warnings/TestCMSForegroundFlags.java Thu Oct 31 21:20:00 2013 +0100 2.3 @@ -0,0 +1,52 @@ 2.4 +/* 2.5 +* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 2.6 +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.7 +* 2.8 +* This code is free software; you can redistribute it and/or modify it 2.9 +* under the terms of the GNU General Public License version 2 only, as 2.10 +* published by the Free Software Foundation. 2.11 +* 2.12 +* This code is distributed in the hope that it will be useful, but WITHOUT 2.13 +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 2.14 +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2.15 +* version 2 for more details (a copy is included in the LICENSE file that 2.16 +* accompanied this code). 2.17 +* 2.18 +* You should have received a copy of the GNU General Public License version 2.19 +* 2 along with this work; if not, write to the Free Software Foundation, 2.20 +* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2.21 +* 2.22 +* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2.23 +* or visit www.oracle.com if you need additional information or have any 2.24 +* questions. 2.25 +*/ 2.26 + 2.27 +/* 2.28 +* @test TestCMSForegroundFlags 2.29 +* @key gc 2.30 +* @bug 8027132 2.31 +* @summary Test that the deprecated CMS foreground collector flags print warning messages 2.32 +* @library /testlibrary 2.33 +* @run main TestCMSForegroundFlags -XX:-UseCMSCompactAtFullCollection UseCMSCompactAtFullCollection 2.34 +* @run main TestCMSForegroundFlags -XX:CMSFullGCsBeforeCompaction=4 CMSFullGCsBeforeCompaction 2.35 +* @run main TestCMSForegroundFlags -XX:-UseCMSCollectionPassing UseCMSCollectionPassing 2.36 +*/ 2.37 + 2.38 +import com.oracle.java.testlibrary.OutputAnalyzer; 2.39 +import com.oracle.java.testlibrary.ProcessTools; 2.40 + 2.41 +public class TestCMSForegroundFlags { 2.42 + public static void main(String[] args) throws Exception { 2.43 + if (args.length != 2) { 2.44 + throw new Exception("Expected two arguments,flagValue and flagName"); 2.45 + } 2.46 + String flagValue = args[0]; 2.47 + String flagName = args[1]; 2.48 + 2.49 + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(flagValue, "-version"); 2.50 + OutputAnalyzer output = new OutputAnalyzer(pb.start()); 2.51 + output.shouldContain("warning: " + flagName + " is deprecated and will likely be removed in a future release."); 2.52 + output.shouldNotContain("error"); 2.53 + output.shouldHaveExitValue(0); 2.54 + } 2.55 +}