Skip to content

Commit 6fc1207

Browse files
committed
Merge remote-tracking branch 'origin/master' into ds/GR-60088
# Conflicts: # compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/HotSpotGraalCompilerFactory.java # compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/libgraal/truffle/GraalEntryPoints.java # compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/options/OptionsParser.java # substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalEntryPoints.java # substratevm/src/com.oracle.svm.graal.hotspot.libgraal/src/com/oracle/svm/graal/hotspot/libgraal/LibGraalFeature.java # substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/ClassLoaderFeature.java
2 parents 50b842b + 43d4eb6 commit 6fc1207

File tree

402 files changed

+9301
-4115
lines changed

Some content is hidden

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

402 files changed

+9301
-4115
lines changed

.github/actions/build-graalvm/action.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ runs:
3939
uses: actions/setup-python@v5
4040
with:
4141
python-version: '3.8'
42-
- name: Update mx cache
43-
uses: actions/cache@v4
44-
with:
45-
path: ~/.mx
46-
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
47-
restore-keys: ${{ runner.os }}-mx-
4842
- name: Fetch LabsJDK
4943
shell: bash
5044
run: |

.github/workflows/main.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# The Universal Permissive License (UPL), Version 1.0
@@ -76,6 +76,7 @@ concurrency:
7676

