8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /** 25 * @test 26 * @bug 8015774 27 * @summary Verify SegmentedCodeCache option's processing 28 * @library /testlibrary /test/lib / 29 * @modules java.base/jdk.internal.misc 30 * java.compiler 31 * java.management 32 * jdk.jvmstat/sun.jvmstat.monitor 33 * 34 * @build jdk.test.lib.* 35 * @run driver compiler.codecache.cli.TestSegmentedCodeCacheOption 36 */ 37 38 package compiler.codecache.cli; 39 40 import compiler.codecache.cli.common.CodeCacheOptions; 41 import jdk.test.lib.ExitCode; 42 import jdk.test.lib.Platform; 43 import jdk.test.lib.cli.CommandLineOptionTest; 44 import sun.hotspot.code.BlobType; 45 46 public class TestSegmentedCodeCacheOption { 47 private static final String INT_MODE = "-Xint"; 48 private static final String TIERED_COMPILATION = "TieredCompilation"; 49 private static final String SEGMENTED_CODE_CACHE = "SegmentedCodeCache"; 50 private static final String USE_SEGMENTED_CODE_CACHE 51 = CommandLineOptionTest.prepareBooleanFlag(SEGMENTED_CODE_CACHE, 52 true); 53 private static final long THRESHOLD_CC_SIZE_VALUE 54 = CodeCacheOptions.mB(240); 55 private static final long BELOW_THRESHOLD_CC_SIZE 56 = THRESHOLD_CC_SIZE_VALUE - CodeCacheOptions.mB(1); 57 private static final String[] UNEXPECTED_MESSAGES = new String[] { 58 ".*" + SEGMENTED_CODE_CACHE + ".*" 59 }; 60 61 | 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /** 25 * @test 26 * @bug 8015774 27 * @summary Verify SegmentedCodeCache option's processing 28 * @library /test/lib / 29 * @modules java.base/jdk.internal.misc 30 * java.compiler 31 * java.management 32 * jdk.jvmstat/sun.jvmstat.monitor 33 * 34 * @run driver compiler.codecache.cli.TestSegmentedCodeCacheOption 35 */ 36 37 package compiler.codecache.cli; 38 39 import compiler.codecache.cli.common.CodeCacheOptions; 40 import jdk.test.lib.process.ExitCode; 41 import jdk.test.lib.Platform; 42 import jdk.test.lib.cli.CommandLineOptionTest; 43 import sun.hotspot.code.BlobType; 44 45 public class TestSegmentedCodeCacheOption { 46 private static final String INT_MODE = "-Xint"; 47 private static final String TIERED_COMPILATION = "TieredCompilation"; 48 private static final String SEGMENTED_CODE_CACHE = "SegmentedCodeCache"; 49 private static final String USE_SEGMENTED_CODE_CACHE 50 = CommandLineOptionTest.prepareBooleanFlag(SEGMENTED_CODE_CACHE, 51 true); 52 private static final long THRESHOLD_CC_SIZE_VALUE 53 = CodeCacheOptions.mB(240); 54 private static final long BELOW_THRESHOLD_CC_SIZE 55 = THRESHOLD_CC_SIZE_VALUE - CodeCacheOptions.mB(1); 56 private static final String[] UNEXPECTED_MESSAGES = new String[] { 57 ".*" + SEGMENTED_CODE_CACHE + ".*" 58 }; 59 60 |