Skip to content

Commit

Permalink
[GR-53528] Update labsjdk to 23+21-jvmci-b01
Browse files Browse the repository at this point in the history
PullRequest: graal/17541
  • Loading branch information
OracleLabsAutomation authored and dougxc committed May 12, 2024
2 parents 00d3187 + a008fe0 commit fe20679
Show file tree
Hide file tree
Showing 19 changed files with 102 additions and 72 deletions.
16 changes: 8 additions & 8 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
"jdks": {
"galahad-jdk": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+16-1220", "platformspecific": true, "extrabundles": ["static-libs"]},
"galahad-jdk": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+20-1618", "platformspecific": true, "extrabundles": ["static-libs"]},

"oraclejdk11": {"name": "jpg-jdk", "version": "11.0.11", "build_id": "jdk-11.0.11+9", "platformspecific": true, "extrabundles": ["static-libs"] },

Expand Down Expand Up @@ -44,13 +44,13 @@
"labsjdk-ee-21Debug": {"name": "labsjdk", "version": "ee-21.0.2+13-jvmci-23.1-b33-debug", "platformspecific": true },
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.2+13-jvmci-23.1-b33-sulong", "platformspecific": true },

"oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+18", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+18-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+18-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+18-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23+18-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23+18-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23+18-jvmci-b01-sulong", "platformspecific": true }
"oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+21", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+21-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+21-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+21-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23+21-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23+21-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23+21-jvmci-b01-sulong", "platformspecific": true }
},

