8147017: Platform.isGraal should be removed

Reviewed-by: kvn, mseledtsov
This commit is contained in:
Igor Ignatyev 2019-11-20 18:23:06 -08:00
parent 2f1db3201d
commit 1d41e86762
5 changed files with 8 additions and 14 deletions

View file

@ -35,12 +35,14 @@ package gc.g1;
* java.management * java.management
* @build sun.hotspot.WhiteBox * @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run main gc.g1.TestGCLogMessages * sun.hotspot.WhiteBox$WhiteBoxPermission
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* gc.g1.TestGCLogMessages
*/ */
import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.Platform; import sun.hotspot.code.Compiler;
public class TestGCLogMessages { public class TestGCLogMessages {
@ -85,7 +87,7 @@ public class TestGCLogMessages {
} }
public boolean isAvailable() { public boolean isAvailable() {
return Platform.isGraal() || Platform.isServer(); return Compiler.isC2Enabled() || Compiler.isGraalEnabled();
} }
} }

View file

@ -67,8 +67,6 @@ public class JVMOptionsUtils {
VMType = "-client"; VMType = "-client";
} else if (Platform.isMinimal()) { } else if (Platform.isMinimal()) {
VMType = "-minimal"; VMType = "-minimal";
} else if (Platform.isGraal()) {
VMType = "-graal";
} else { } else {
VMType = null; VMType = null;
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -48,7 +48,7 @@ public class TestMutuallyExclusivePlatformPredicates {
ARCH("isAArch64", "isARM", "isPPC", "isS390x", "isSparc", "isX64", "isX86"), ARCH("isAArch64", "isARM", "isPPC", "isS390x", "isSparc", "isX64", "isX86"),
BITNESS("is32bit", "is64bit"), BITNESS("is32bit", "is64bit"),
OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"), OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"),
VM_TYPE("isClient", "isServer", "isGraal", "isMinimal", "isZero", "isEmbedded"), VM_TYPE("isClient", "isServer", "isMinimal", "isZero", "isEmbedded"),
MODE("isInt", "isMixed", "isComp"), MODE("isInt", "isMixed", "isComp"),
IGNORED("isEmulatedClient", "isDebugBuild", "isFastDebugBuild", IGNORED("isEmulatedClient", "isDebugBuild", "isFastDebugBuild",
"isSlowDebugBuild", "hasSA", "shouldSAAttach", "isTieredSupported", "isSlowDebugBuild", "hasSA", "shouldSAAttach", "isTieredSupported",

View file

@ -59,10 +59,6 @@ public class Platform {
return vmName.endsWith(" Server VM"); return vmName.endsWith(" Server VM");
} }
public static boolean isGraal() {
return vmName.endsWith(" Graal VM");
}
public static boolean isZero() { public static boolean isZero() {
return vmName.endsWith(" Zero VM"); return vmName.endsWith(" Zero VM");
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -500,8 +500,6 @@ public abstract class CommandLineOptionTest {
return "-client"; return "-client";
} else if (Platform.isMinimal()) { } else if (Platform.isMinimal()) {
return "-minimal"; return "-minimal";
} else if (Platform.isGraal()) {
return "-graal";
} }
throw new RuntimeException("Unknown VM mode."); throw new RuntimeException("Unknown VM mode.");
} }