Skip to content

Commit aaf3ac4

Browse files
Merge branch 'master' of github.com:oracle/graal into trim-stacktraces
2 parents 24f3a22 + 419fa40 commit aaf3ac4

File tree

1,299 files changed

+71530
-13650
lines changed

Some content is hidden

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

1,299 files changed

+71530
-13650
lines changed

.github/workflows/ni-layers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ on:
4848
paths:
4949
- '.github/workflows/ni-layers.yml'
5050
schedule:
51-
- cron: "0 0 * * 1"
51+
- cron: "0 0 * * 1" # Once a week, at midnight on Monday (00:00 UTC)
5252
workflow_dispatch:
5353

5454
env:

ci/common.jsonnet

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,12 @@ local common_json = import "../common.json";
203203
},
204204
},
205205

206+
gradle:: {
207+
downloads+: {
208+
GRADLE_JAVA_HOME: jdks_data["oraclejdk21"],
209+
}
210+
},
211+
206212
local code_tools = {
207213
downloads+: if 'jdk_version' in self && self.jdk_version > 21 then {
208214
TOOLS_JAVA_HOME: jdks_data['oraclejdk21'],
@@ -251,7 +257,7 @@ local common_json = import "../common.json";
251257
} else {},
252258
},
253259

254-
graalpy:: {
260+
graalpy:: self.gradle + {
255261
packages+: if (self.os == "linux") then {
256262
libffi: '>=3.2.1',
257263
bzip2: '>=1.0.6',

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.35.2",
7+
"mx_version": "7.36.1",
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": "24", "build_id": "jdk-24+25-3126", "platformspecific": true, "extrabundles": ["static-libs"]},
11+
"galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+2-128", "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": "24", "build_id": "jdk-24+25", "platformspecific": true, "extrabundles": ["static-libs"]},
49-
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-24+25-jvmci-b01", "platformspecific": true },
50-
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-24+25-jvmci-b01-debug", "platformspecific": true },
51-
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-24+25-jvmci-b01-sulong", "platformspecific": true },
52-
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-24+25-jvmci-b01", "platformspecific": true },
53-
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-24+25-jvmci-b01-debug", "platformspecific": true },
54-
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-24+25-jvmci-b01-sulong", "platformspecific": true }
48+
"oraclejdk-latest": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+3", "platformspecific": true, "extrabundles": ["static-libs"]},
49+
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-25+3-jvmci-b01", "platformspecific": true },
50+
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-25+3-jvmci-b01-debug", "platformspecific": true },
51+
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-25+3-jvmci-b01-sulong", "platformspecific": true },
52+
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-25+3-jvmci-b01", "platformspecific": true },
53+
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-25+3-jvmci-b01-debug", "platformspecific": true },
54+
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-25+3-jvmci-b01-sulong", "platformspecific": true }
5555
},
5656

5757
"eclipse": {

compiler/ci/ci_common/benchmark-suites.libsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
run+: [
7171
self.benchmark_cmd + ["scala-dacapo:*", "--"] + self.extra_vm_args
7272
],
73-
timelimit: "01:00:00",
73+
timelimit: "01:30:00",
7474
forks_batches:: 2,
7575
bench_forks_per_batch:: 3,
7676
forks_timelimit:: "02:30:00",
@@ -105,7 +105,7 @@
105105
run+: [
106106
self.benchmark_cmd + ["renaissance:*"] + suite_version_args + ["--"] + self.extra_vm_args
107107
],
108-
timelimit: "2:00:00",
108+
timelimit: "2:30:00",
109109
forks_batches:: 4,
110110
bench_forks_per_batch:: 2,
111111
forks_timelimit:: "4:00:00",

compiler/ci/ci_common/gate.jsonnet

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@
9393

9494
coverage_base(ctw):: s.base(tags="build,%s" % if ctw then "ctw" else "coverage",
9595
cmd_suffix=s.jacoco_gate_args,
96-
extra_vm_args=if !ctw then "" else "-DCompileTheWorld.MaxClasses=5000 -Djdk.graal.CompilationFailureAction=Print" /*GR-23372 for MaxClasses*/) +
96+
# Leaving assertions enabled slows down ctw enough to cause timeouts, and libgraal does not include assertions anyway.
97+
extra_vm_args=if !ctw then "" else "-da -DCompileTheWorld.MaxClasses=5000 -Djdk.graal.CompilationFailureAction=Print" /*GR-23372 for MaxClasses*/) +
9798
{
9899
teardown+: [
99100
s.upload_coverage,

compiler/ci/ci_includes/baseline-benchmarks.jsonnet

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,14 @@
66
local bench = (import '../ci_common/benchmark-suites.libsonnet'),
77
local hw = bc.bench_hw,
88

9-
local hotspot_amd64_builds = [
10-
c.weekly + hw.e3 + jdk + cc.c2 + suite
9+
local hotspot_builds = std.flattenArrays([
10+
[
11+
c.weekly + hw.e3 + jdk + cc.c2 + suite,
12+
c.weekly + hw.a12c + jdk + cc.c2 + suite
13+
]
1114
for jdk in cc.jdks_of_interest
1215
for suite in bench.groups.all_suites
13-
],
14-
15-
local hotspot_aarch64_builds = [
16-
c.weekly + hw.a12c + jdk + cc.c2 + suite
17-
for jdk in cc.jdks_of_interest
18-
for suite in bench.groups.main_suites
19-
] + [
20-
c.monthly + hw.a12c + jdk + cc.c2 + bench.specjbb2015,
21-
for jdk in cc.product_jdks
22-
],
16+
]),
2317

2418
local hotspot_profiling_builds = std.flattenArrays([
2519
[
@@ -73,7 +67,7 @@
7367
]
7468
for jdk in cc.product_jdks
7569
]),
76-
local all_builds = hotspot_amd64_builds + hotspot_aarch64_builds + hotspot_profiling_builds +
70+
local all_builds = hotspot_builds + hotspot_profiling_builds +
7771
weekly_forks_amd64_builds + weekly_forks_aarch64_builds + economy_builds + no_tiered_builds + gc_variants_builds,
7872
local filtered_builds = [b for b in all_builds if b.is_jdk_supported(b.jdk_version) && b.is_arch_supported(b.arch)],
7973

compiler/mx.compiler/suite.py

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"sourceinprojectwhitelist" : [],
55

66
"groupId" : "org.graalvm.compiler",
7-
"version" : "24.2.0",
7+
"version" : "25.0.0",
88
"release" : False,
99
"url" : "http://www.graalvm.org/",
1010
"developer" : {
@@ -85,33 +85,39 @@
8585
"urls" : ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/batik-all-1.7.jar"],
8686
},
8787

88-
"ASM_9.5" : {
89-
"digest" : "sha512:9e65f2983783725bae196ca939b45246958731246df1c495089c8ea5ce646de77c4e01a5a9ba10642016bb3258e1727e9ebcece6e74d9e3c32f528025d76b955",
88+
"ASM_9.7.1" : {
89+
"digest" : "sha512:4767b01603dad5c79cc1e2b5f3722f72b1059d928f184f446ba11badeb1b381b3a3a9a801cc43d25d396df950b09d19597c73173c411b1da890de808b94f1f50",
90+
"sourceDigest" : "sha512:d7c0de5912d04949a3d06cad366ff35a877da2682d9c74579625d62686032ea9349aff6102b17f92e9ec7eb4e9b1cd906b649c6a3ac798bfb9e31e5425de009d",
9091
"maven" : {
9192
"groupId" : "org.ow2.asm",
9293
"artifactId" : "asm",
93-
"version" : "9.5",
94+
"version" : "9.7.1",
9495
},
96+
"license" : "BSD-new",
9597
},
9698

97-
"ASM_TREE_9.5" : {
98-
"digest" : "sha512:816de8f84c216a7bd97b2458bde64a4b99a039b7b59fbd1ef52edf8bf869edabb93967736fe0c61e8eb3e1520e0cefe69ba59cda12df30f9f85db75fb6c064f3",
99+
"ASM_TREE_9.7.1" : {
100+
"digest" : "sha512:e55008c392fdd35e95d3404766b12dd4b46e13d5c362fcd0ab42a65751a82737eaf0ebc857691d1916190d34407adfde4437615d69c278785416fd911e00978d",
101+
"sourceDigest" : "sha512:3cea80bc7b55679dfa3d2065c6cb6951007cc7817082e9fcf4c5e3cdc073c22eddf7c7899cff60b1092049ec9038e8d3aa9a8828ef731739bda8b5afcec30e86",
99102
"maven" : {
100103
"groupId" : "org.ow2.asm",
101104
"artifactId" : "asm-tree",
102-
"version" : "9.5",
105+
"version" : "9.7.1",
103106
},
104-
"dependencies" : ["ASM_9.5"],
107+
"dependencies" : ["ASM_9.7.1"],
108+
"license" : "BSD-new",
105109
},
106110

107-
"ASM_UTIL_9.5" : {
108-
"digest" : "sha512:f68284d8f8fd029f3f428112225b2035ed3a4216cf3b34e0aacc83c32a6d44ab5e5d128b60a13ef768e3396041a62cf63f7fd3445dc5a05ce0ae03a2b2ed3080",
111+
"ASM_UTIL_9.7.1" : {
112+
"digest" : "sha512:522d793d15a2c5ea6504a50222cf0750f1eab7b881cf289675042539b1aba8b3868197b1bebe729de728dd10020eb028ae16252dcd5d84fdcbf7f925832bc269",
113+
"sourceDigest" : "sha512:387aa887bfec24aec287d9aacebfdc0c2e1ab16a4adce933aecac6fc41545ce43a3eea0ed139db52dd0d0af910cfd2162aa4d6330a81b32b64b36f03b49db66a",
109114
"maven" : {
110115
"groupId" : "org.ow2.asm",
111116
"artifactId" : "asm-util",
112-
"version" : "9.5",
117+
"version" : "9.7.1",
113118
},
114-
"dependencies" : ["ASM_9.5"],
119+
"dependencies" : ["ASM_9.7.1"],
120+
"license" : "BSD-new",
115121
},
116122

117123
"HSDIS" : {
@@ -244,8 +250,8 @@
244250
"dependencies" : [
245251
"jdk.graal.compiler",
246252
"mx:JUNIT",
247-
"ASM_TREE_9.5",
248-
"ASM_UTIL_9.5",
253+
"ASM_TREE_9.7.1",
254+
"ASM_UTIL_9.7.1",
249255
"JAVA_ALLOCATION_INSTRUMENTER",
250256
"truffle:TRUFFLE_SL_TEST",
251257
"truffle:TRUFFLE_TEST",
@@ -499,8 +505,8 @@
499505
"truffle:TRUFFLE_COMPILER",
500506
"truffle:TRUFFLE_RUNTIME",
501507
"regex:TREGEX",
502-
"ASM_TREE_9.5",
503-
"ASM_UTIL_9.5",
508+
"ASM_TREE_9.7.1",
509+
"ASM_UTIL_9.7.1",
504510
],
505511
"exclude" : [
506512
"mx:JUNIT",
@@ -557,8 +563,8 @@
557563
org.graalvm.nativeimage.foreign,
558564
org.graalvm.nativeimage.llvm,
559565
com.oracle.svm.svm_enterprise,
566+
com.oracle.svm.jdwp.resident,
560567
com.oracle.svm_enterprise.ml_dataset,
561-
com.oracle.svm.enterprise.jdwp.resident,
562568
org.graalvm.nativeimage.base,
563569
org.graalvm.extraimage.builder,
564570
org.graalvm.extraimage.librarysupport,
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
/*
2+
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation. Oracle designates this
8+
* particular file as subject to the "Classpath" exception as provided
9+
* by Oracle in the LICENSE file that accompanied this code.
10+
*
11+
* This code is distributed in the hope that it will be useful, but WITHOUT
12+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
* version 2 for more details (a copy is included in the LICENSE file that
15+
* accompanied this code).
16+
*
17+
* You should have received a copy of the GNU General Public License version
18+
* 2 along with this work; if not, write to the Free Software Foundation,
19+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
*
21+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
* or visit www.oracle.com if you need additional information or have any
23+
* questions.
24+
*/
25+
package jdk.graal.compiler.core.test;
26+
27+
import java.util.HashMap;
28+
29+
import org.graalvm.collections.Pair;
30+
import org.junit.Assert;
31+
import org.junit.Test;
32+
33+
import jdk.graal.compiler.core.phases.HighTier;
34+
import jdk.graal.compiler.options.OptionValues;
35+
import jdk.vm.ci.code.InstalledCode;
36+
import jdk.vm.ci.meta.ResolvedJavaMethod;
37+
38+
/**
39+
* Tests that the cache used by the compiler tests properly handles different options.
40+
*/
41+
public class CacheResetTest extends GraalCompilerTest {
42+
43+
public static void snippet() {
44+
// do nothing
45+
}
46+
47+
private static final String SNIPPET_NAME = "snippet";
48+
49+
@Test
50+
public void testSameOptionsReuse() {
51+
final ResolvedJavaMethod installedCodeOwner = getResolvedJavaMethod(SNIPPET_NAME);
52+
53+
OptionValues opt = new OptionValues(getInitialOptions(), HighTier.Options.Inline, true);
54+
55+
test(opt, SNIPPET_NAME);
56+
InstalledCode firstInstalled = getCachedCode(installedCodeOwner);
57+
58+
test(opt, SNIPPET_NAME);
59+
InstalledCode secondInstalled = getCachedCode(installedCodeOwner);
60+
61+
assert firstInstalled.isValid();
62+
assert secondInstalled.isValid();
63+
64+
Assert.assertEquals(firstInstalled.getStart(), secondInstalled.getStart());
65+
}
66+
67+
@Test
68+
public void testSameOptionsDeepReuse() {
69+
final ResolvedJavaMethod installedCodeOwner = getResolvedJavaMethod(SNIPPET_NAME);
70+
71+
OptionValues opt = new OptionValues(getInitialOptions(), HighTier.Options.Inline, true);
72+
test(opt, SNIPPET_NAME);
73+
InstalledCode firstInstalled = getCachedCode(installedCodeOwner);
74+
75+
OptionValues opt1 = new OptionValues(getInitialOptions(), HighTier.Options.Inline, true);
76+
test(opt1, SNIPPET_NAME);
77+
InstalledCode secondInstalled = getCachedCode(installedCodeOwner);
78+
79+
assert firstInstalled.isValid();
80+
assert secondInstalled.isValid();
81+
82+
Assert.assertEquals(firstInstalled.getStart(), secondInstalled.getStart());
83+
}
84+
85+
private static InstalledCode getCachedCode(ResolvedJavaMethod method) {
86+
HashMap<ResolvedJavaMethod, Pair<OptionValues, InstalledCode>> tlCache = cache.get();
87+
Pair<OptionValues, InstalledCode> cached = tlCache.get(method);
88+
return cached.getRight();
89+
}
90+
91+
@Test
92+
public void testDifferentOptionsNoReuse() {
93+
final ResolvedJavaMethod installedCodeOwner = getResolvedJavaMethod(SNIPPET_NAME);
94+
95+
OptionValues opt = new OptionValues(getInitialOptions(), HighTier.Options.Inline, true);
96+
test(opt, SNIPPET_NAME);
97+
InstalledCode firstInstalled = getCachedCode(installedCodeOwner);
98+
99+
OptionValues opt1 = new OptionValues(getInitialOptions(), HighTier.Options.Inline, false);
100+
test(opt1, SNIPPET_NAME);
101+
InstalledCode secondInstalled = getCachedCode(installedCodeOwner);
102+
103+
assert firstInstalled.isValid();
104+
assert secondInstalled.isValid();
105+
106+
Assert.assertNotEquals(firstInstalled.getStart(), secondInstalled.getStart());
107+
}
108+
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
import jdk.vm.ci.meta.ResolvedJavaField;
119119
import jdk.vm.ci.meta.ResolvedJavaMethod;
120120
import jdk.vm.ci.meta.ResolvedJavaType;
121+
import jdk.vm.ci.meta.SpeculationLog;
121122
import jdk.vm.ci.meta.Value;
122123

123124
/**
@@ -329,12 +330,14 @@ public static void runTest(InvariantsTool tool) {
329330
verifiers.add(new VerifyUsageWithEquals(LIRKind.class));
330331
verifiers.add(new VerifyUsageWithEquals(ArithmeticOpTable.class));
331332
verifiers.add(new VerifyUsageWithEquals(ArithmeticOpTable.Op.class));
333+
verifiers.add(new VerifyUsageWithEquals(SpeculationLog.Speculation.class, SpeculationLog.NO_SPECULATION));
332334

333335
verifiers.add(new VerifySharedConstantEmptyArray());
334336
verifiers.add(new VerifyDebugUsage());
335337
verifiers.add(new VerifyVirtualizableUsage());
336338
verifiers.add(new VerifyUpdateUsages());
337339
verifiers.add(new VerifyLibGraalContextChecks());
340+
verifiers.add(new VerifyWordFactoryUsage());
338341
verifiers.add(new VerifyBailoutUsage());
339342
verifiers.add(new VerifySystemPropertyUsage());
340343
verifiers.add(new VerifyInstanceOfUsage());

0 commit comments

Comments
 (0)