mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 10:34:38 +02:00
8147017: Platform.isGraal should be removed
Reviewed-by: kvn, mseledtsov
This commit is contained in:
parent
2f1db3201d
commit
1d41e86762
5 changed files with 8 additions and 14 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue