Skip to content

Commit

Permalink
[GR-16913] CPU release branches and builds.
Browse files Browse the repository at this point in the history
PullRequest: graal/3988
  • Loading branch information
ezzarghili committed Jul 11, 2019
2 parents fff7b99 + c2fdadc commit 25509f4
Show file tree
Hide file tree
Showing 16 changed files with 252 additions and 167 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jdk:

env:
global:
- JVMCI_VERSION="jvmci-20-b04"
- JDK8_UPDATE_VERSION="212"
- JVMCI_VERSION="jvmci-19.1-b01"
- JDK8_UPDATE_VERSION="222"
- JDK8_UPDATE_VERSION_SUFFIX=""

matrix:
Expand Down
8 changes: 4 additions & 4 deletions common.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ overlay = 24a9cd249544a2c8b61e225aa1f02c85db569fc4
# openjdk8 JDKs on Linux are built by Oracle Labs
# openjdk8 JDKs on macOS are based on AdoptOpenJDK binaries
jdks: {
oraclejdk8: {name : oraclejdk, version : "8u212-jvmci-20-b04", platformspecific: true}
openjdk8: {name : openjdk, version : "8u212-jvmci-20-b04", platformspecific: true}
oraclejdk8Debug: {name : oraclejdk, version : "8u212-jvmci-20-b04-fastdebug", platformspecific: true}
oraclejdk8: {name : oraclejdk, version : "8u221-jvmci-19.1-b01", platformspecific: true}
openjdk8: {name : openjdk, version : "8u222-jvmci-19.1-b01", platformspecific: true}
oraclejdk8Debug: {name : oraclejdk, version : "8u221-jvmci-19.1-b01-fastdebug", platformspecific: true}
oraclejdk11: {name : oraclejdk, version : "11.0.3+12", platformspecific: true}
openjdk11: {name : openjdk, version : "11.0.3+7", platformspecific: true}
}
Expand All @@ -17,7 +17,7 @@ jdks: {
# to another branch/commit in a Graal PR when mx changes are required for the PR.
mx : {
packages : {
mx: "HEAD"
mx: "c01eef6e31cd5655b1f0682c445f4ed50aa5c05e" # fix issue with obfuscated `TYPE` fields
}
}

Expand Down
4 changes: 2 additions & 2 deletions compiler/mx.compiler/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"sourceinprojectwhitelist" : [],

"groupId" : "org.graalvm.compiler",
"version" : "19.1.0",
"release" : True,
"version" : "19.1.1",
"release" : False,
"url" : "http://www.graalvm.org/",
"developer" : {
"name" : "Truffle and Graal developers",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,10 @@ synchronized void poll() {
platformMBeanServer = ManagementFactory.getPlatformMBeanServer();
process();
}
} catch (SecurityException e) {
} catch (SecurityException | UnsatisfiedLinkError | NoClassDefFoundError | UnsupportedOperationException e) {
// Without permission to find or create the MBeanServer,
// we cannot process any Graal mbeans.
// Various other errors can occur in the ManagementFactory (JDK-8076557)
deferred = null;
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
*/
package org.graalvm.compiler.hotspot.test;

import static org.graalvm.compiler.hotspot.meta.HotSpotGraphBuilderPlugins.aesDecryptName;
import static org.graalvm.compiler.hotspot.meta.HotSpotGraphBuilderPlugins.aesEncryptName;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
Expand All @@ -41,6 +44,7 @@
import org.graalvm.compiler.api.test.Graal;
import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig;
import org.graalvm.compiler.hotspot.HotSpotGraalRuntimeProvider;
import org.graalvm.compiler.hotspot.meta.HotSpotGraphBuilderPlugins;
import org.graalvm.compiler.hotspot.meta.HotSpotProviders;
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration.Plugins;
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin;
Expand Down Expand Up @@ -501,21 +505,17 @@ public CheckGraalIntrinsics() {
"java/util/zip/CRC32C.updateDirectByteBuffer(IJII)I");
}

boolean implNames = HotSpotGraphBuilderPlugins.cbcUsesImplNames(config);
String cbcEncryptName = implNames ? "implEncrypt" : "encrypt";
String cbcDecryptName = implNames ? "implDecrypt" : "decrypt";

// AES intrinsics
if (!config.useAESIntrinsics) {
if (isJDK9OrHigher()) {
add(ignore,
"com/sun/crypto/provider/AESCrypt.implDecryptBlock([BI[BI)V",
"com/sun/crypto/provider/AESCrypt.implEncryptBlock([BI[BI)V",
"com/sun/crypto/provider/CipherBlockChaining.implDecrypt([BII[BI)I",
"com/sun/crypto/provider/CipherBlockChaining.implEncrypt([BII[BI)I");
} else {
add(ignore,
"com/sun/crypto/provider/AESCrypt.decryptBlock([BI[BI)V",
"com/sun/crypto/provider/AESCrypt.encryptBlock([BI[BI)V",
"com/sun/crypto/provider/CipherBlockChaining.decrypt([BII[BI)I",
"com/sun/crypto/provider/CipherBlockChaining.encrypt([BII[BI)I");
}
add(ignore,
"com/sun/crypto/provider/AESCrypt." + aesDecryptName + "([BI[BI)V",
"com/sun/crypto/provider/AESCrypt." + aesEncryptName + "([BI[BI)V",
"com/sun/crypto/provider/CipherBlockChaining." + cbcDecryptName + "([BII[BI)I",
"com/sun/crypto/provider/CipherBlockChaining." + cbcEncryptName + "([BII[BI)I");
}

// BigInteger intrinsics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;

import org.junit.Assert;
import org.junit.Test;

import org.graalvm.compiler.code.CompilationResult;
import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.hotspot.meta.HotSpotGraphBuilderPlugins;
import org.junit.Assert;
import org.junit.Test;

import jdk.vm.ci.code.InstalledCode;
import jdk.vm.ci.meta.ResolvedJavaMethod;
Expand Down Expand Up @@ -91,7 +90,10 @@ public void testAESCryptIntrinsics() throws Exception {

@Test
public void testCipherBlockChainingIntrinsics() throws Exception {
if (compileAndInstall("com.sun.crypto.provider.CipherBlockChaining", HotSpotGraphBuilderPlugins.cbcEncryptName, HotSpotGraphBuilderPlugins.cbcDecryptName)) {
boolean implNames = HotSpotGraphBuilderPlugins.cbcUsesImplNames(runtime().getVMConfig());
String cbcEncryptName = implNames ? "implEncrypt" : "encrypt";
String cbcDecryptName = implNames ? "implDecrypt" : "decrypt";
if (compileAndInstall("com.sun.crypto.provider.CipherBlockChaining", cbcEncryptName, cbcDecryptName)) {
ByteArrayOutputStream actual = new ByteArrayOutputStream();
actual.write(runEncryptDecrypt(aesKey, "AES/CBC/NoPadding"));
actual.write(runEncryptDecrypt(aesKey, "AES/CBC/PKCS5Padding"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.Random;

import org.graalvm.compiler.core.test.GraalCompilerTest;
import org.graalvm.compiler.hotspot.JVMCIVersionCheck;
import org.graalvm.compiler.hotspot.JVMCIVersionCheck.Version;
import org.graalvm.compiler.hotspot.JVMCIVersionCheck.Version2;
import org.graalvm.compiler.hotspot.JVMCIVersionCheck.Version3;
import org.junit.Assert;
import org.junit.Test;

Expand All @@ -43,24 +47,37 @@ public void test01() {
props.put(name, sprops.getProperty(name));
}

for (int i = 0; i < 100; i++) {
long seed = Long.getLong("test.seed", System.nanoTime());
Random random = new Random(seed);

for (int i = 0; i < 50; i++) {
int minMajor = i;
int minMinor = 100 - i;
for (int j = 0; j < 100; j++) {
int minMinor = 50 - i;
for (int j = 0; j < 50; j++) {
int major = j;
int minor = 100 - j;
int minor = 50 - j;

for (int k = 0; k < 30; k++) {
int minBuild = random.nextInt(100);
int build = random.nextInt(100);

boolean ok = (major > minMajor) || (major == minMajor && minor >= minMinor);
for (String sep : new String[]{".", "-b"}) {
String javaVmVersion = String.format("prefix-jvmci-%03d%s%03d-suffix", major, sep, minor);
if (ok) {
JVMCIVersionCheck.check(props, minMajor, minMinor, "1.8", javaVmVersion, false);
} else {
try {
JVMCIVersionCheck.check(props, minMajor, minMinor, "1.8", javaVmVersion, false);
Assert.fail("expected to fail checking " + javaVmVersion + " against " + minMajor + "." + minMinor);
} catch (InternalError e) {
// pass
for (Version version : new Version[]{new Version2(major, minor), new Version3(major, minor, build)}) {
for (Version minVersion : new Version[]{new Version2(minMajor, minMinor), new Version3(minMajor, minMinor, minBuild)}) {
String javaVmVersion = String.format("prefix-jvmci-%s-suffix", version);
if (!version.isLessThan(minVersion)) {
try {
JVMCIVersionCheck.check(props, minVersion, "1.8", javaVmVersion, false);
} catch (InternalError e) {
throw new AssertionError("Failed " + JVMCIVersionCheckTest.class.getSimpleName() + " with -Dtest.seed=" + seed, e);
}
} else {
try {
JVMCIVersionCheck.check(props, minVersion, "1.8", javaVmVersion, false);
Assert.fail("expected to fail checking " + javaVmVersion + " against " + minVersion + " (-Dtest.seed=" + seed + ")");
} catch (InternalError e) {
// pass
}
}
}
}
}
Expand All @@ -72,8 +89,9 @@ public void test01() {
for (String version : new String[]{"0" + sep + Long.MAX_VALUE, Long.MAX_VALUE + sep + 0}) {
String javaVmVersion = String.format("prefix-jvmci-%s-suffix", version);
try {
JVMCIVersionCheck.check(props, 0, 59, "1.8", javaVmVersion, false);
Assert.fail("expected to fail checking " + javaVmVersion + " against 0.59");
Version2 minVersion = new Version2(0, 59);
JVMCIVersionCheck.check(props, minVersion, "1.8", javaVmVersion, false);
Assert.fail("expected to fail checking " + javaVmVersion + " against " + minVersion);
} catch (InternalError e) {
// pass
}
Expand Down
Loading

0 comments on commit 25509f4

Please sign in to comment.