Skip to content

Commit 2c1cc0e

Browse files
OracleLabsAutomationzapster
authored andcommitted
[GR-65267] Update labsjdk to 25+24-jvmci-b01
PullRequest: graal/20901
2 parents 70ef023 + 947184b commit 2c1cc0e

File tree

52 files changed

+280
-276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+280
-276
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ jobs:
110110
PRIMARY: "compiler"
111111
# /espresso
112112
- env:
113-
JDK_VERSION: "21"
113+
JDK_VERSION: "latest"
114+
TOOLS_JDK_VERSION: "21"
114115
GATE_TAGS: "style,fullbuild"
115116
PRIMARY: "espresso"
116117
# /substratevm

ci/common.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ local common_json = import "../common.json";
5656
[name]: jdk_base + common_json.jdks[name] + { jdk_version:: 21 }
5757
for name in ["oraclejdk21"] + variants("labsjdk-ce-21") + variants("labsjdk-ee-21")
5858
} + {
59-
'oraclejdk23': jdk_base + common_json.jdks["oraclejdk23"] + { jdk_version:: 23 },
59+
'oraclejdk24': jdk_base + common_json.jdks["oraclejdk24"] + { jdk_version:: 24 },
6060
} + {
6161
[name]: jdk_base + common_json.jdks[name] + { jdk_version:: parse_labsjdk_version(self), jdk_name:: "jdk-latest"}
6262
for name in ["oraclejdk-latest"] + variants("labsjdk-ce-latest") + variants("labsjdk-ee-latest")

common.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
1010
"jdks": {
11-
"galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+23-2725", "platformspecific": true, "extrabundles": ["static-libs"]},
11+
"galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+24-2970", "platformspecific": true, "extrabundles": ["static-libs"]},
1212

1313
"oraclejdk17": {"name": "jpg-jdk", "version": "17.0.7", "build_id": "jdk-17.0.7+8", "platformspecific": true, "extrabundles": ["static-libs"]},
1414
"labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.7+4-jvmci-23.1-b02", "platformspecific": true },
@@ -43,15 +43,15 @@
4343
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.2+13-jvmci-23.1-b33-sulong", "platformspecific": true },
4444
"graalvm-ee-21": {"name": "graalvm-java21", "version": "23.1.6", "platformspecific": true },
4545

46-
"oraclejdk23": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+37", "platformspecific": true, "extrabundles": ["static-libs"]},
46+
"oraclejdk24": {"name": "jpg-jdk", "version": "24", "build_id": "jdk-24.0.1+9", "platformspecific": true, "extrabundles": ["static-libs"]},
4747

48-
"oraclejdk-latest": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+23", "platformspecific": true, "extrabundles": ["static-libs"]},
49-
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-25+23-jvmci-b01", "platformspecific": true },
50-
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-25+23-jvmci-b01-debug", "platformspecific": true },
51-
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-25+23-jvmci-b01-sulong", "platformspecific": true },
52-
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-25+23-jvmci-b01", "platformspecific": true },
53-
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-25+23-jvmci-b01-debug", "platformspecific": true },
54-
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-25+23-jvmci-b01-sulong", "platformspecific": true }
48+
"oraclejdk-latest": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+24", "platformspecific": true, "extrabundles": ["static-libs"]},
49+
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-25+24-jvmci-b01", "platformspecific": true },
50+
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-25+24-jvmci-b01-debug", "platformspecific": true },
51+
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-25+24-jvmci-b01-sulong", "platformspecific": true },
52+
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-25+24-jvmci-b01", "platformspecific": true },
53+
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-25+24-jvmci-b01-debug", "platformspecific": true },
54+
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-25+24-jvmci-b01-sulong", "platformspecific": true }
5555
},
5656