"eclipse": {
Expand Down
2 changes: 1 addition & 1 deletion compiler/ci/ci_common/gate.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@
JVMCI_VERSION_CHECK: "strict",
},
}],
local jdk_latest_version_check_builds = [self.make_build(self.jdk_latest, "linux-amd64", "build", extra_tasks={build:: s.base("build"),}).build + {
local jdk_latest_version_check_builds = [self.make_build(self.jdk_latest, "linux-amd64", "build", extra_tasks={build:: s.base("build"),}).build + galahad.exclude {
environment+: {
# Run the strict JVMCI version check, i.e., that JVMCIVersionCheck.JVMCI_MIN_VERSION matches the versions in common.json.
JVMCI_VERSION_CHECK: "strict",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,19 @@
*/
package jdk.graal.compiler.microbenchmarks.graal;

import jdk.graal.compiler.microbenchmarks.graal.util.GraalState;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Warmup;

@Warmup(iterations = 1)
@Measurement(iterations = 1)
@Fork(1)
import jdk.graal.compiler.microbenchmarks.graal.util.GraalState;

/**
* This dummy class is used to verify that the JMH microbenchmarking environment is set up properly.
*/
@Warmup(iterations = 1)
@Measurement(iterations = 1)
@Fork(1)
public class TestJMHWhitebox extends GraalBenchmark {

@Benchmark
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;

import jdk.graal.compiler.core.common.util.CompilationAlarm;
import jdk.graal.compiler.graph.Node;
import jdk.graal.compiler.graph.NodeClass;
Expand Down Expand Up @@ -84,7 +85,7 @@ public NodesState() {
public final Node[] valueNumberableLeafNodes;
public final NodePair[] valueEqualsNodePairs;

public final class NodePair {
public static final class NodePair {
public final Node n1;
public final Node n2;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,22 @@
*/
package jdk.graal.compiler.debug.test;

import jdk.graal.compiler.debug.GraalError;
import org.junit.Assert;
import org.junit.Test;

import jdk.graal.compiler.debug.GraalError;

public class GraalErrorTest {

@FunctionalInterface
interface Error {
void call();
}

@Test
/**
* Test that the errors actually fail and provide the correct message.
*/
@Test
public void testErrors() {
error("unimplemented: test", () -> GraalError.unimplemented("test"));
error("unimplemented override", () -> GraalError.unimplementedOverride());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@
import static jdk.graal.compiler.test.GraalTest.assertFalse;
import static jdk.graal.compiler.test.GraalTest.assertTrue;

import org.junit.Test;

import jdk.graal.compiler.core.common.type.IntegerStamp;
import jdk.graal.compiler.core.common.type.Stamp;
import jdk.graal.compiler.graph.test.GraphTest;
import jdk.graal.compiler.nodes.type.StampTool;
import org.junit.Test;

public class StampToolTest extends GraphTest {

Expand Down Expand Up @@ -66,10 +67,10 @@ public void testStampToolUnsignedCompare() {
assertTrue(StampTool.unsignedCompare(stamp2, stamp1) == null);
}

@Test
/**
* Tests certain paths not reached by other testing.
*/
@Test
public void testStampToolPaths() {
Stamp stamp1 = stampForTrailingZeros(forInt(0));
assertFalse(StampTool.isAlwaysArray(stamp1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* questions.
*/

/**
/*
* @test
* @run junit jdk.vm.ci.options.test.NestedBooleanOptionKeyTest
*/
Expand All @@ -39,13 +39,14 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

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

import jdk.graal.compiler.options.NestedBooleanOptionKey;
import jdk.graal.compiler.options.OptionDescriptor;
import jdk.graal.compiler.options.OptionKey;
import jdk.graal.compiler.options.OptionType;
import jdk.graal.compiler.options.OptionValues;
import org.junit.Assert;
import org.junit.Test;

public class NestedBooleanOptionKeyTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ public final int hashCode() {
return id;
}

/**
/*
* Do not overwrite the equality test of a node in subclasses. Equality tests must rely solely
* on identity.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*
* @param <G> the type of graph this instance handles
* @param <M> the type of methods this instance handles
* @since 19.0 a {@link WritableByteChannel} is implemented
* @since 19.0
*/
public final class GraphOutput<G, M> implements Closeable, WritableByteChannel {
private final GraphProtocol<G, ?, ?, ?, ?, M, ?, ?, ?, ?> printer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ public final class JVMCIVersionCheck {
* default/fallback entry.
*/
private static final Map<String, Map<String, Version>> JVMCI_MIN_VERSIONS = Map.of(
"21", Map.of(DEFAULT_VENDOR_ENTRY, new Version(23, 1, 33)),
"21", Map.of(DEFAULT_VENDOR_ENTRY, createLegacyVersion(23, 1, 33)),
"23", Map.of(
"Oracle Corporation", new Version("23+18", 1),
DEFAULT_VENDOR_ENTRY, new Version("23+18", 1)));
"Oracle Corporation", createLabsJDKVersion("23+21", 1),
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("23+21", 1)));
private static final int NA = 0;
/**
* Minimum Java release supported by Graal.
Expand All @@ -68,7 +68,7 @@ public final class JVMCIVersionCheck {
* JVMCI build number.
*/
public static Version createLabsJDKVersion(String jdkVersionString, int jvmciBuild) {
return new Version(jdkVersionString, jvmciBuild);
return new Version(jdkVersionString, NA, NA, jvmciBuild, false, false);
}

/**
Expand All @@ -77,15 +77,15 @@ public static Version createLabsJDKVersion(String jdkVersionString, int jvmciBui
* custom LabsJDK build.
*/
public static Version createOpenJDKVersion(String jdkVersionString) {
return new Version(jdkVersionString);
return new Version(jdkVersionString, NA, NA, NA, false, true);
}

/**
* Legacy factory for versions without JDK version. This force sets {@link Version#jdkVersion}
* to {@code 21}. While this is not entirely correct, it works for our purposes.
*/
public static Version createLegacyVersion(int jvmciMajor, int jvmciMinor, int jvmciBuild) {
return new Version(jvmciMajor, jvmciMinor, jvmciBuild);
return new Version("21", jvmciMajor, jvmciMinor, jvmciBuild, true, false);
}

public static final class Version {
Expand Down Expand Up @@ -141,18 +141,6 @@ private static String stripVersion(Runtime.Version rv) {
return sb.toString();
}

private Version(String jdkVersionString, int jvmciBuild) {
this(jdkVersionString, NA, NA, jvmciBuild, false, false);
}

private Version(String jdkVersionString) {
this(jdkVersionString, NA, NA, NA, false, true);
}

private Version(int jvmciMajor, int jvmciMinor, int jvmciBuild) {
this("21", jvmciMajor, jvmciMinor, jvmciBuild, true, false);
}

private Version(String jdkVersionString, int jvmciMajor, int jvmciMinor, int jvmciBuild, boolean legacy, boolean isOpenJDK) {
this(Runtime.Version.parse(jdkVersionString), jvmciMajor, jvmciMinor, jvmciBuild, legacy, isOpenJDK);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ public UnimplementedGraalIntrinsics(Architecture arch) {
// JDK-8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (GR-48679)
"java/util/DualPivotQuicksort.partition(Ljava/lang/Class;Ljava/lang/Object;JIIIILjava/util/DualPivotQuicksort$PartitionOperation;)[I",
"java/util/DualPivotQuicksort.sort(Ljava/lang/Class;Ljava/lang/Object;JIILjava/util/DualPivotQuicksort$SortOperation;)V",
// JDK-8329331: Intrinsify Unsafe::setMemory
"jdk/internal/misc/Unsafe.setMemory0(Ljava/lang/Object;JJB)V",
// JDK-8223347: Integration of Vector API
"jdk/internal/vm/vector/VectorSupport.compressExpandOp(ILjava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;ILjdk/internal/vm/vector/VectorSupport$Vector;Ljdk/internal/vm/vector/VectorSupport$VectorMask;Ljdk/internal/vm/vector/VectorSupport$CompressExpandOperation;)Ljdk/internal/vm/vector/VectorSupport$VectorPayload;",
jdk == 21 ? "jdk/internal/vm/vector/VectorSupport.extract(Ljava/lang/Class;Ljava/lang/Class;ILjdk/internal/vm/vector/VectorSupport$Vector;ILjdk/internal/vm/vector/VectorSupport$VecExtractOp;)J":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public ValueNode extremumNode() {
*/
public abstract void deleteUnusedNodes();

/**
/*
* Range check predication support.
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Warmup;

@Warmup(iterations = 1)
@Measurement(iterations = 1)
@Fork(1)
/**
* This dummy class is used to verify that the JMH microbenchmarking environment is set up properly.
*/
@Warmup(iterations = 1)
@Measurement(iterations = 1)
@Fork(1)
public class TestJMHBlackbox {

@Benchmark
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ enum IMAGE_FILE_HEADER {

static int totalsize = 20;

/**
/*
* IMAGE_FILE_HEADER defines
*/

Expand Down Expand Up @@ -94,7 +94,7 @@ enum IMAGE_SECTION_HEADER {

static int totalsize = 40;

/**
/*
* IMAGE_SECTION_HEADER defines
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@

package com.oracle.svm.core;

import com.oracle.svm.core.heap.ReferenceInternals;
import jdk.graal.compiler.core.common.SuppressFBWarnings;

import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.util.AbstractCollection;
Expand All @@ -50,8 +47,12 @@
import java.util.function.BiFunction;
import java.util.function.Consumer;

import com.oracle.svm.core.heap.ReferenceInternals;

/**
import jdk.graal.compiler.core.common.SuppressFBWarnings;


/*
* Hash table based implementation of the <tt>Map</tt> interface, with
* <em>weak keys</em>.
* An entry in a <tt>WeakHashMap</tt> will automatically be removed when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

import jdk.graal.compiler.serviceprovider.JavaVersionUtil;
import org.graalvm.nativeimage.ImageSingletons;
import org.graalvm.nativeimage.hosted.RuntimeReflection;

Expand All @@ -60,8 +61,8 @@ public record BootstrapMethodRecord(int bci, int cpi, ResolvedJavaMethod method)
}

/*
* Map used to cache the BootstrapMethodInfo and reuse it for duplicated bytecode, avoiding to
* execute the bootstrap method for the same bci and method pair. This can happen during
* Map used to cache the BootstrapMethodInfo and reuse it for duplicated bytecode, avoiding
* execution of the bootstrap method for the same bci and method pair. This can happen during
* bytecode parsing as some blocks are duplicated, or for methods that are parsed multiple times
* (see MultiMethod).
*/
Expand Down Expand Up @@ -105,11 +106,15 @@ public BootstrapMethodConfiguration() {
Method enumSwitch = ReflectionUtil.lookupMethod(SwitchBootstraps.class, "enumSwitch", MethodHandles.Lookup.class, String.class, MethodType.class, Object[].class);

/* Bootstrap method used for retrieving the value of static final processors. */
Class<?> templateRuntime = ReflectionUtil.lookupClass(false, "java.lang.runtime.TemplateRuntime");
Method processStringTemplate = ReflectionUtil.lookupMethod(templateRuntime, "processStringTemplate", MethodHandles.Lookup.class, String.class, MethodType.class, MethodHandle.class,
String[].class);

indyBuildTimeAllowList = Set.of(metafactory, altMetafactory, makeConcat, makeConcatWithConstants, bootstrap, typeSwitch, enumSwitch, processStringTemplate);
if (JavaVersionUtil.JAVA_SPEC < 23) {
Class<?> templateRuntime = ReflectionUtil.lookupClass(false, "java.lang.runtime.TemplateRuntime");
Method processStringTemplate = ReflectionUtil.lookupMethod(templateRuntime, "processStringTemplate", MethodHandles.Lookup.class, String.class, MethodType.class, MethodHandle.class,
String[].class);
indyBuildTimeAllowList = Set.of(metafactory, altMetafactory, makeConcat, makeConcatWithConstants, bootstrap, typeSwitch, enumSwitch, processStringTemplate);
} else {
// JDK-8329948 removed the String Template feature
indyBuildTimeAllowList = Set.of(metafactory, altMetafactory, makeConcat, makeConcatWithConstants, bootstrap, typeSwitch, enumSwitch);
}

/* Bootstrap methods used for various dynamic constants. */
Method nullConstant = ReflectionUtil.lookupMethod(ConstantBootstraps.class, "nullConstant", MethodHandles.Lookup.class, String.class, Class.class);
Expand All @@ -130,14 +135,19 @@ public BootstrapMethodConfiguration() {

@Override
public void beforeAnalysis(BeforeAnalysisAccess a) {
/*
* Those methods are used by ObjectMethods.bootstrap to combine the Strings of the records
* into one String
*/
Class<?> stringConcatHelper = ReflectionUtil.lookupClass(false, "java.lang.StringConcatHelper");
Class<?> formatConcatItem = ReflectionUtil.lookupClass(false, "jdk.internal.util.FormatConcatItem");
RuntimeReflection.register(ReflectionUtil.lookupMethod(stringConcatHelper, "prepend", long.class, byte[].class, formatConcatItem, String.class));
RuntimeReflection.register(ReflectionUtil.lookupMethod(stringConcatHelper, "mix", long.class, formatConcatItem));
if (JavaVersionUtil.JAVA_SPEC < 23) {
/*
* Those methods are used by ObjectMethods.bootstrap to combine the Strings of the
* records into one String
*/

Class<?> stringConcatHelper = ReflectionUtil.lookupClass(false, "java.lang.StringConcatHelper");
Class<?> formatConcatItem = ReflectionUtil.lookupClass(false, "jdk.internal.util.FormatConcatItem");
RuntimeReflection.register(ReflectionUtil.lookupMethod(stringConcatHelper, "prepend", long.class, byte[].class, formatConcatItem, String.class));
RuntimeReflection.register(ReflectionUtil.lookupMethod(stringConcatHelper, "mix", long.class, formatConcatItem));
} else {
// JDK-8329948 removed the String Template feature
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public final class ModuleNative {
private ModuleNative() {
}

/**
/*
* Re-implementations of native methods from {@code src/hotspot/share/classfile/modules.cpp}.
* See {@link Target_java_lang_Module} for more information on module system native
* substitutions.
Expand Down

0 comments on commit fe20679

Please sign in to comment.