7777
env:
7878
JAVA_HOME: ${{ github.workspace }}/jdk
79+
TOOLS_JAVA_HOME_LOCATION: ${{ github.workspace }}/tools-jdk
7980
LANG: en_US.UTF-8
8081
MX_GIT_CACHE: refcache
8182
MX_PATH: ${{ github.workspace }}/mx
@@ -97,7 +98,8 @@ jobs:
9798
include:
9899
# /compiler
99100
- env:
100-
JDK_VERSION: "21"
101+
JDK_VERSION: "latest"
102+
TOOLS_JDK_VERSION: "21"
101103
GATE_TAGS: "style,fullbuild,test"
102104
PRIMARY: "compiler"
103105
- env:
@@ -111,7 +113,8 @@ jobs:
111113
PRIMARY: "espresso"
112114
# /substratevm
113115
- env:
114-
JDK_VERSION: "21"
116+
JDK_VERSION: "latest"
117+
TOOLS_JDK_VERSION: "21"
115118
GATE_TAGS: "style,fullbuild"
116119
PRIMARY: "substratevm"
117120
- env:
@@ -178,17 +181,16 @@ jobs:
178181
uses: actions/setup-python@v5
179182
with:
180183
python-version: '3.8'
181-
- name: Update mx cache
182-
uses: actions/cache@v4
183-
with:
184-
path: ~/.mx
185-
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
186-
restore-keys: ${{ runner.os }}-mx-
187184
- name: Fetch LabsJDK
188185
env: ${{ matrix.env }}
189186
run: |
190187
mkdir jdk-dl
191188
${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-${JDK_VERSION} --to jdk-dl --alias ${JAVA_HOME}
189+
- name: Fetch Tools JDK
190+
env: ${{ matrix.env }}
191+
if: ${{ matrix.env.TOOLS_JDK_VERSION != '' }}
192+
run: |
193+
${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-${TOOLS_JDK_VERSION} --to jdk-dl --alias ${TOOLS_JAVA_HOME_LOCATION}
192194
- name: Update dependency cache
193195
if: ${{ env.MX_RUNS_DEBUG == 'true' || env.MX_RUNS_STYLE == 'true' }}
194196
run: sudo apt update
@@ -217,7 +219,7 @@ jobs:
217219
run: rm -rf .git
218220
- name: Build GraalVM and run gate with tags
219221
env: ${{ matrix.env }}
220-
run: ${MX_PATH}/mx --primary-suite-path ${PRIMARY} --java-home=${JAVA_HOME} gate --strict-mode ${{ matrix.env.GATE_OPTS }} --tags ${GATE_TAGS}
222+
run: ${MX_PATH}/mx --primary-suite-path ${PRIMARY} --java-home=${JAVA_HOME} --tools-java-home=${{ matrix.env.TOOLS_JDK_VERSION != '' && env.TOOLS_JAVA_HOME_LOCATION || '' }} gate --strict-mode ${{ matrix.env.GATE_OPTS }} --tags ${GATE_TAGS}
221223
if: ${{ matrix.env.GATE_TAGS != '' }}
222224
- name: Build GraalVM and run gate without tags
223225
env: ${{ matrix.env }}

.github/workflows/ni-layers.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ on:
4444
push:
4545
paths:
4646
- '.github/workflows/ni-layers.yml'
47+
- 'vm/tests/gh_workflows/NILayerTests/**'
4748
pull_request:
4849
paths:
4950
- '.github/workflows/ni-layers.yml'
51+
- 'vm/tests/gh_workflows/NILayerTests/**'
5052
schedule:
5153
- cron: "0 0 * * 1" # Once a week, at midnight on Monday (00:00 UTC)
5254
workflow_dispatch:

common.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
55
],
66

7-
"mx_version": "7.36.5",
7+
"mx_version": "7.38.0",
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+5-417", "platformspecific": true, "extrabundles": ["static-libs"]},
11+
"galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+6-477", "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 },
@@ -45,13 +45,13 @@
4545

4646
"oraclejdk23": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+37", "platformspecific": true, "extrabundles": ["static-libs"]},
4747

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

5757
"eclipse": {

compiler/ci/ci_common/gate.jsonnet

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
bootstrap_full_zgc:: s.base("build,bootstrapfullverify", no_warning_as_error=true, extra_vm_args="-XX:+UseZGC"),
165165
bootstrap_economy:: s.base("build,bootstrapeconomy", no_warning_as_error=true, extra_vm_args="-Djdk.graal.CompilerConfiguration=economy"),
166166

167-
style:: c.deps.eclipse + c.deps.jdt + s.base("style,fullbuild,javadoc") + galahad.exclude,
167+
style:: c.deps.eclipse + c.deps.jdt + c.deps.spotbugs + s.base("style,fullbuild,javadoc") + galahad.exclude,
168168

169169
avx3:: {
170170
capabilities+: ["avx512"],
@@ -231,8 +231,8 @@
231231

232232
# Style jobs need to stay on a JDK compatible with all the style
233233
# checking tools (SpotBugs, Checkstyle, Eclipse formatter etc).
234-
"gate-compiler-style-labsjdk-21-linux-amd64": t("45:00"),
235-
"gate-compiler-build-labsjdk-latest-linux-amd64": t("25:00"),
234+
"gate-compiler-style-labsjdk-latest-linux-amd64": t("45:00"),
235+
"gate-compiler-build-labsjdk-21-linux-amd64": t("25:00"),
236236

237237
"gate-compiler-ctw-labsjdk-latest-linux-amd64": {},
238238
"gate-compiler-ctw-labsjdk-latest-windows-amd64": t("1:50:00"),
@@ -485,13 +485,13 @@
485485
]
486486
],
487487

488-
local style_builds = [self.make_build("21", "linux-amd64", "style").build + {
488+
local style_builds = [self.make_build(self.jdk_latest, "linux-amd64", "style").build + {
489489
environment+: {
490490
# Run the strict JVMCI version check, i.e., that JVMCIVersionCheck.JVMCI_MIN_VERSION matches the versions in common.json.
491491
JVMCI_VERSION_CHECK: "strict",
492492
},
493493
}],
494-
local jdk_latest_version_check_builds = [self.make_build(self.jdk_latest, "linux-amd64", "build", extra_tasks={build:: s.base("build"),}).build + galahad.exclude {
494+
local jdk_21_version_check_builds = [self.make_build("21", "linux-amd64", "build", extra_tasks={build:: s.base("build"),}).build + galahad.exclude {
495495
environment+: {
496496
# Run the strict JVMCI version check, i.e., that JVMCIVersionCheck.JVMCI_MIN_VERSION matches the versions in common.json.
497497
JVMCI_VERSION_CHECK: "strict",
@@ -512,7 +512,7 @@
512512
all_zgc_builds +
513513
all_serialgc_builds +
514514
style_builds +
515-
jdk_latest_version_check_builds +
515+
jdk_21_version_check_builds +
516516
linux_amd64_jdk_latest_builds +
517517
linux_amd64_jdk_latestDebug_builds,
518518

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/CountedLoopMaxTripCountPiTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ int ascendingSnippet(int start, int limit) {
5454
for (int i = start; GraalDirectives.injectIterationCount(101, i < limit); i++) {
5555
GraalDirectives.sideEffect(i);
5656
sum += i;
57+
GraalDirectives.neverStripMine();
5758
}
5859
return sum + maxTripCount;
5960
}
@@ -64,6 +65,7 @@ int descendingSnippet(int start, int limit) {
6465
for (int i = start; GraalDirectives.injectIterationCount(102, i >= limit); i--) {
6566
GraalDirectives.sideEffect(i);
6667
sum += i;
68+
GraalDirectives.neverStripMine();
6769
}
6870
return sum + maxTripCount;
6971
}
@@ -76,9 +78,12 @@ int descendingSnippet(int start, int limit) {
7678
void checkGraph(StructuredGraph graph, LoopsData loops) {
7779
loops.detectCountedLoops();
7880
for (Loop loop : loops.loops()) {
81+
if (loop.loopBegin().isStripMinedOuter()) {
82+
continue;
83+
}
7984
// max trip count can only be used if a loop does not overflow
80-
loop.counted().createOverFlowGuard();
8185
Assert.assertTrue("expect all loops to be counted", loop.isCounted());
86+
loop.counted().createOverFlowGuard();
8287
ValueNode maxTripCountNode = loop.counted().maxTripCountNode();
8388
Assert.assertTrue("expect a PiNode for the guarded maxTripCount, got: " + maxTripCountNode, maxTripCountNode instanceof PiNode);
8489
}

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/CountedLoopTest.java

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 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
@@ -27,6 +27,9 @@
2727
import static jdk.graal.compiler.nodeinfo.NodeCycles.CYCLES_IGNORED;
2828
import static jdk.graal.compiler.nodeinfo.NodeSize.SIZE_IGNORED;
2929

30+
import org.junit.Ignore;
31+
import org.junit.Test;
32+
3033
import jdk.graal.compiler.api.directives.GraalDirectives;
3134
import jdk.graal.compiler.graph.NodeClass;
3235
import jdk.graal.compiler.nodeinfo.NodeInfo;
@@ -47,10 +50,6 @@
4750
import jdk.graal.compiler.nodes.util.GraphUtil;
4851
import jdk.graal.compiler.options.OptionValues;
4952
import jdk.graal.compiler.phases.OptimisticOptimizations;
50-
51-
import org.junit.Ignore;
52-
import org.junit.Test;
53-
5453
import jdk.vm.ci.code.InstalledCode;
5554
import jdk.vm.ci.meta.JavaKind;
5655
import jdk.vm.ci.meta.ResolvedJavaMethod;
@@ -572,6 +571,22 @@ public void decrementUnsigned10() {
572571
testCounted("decrementUnsignedSnippet", Integer.MAX_VALUE + 10, Integer.MAX_VALUE - 1, 2);
573572
}
574573

574+
public static Result shiftLargeLongSnippet() {
575+
Result ret = new Result();
576+
for (long i = 1; GraalDirectives.injectIterationCount(11, i <= 10); i++) {
577+
GraalDirectives.controlFlowAnchor();
578+
long derived = i << 48;
579+
ret.extremum = get(InductionVariable::extremumNode, InductionVariable::constantExtremum, InductionVariable::isConstantExtremum, derived);
580+
}
581+
ret.exitValue = 0;
582+
return ret;
583+
}
584+
585+
@Test
586+
public void shiftLargeLong() {
587+
testCounted("shiftLargeLongSnippet");
588+
}
589+
575590
@NodeInfo(cycles = CYCLES_IGNORED, size = SIZE_IGNORED)
576591
private static class IVPropertyNode extends FloatingNode implements LIRLowerable {
577592
public static final NodeClass<IVPropertyNode> TYPE = NodeClass.create(IVPropertyNode.class);

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/LoopSafepointStateVerificationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ public Optional<NotApplicable> notApplicableTo(GraphState graphState) {
9999
@Override
100100
protected void run(StructuredGraph graph, HighTierContext context) {
101101
for (LoopBeginNode lb : graph.getNodes(LoopBeginNode.TYPE)) {
102-
lb.disableSafepoint(SafepointState.MUST_NEVER_SAFEPOINT);
103-
lb.disableGuestSafepoint(SafepointState.MUST_NEVER_SAFEPOINT);
102+
lb.setLoopEndSafepoint(SafepointState.MUST_NEVER_SAFEPOINT);
103+
lb.setGuestSafepoint(SafepointState.MUST_NEVER_SAFEPOINT);
104104
}
105105
}
106106

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/deopt/MonitorDeoptTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ private static LoopBeginNode findFirstLoop(StructuredGraph graph) {
181181
*/
182182
private static void removeLoopSafepoint(StructuredGraph graph) {
183183
LoopBeginNode loopBegin = findFirstLoop(graph);
184-
loopBegin.disableSafepoint(SafepointState.MUST_NEVER_SAFEPOINT);
184+
loopBegin.setLoopEndSafepoint(SafepointState.MUST_NEVER_SAFEPOINT);
185185
}
186186

187187
@Test

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/jfr/TestGetEventWriter.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2022, 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,6 +29,7 @@
2929
import java.lang.reflect.InvocationTargetException;
3030

3131
import org.junit.Assert;
32+
import org.junit.Assume;
3233
import org.junit.Test;
3334
import org.objectweb.asm.AnnotationVisitor;
3435
import org.objectweb.asm.ClassWriter;
@@ -37,6 +38,7 @@
3738

3839
import jdk.graal.compiler.core.common.PermanentBailoutException;
3940
import jdk.graal.compiler.core.test.SubprocessTest;
41+
import jdk.graal.compiler.serviceprovider.JavaVersionUtil;
4042
import jdk.graal.compiler.test.AddExports;
4143
import jdk.jfr.Event;
4244
import jdk.jfr.Recording;
@@ -69,9 +71,9 @@ private static void initializeJFR() {
6971
}
7072
// Make sure EventWriterFactory can be accessed.
7173
try {
72-
Class.forName("jdk.jfr.internal.event.EventWriterFactory");
74+
Class.forName("jdk.jfr.internal.event.EventWriter");
7375
} catch (ClassNotFoundException e) {
74-
throw new AssertionError("Not able to access jdk.jfr.internal.event.EventWriterFactory class", e);
76+
throw new AssertionError("Not able to access jdk.jfr.internal.event.EventWriter class", e);
7577
}
7678
}
7779

@@ -80,6 +82,7 @@ static class InitializationEvent extends Event {
8082

8183
@Test
8284
public void test() throws IOException, InterruptedException {
85+
Assume.assumeTrue(JavaVersionUtil.JAVA_SPEC > 21);
8386
String[] args;
8487
if (isJFRAvailable()) {
8588
args = new String[0];
@@ -229,8 +232,8 @@ Runnable newEventObject(String superClass, Boolean isRegistered, String commitNa
229232
}
230233
MethodVisitor commit = cw.visitMethod(commitAccess, commitName, "()V", null, null);
231234
commit.visitCode();
232-
commit.visitInsn(Opcodes.LCONST_1);
233-
commit.visitMethodInsn(Opcodes.INVOKESTATIC, "jdk/jfr/internal/event/EventWriterFactory", "getEventWriter", "(J)Ljdk/jfr/internal/event/EventWriter;", false);
235+
commit.visitMethodInsn(Opcodes.INVOKESTATIC, "jdk/jfr/internal/event/EventWriter", "getEventWriter", "()Ljdk/jfr/internal/event/EventWriter;", false);
236+
commit.visitInsn(Opcodes.POP);
234237
commit.visitInsn(Opcodes.RETURN);
235238
commit.visitMaxs(0, 0);
236239
commit.visitEnd();

0 commit comments

Comments
 (0)