5757
"eclipse": {

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/asm/aarch64/test/AArch64AddressingModeTest.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -29,16 +29,16 @@
2929

3030
import java.util.EnumSet;
3131

32+
import org.junit.Assert;
33+
import org.junit.Before;
34+
import org.junit.Test;
35+
3236
import jdk.graal.compiler.asm.aarch64.AArch64Address;
3337
import jdk.graal.compiler.asm.aarch64.AArch64Assembler;
3438
import jdk.graal.compiler.asm.aarch64.AArch64MacroAssembler;
3539
import jdk.graal.compiler.core.aarch64.test.AArch64TestMacroAssembler;
3640
import jdk.graal.compiler.core.common.NumUtil;
3741
import jdk.graal.compiler.test.GraalTest;
38-
import org.junit.Assert;
39-
import org.junit.Before;
40-
import org.junit.Test;
41-
4242
import jdk.vm.ci.aarch64.AArch64;
4343
import jdk.vm.ci.aarch64.AArch64.CPUFeature;
4444
import jdk.vm.ci.code.Architecture;
@@ -59,16 +59,11 @@ private static EnumSet<AArch64.CPUFeature> computeFeatures() {
5959
return features;
6060
}
6161

62-
private static EnumSet<AArch64.Flag> computeFlags() {
63-
EnumSet<AArch64.Flag> flags = EnumSet.noneOf(AArch64.Flag.class);
64-
return flags;
65-
}
66-
6762
private static TargetDescription createTarget() {
6863
final int stackFrameAlignment = 16;
6964
final int implicitNullCheckLimit = 4096;
7065
final boolean inlineObjects = true;
71-
Architecture arch = new AArch64(computeFeatures(), computeFlags());
66+
Architecture arch = new AArch64(computeFeatures());
7267
return new TargetDescription(arch, true, stackFrameAlignment, implicitNullCheckLimit, inlineObjects);
7368
}
7469

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/ea/PartialEscapeAnalysisIterationTest.java

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -24,12 +24,13 @@
2424
*/
2525
package jdk.graal.compiler.core.test.ea;
2626

27-
import java.lang.ref.WeakReference;
2827
import java.util.List;
28+
import java.util.concurrent.atomic.AtomicReference;
2929

3030
import org.junit.Assert;
3131
import org.junit.Test;
3232

33+
import jdk.graal.compiler.nodes.EndNode;
3334
import jdk.graal.compiler.nodes.extended.BoxNode;
3435
import jdk.graal.compiler.nodes.extended.UnboxNode;
3536
import jdk.graal.compiler.nodes.java.StoreFieldNode;
@@ -38,13 +39,9 @@
3839

3940
public class PartialEscapeAnalysisIterationTest extends EATestBase {
4041

41-
// remember boxing nodes from before PEA
42-
private List<BoxNode> boxNodes;
43-
4442
@Override
4543
protected void canonicalizeGraph() {
4644
super.canonicalizeGraph();
47-
boxNodes = graph.getNodes().filter(BoxNode.class).snapshot();
4845
}
4946

5047
private static final class AllocatedObject {
@@ -59,30 +56,33 @@ private static final class AllocatedObject {
5956
}
6057
}
6158

59+
public static int cnt;
6260
public static volatile Object obj1;
6361
public static volatile Double object1 = (double) 123;
6462
public static volatile AllocatedObject object2 = new AllocatedObject(123);
6563

6664
public static String moveIntoBranchBox(int id) {
6765
Double box = object1 + 1;
6866
if (id == 0) {
69-
obj1 = new WeakReference<>(box);
67+
// Prevent if simplification
68+
cnt++;
69+
obj1 = new AtomicReference<>(box);
7070
}
7171
return "value";
7272
}
7373

7474
public static String moveIntoBranch(int id) {
7575
AllocatedObject box = new AllocatedObject(object2.value + 1);
7676
if (id == 0) {
77-
obj1 = new WeakReference<>(box);
77+
obj1 = new AtomicReference<>(box);
7878
}
7979
return "value";
8080
}
8181

8282
@Test
8383
public void testJMHBlackholePattern() {
8484
/*
85-
* The overall number of allocations in this methods does not change during PEA, but the
85+
* The overall number of allocations in these methods does not change during PEA, but the
8686
* effects still need to be applied since they move the allocation between blocks.
8787
*/
8888

@@ -91,7 +91,7 @@ public void testJMHBlackholePattern() {
9191
Assert.assertEquals(1, graph.getNodes().filter(UnboxNode.class).count());
9292
Assert.assertEquals(1, graph.getNodes().filter(BoxNode.class).count());
9393
// the boxing needs to be moved into the branch
94-
Assert.assertTrue(graph.getNodes().filter(BoxNode.class).first().next() instanceof StoreFieldNode);
94+
Assert.assertTrue(graph.getNodes().filter(BoxNode.class).first().next() instanceof CommitAllocationNode);
9595

9696
// test with a normal object
9797
prepareGraph("moveIntoBranch", false);
@@ -104,7 +104,7 @@ public static String noLoopIterationBox(int id) {
104104
Double box = object1 + 1;
105105
for (int i = 0; i < 100; i++) {
106106
if (id == i) {
107-
obj1 = new WeakReference<>(box);
107+
obj1 = new AtomicReference<>(box);
108108
}
109109
}
110110
return "value";
@@ -114,7 +114,7 @@ public static String noLoopIteration(int id) {
114114
AllocatedObject box = new AllocatedObject(object2.value + 1);
115115
for (int i = 0; i < 100; i++) {
116116
if (id == i) {
117-
obj1 = new WeakReference<>(box);
117+
obj1 = new AtomicReference<>(box);
118118
}
119119
}
120120
return "value";
@@ -124,7 +124,7 @@ public static String noLoopIterationEmpty(int id) {
124124
AllocatedObject box = new AllocatedObject();
125125
for (int i = 0; i < 100; i++) {
126126
if (id == i) {
127-
obj1 = new WeakReference<>(box);
127+
obj1 = new AtomicReference<>(box);
128128
}
129129
}
130130
return "value";
@@ -133,23 +133,24 @@ public static String noLoopIterationEmpty(int id) {
133133
@Test
134134
public void testNoLoopIteration() {
135135
/*
136-
* PEA should not apply any effects on this method, since it cannot move the allocation into
137-
* the branch anyway (it needs to stay outside the loop).
136+
* After PEA, the BoxNode stays outside the loop.
138137
*/
139138

140139
// test with a boxing object
141140
prepareGraph("noLoopIterationBox", true);
141+
List<BoxNode> boxNodes = graph.getNodes().filter(BoxNode.class).snapshot();
142142
Assert.assertEquals(1, boxNodes.size());
143-
Assert.assertTrue(boxNodes.get(0).isAlive());
143+
Assert.assertTrue(boxNodes.getFirst().next() instanceof EndNode);
144144

145145
// test with a normal object (needs one iteration to replace NewInstance with
146146
// CommitAllocation)
147147
for (String name : new String[]{"noLoopIterationEmpty", "noLoopIteration"}) {
148148
prepareGraph(name, false);
149149
List<CommitAllocationNode> allocations = graph.getNodes().filter(CommitAllocationNode.class).snapshot();
150150
new PartialEscapePhase(true, false, createCanonicalizerPhase(), null, graph.getOptions()).apply(graph, context);
151-
Assert.assertEquals(1, allocations.size());
151+
Assert.assertEquals(2, allocations.size());
152152
Assert.assertTrue(allocations.get(0).isAlive());
153+
Assert.assertTrue(allocations.get(1).isAlive());
153154
}
154155
}
155156

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/hotspot/amd64/test/AMD64HotSpotFrameOmissionTest.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -28,16 +28,14 @@
2828

2929
import java.util.Arrays;
3030

31-
import jdk.graal.compiler.core.test.GraalCompilerTest;
3231
import org.junit.Assert;
3332
import org.junit.Ignore;
3433
import org.junit.Test;
3534

3635
import jdk.graal.compiler.asm.amd64.AMD64Assembler;
37-
36+
import jdk.graal.compiler.core.test.GraalCompilerTest;
3837
import jdk.vm.ci.code.InstalledCode;
3938
import jdk.vm.ci.code.Register;
40-
import jdk.vm.ci.code.RegisterArray;
4139
import jdk.vm.ci.code.TargetDescription;
4240
import jdk.vm.ci.hotspot.HotSpotCallingConventionType;
4341
import jdk.vm.ci.meta.JavaKind;
@@ -128,7 +126,6 @@ private void testHelper(String name, CodeGenerator gen) {
128126
}
129127

130128
private Register getArgumentRegister(int index, JavaKind kind) {
131-
RegisterArray regs = getCodeCache().getRegisterConfig().getCallingConventionRegisters(HotSpotCallingConventionType.JavaCall, kind);
132-
return regs.get(index);
129+
return getCodeCache().getRegisterConfig().getCallingConventionRegisters(HotSpotCallingConventionType.JavaCall, kind).get(index);
133130
}
134131
}

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/truffle/test/CompilationFinalWeakReferencePartialEvaluationTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -69,19 +69,16 @@ public int getAsInt() {
6969
}
7070

7171
private static class CompilationFinalWeakReferenceTestNode extends AbstractTestNode {
72-
@CompilationFinal private WeakReference<Integer> finalWeakRefInteger;
7372
@CompilationFinal private WeakReference<Object> finalWeakRefNull;
7473
@CompilationFinal private WeakReference<IntSupplier> finalWeakRef;
7574

7675
CompilationFinalWeakReferenceTestNode(IntSupplier data) {
77-
this.finalWeakRefInteger = new WeakReference<>(0);
7876
this.finalWeakRefNull = new WeakReference<>(null);
7977
this.finalWeakRef = new WeakReference<>(data);
8078
}
8179

8280
@Override
8381
public int execute(VirtualFrame frame) {
84-
partialEvaluationConstantAndEquals(finalWeakRefInteger.get(), Integer.valueOf(0));
8582
partialEvaluationConstantAndEquals(finalWeakRefNull.get(), null);
8683

8784
IntSupplier supplier = finalWeakRef.get();

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/asm/amd64/AMD64Assembler.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,10 @@ private enum OpAssertion {
232232
}
233233

234234
protected boolean checkOperands(AMD64Op op, OperandSize size, Register resultReg, Register inputReg) {
235-
assert resultReg == null || resultCategory.equals(resultReg.getRegisterCategory()) : "invalid result register " + resultReg + " used in " + op;
236-
assert inputReg == null || inputCategory.equals(inputReg.getRegisterCategory()) : "invalid input register " + inputReg + " used in " + op;
235+
GraalError.guarantee(resultReg == null || resultCategory.equals(resultReg.getRegisterCategory()), "invalid result register %s used in %s ", resultReg, op);
236+
GraalError.guarantee(inputReg == null || inputCategory.equals(inputReg.getRegisterCategory()), "invalid input register %s used in %s ", inputReg, op);
237+
GraalError.guarantee(resultReg == null || !inRC(CPU, resultReg) || (resultReg.encoding < 16), "APX register %s used in %s is not yet supported", resultReg, op);
238+
GraalError.guarantee(inputReg == null || !inRC(CPU, inputReg) || (inputReg.encoding < 16), "APX register %s used in %s is not yet supported", inputReg, op);
237239

238240
for (OperandSize s : allowedSizes) {
239241
if (size == s) {

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/asm/amd64/AMD64BaseAssembler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,9 @@ protected static int getRXB(Register reg, Register rm) {
584584
* There is an SIB byte: In that case, X extends SIB.index and B extends SIB.base.
585585
*/
586586
protected static int getRXB(Register reg, AMD64Address rm) {
587-
assert !isInvalidEncoding(reg);
587+
GraalError.guarantee(!isInvalidEncoding(reg), "invalid encoding %s", reg);
588+
GraalError.guarantee(rm.getBase() == null || rm.getBase().encoding < 16, "APX register used in %s not yet supported", rm);
589+
GraalError.guarantee(rm.getIndex() == null || rm.getIndex().encoding < 16, "APX register used in %s not yet supported", rm);
588590
int rxb = (reg == null ? 0 : reg.encoding & 0x08) >> 1;
589591
if (!isInvalidEncoding(rm.getIndex())) {
590592
rxb |= (rm.getIndex().encoding & 0x08) >> 2;

0 commit comments

Comments
 (0)