Skip to content

Commit

Permalink
Merge branch 'master' of github.com:oracle/graal into trim-stacktraces
Browse files Browse the repository at this point in the history
  • Loading branch information
roberttoyonaga committed Jan 6, 2025
2 parents 24f3a22 + 419fa40 commit aaf3ac4
Show file tree
Hide file tree
Showing 1,299 changed files with 71,530 additions and 13,650 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ni-layers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ on:
paths:
- '.github/workflows/ni-layers.yml'
schedule:
- cron: "0 0 * * 1"
- cron: "0 0 * * 1" # Once a week, at midnight on Monday (00:00 UTC)
workflow_dispatch:

env:
Expand Down
8 changes: 7 additions & 1 deletion ci/common.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ local common_json = import "../common.json";
},
},

gradle:: {
downloads+: {
GRADLE_JAVA_HOME: jdks_data["oraclejdk21"],
}
},

local code_tools = {
downloads+: if 'jdk_version' in self && self.jdk_version > 21 then {
TOOLS_JAVA_HOME: jdks_data['oraclejdk21'],
Expand Down Expand Up @@ -251,7 +257,7 @@ local common_json = import "../common.json";
} else {},
},

graalpy:: {
graalpy:: self.gradle + {
packages+: if (self.os == "linux") then {
libffi: '>=3.2.1',
bzip2: '>=1.0.6',
Expand Down
18 changes: 9 additions & 9 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
],

"mx_version": "7.35.2",
"mx_version": "7.36.1",

"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
"jdks": {
"galahad-jdk": {"name": "jpg-jdk", "version": "24", "build_id": "jdk-24+25-3126", "platformspecific": true, "extrabundles": ["static-libs"]},
"galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+2-128", "platformspecific": true, "extrabundles": ["static-libs"]},

"oraclejdk17": {"name": "jpg-jdk", "version": "17.0.7", "build_id": "jdk-17.0.7+8", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.7+4-jvmci-23.1-b02", "platformspecific": true },
Expand Down Expand Up @@ -45,13 +45,13 @@

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

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

"eclipse": {
Expand Down
4 changes: 2 additions & 2 deletions compiler/ci/ci_common/benchmark-suites.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
run+: [
self.benchmark_cmd + ["scala-dacapo:*", "--"] + self.extra_vm_args
],
timelimit: "01:00:00",
timelimit: "01:30:00",
forks_batches:: 2,
bench_forks_per_batch:: 3,
forks_timelimit:: "02:30:00",
Expand Down Expand Up @@ -105,7 +105,7 @@
run+: [
self.benchmark_cmd + ["renaissance:*"] + suite_version_args + ["--"] + self.extra_vm_args
],
timelimit: "2:00:00",
timelimit: "2:30:00",
forks_batches:: 4,
bench_forks_per_batch:: 2,
forks_timelimit:: "4:00:00",
Expand Down
3 changes: 2 additions & 1 deletion compiler/ci/ci_common/gate.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@

coverage_base(ctw):: s.base(tags="build,%s" % if ctw then "ctw" else "coverage",
cmd_suffix=s.jacoco_gate_args,
extra_vm_args=if !ctw then "" else "-DCompileTheWorld.MaxClasses=5000 -Djdk.graal.CompilationFailureAction=Print" /*GR-23372 for MaxClasses*/) +
# Leaving assertions enabled slows down ctw enough to cause timeouts, and libgraal does not include assertions anyway.
extra_vm_args=if !ctw then "" else "-da -DCompileTheWorld.MaxClasses=5000 -Djdk.graal.CompilationFailureAction=Print" /*GR-23372 for MaxClasses*/) +
{
teardown+: [
s.upload_coverage,
Expand Down
20 changes: 7 additions & 13 deletions compiler/ci/ci_includes/baseline-benchmarks.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,14 @@
local bench = (import '../ci_common/benchmark-suites.libsonnet'),
local hw = bc.bench_hw,

local hotspot_amd64_builds = [
c.weekly + hw.e3 + jdk + cc.c2 + suite
local hotspot_builds = std.flattenArrays([
[
c.weekly + hw.e3 + jdk + cc.c2 + suite,
c.weekly + hw.a12c + jdk + cc.c2 + suite
]
for jdk in cc.jdks_of_interest
for suite in bench.groups.all_suites
],

local hotspot_aarch64_builds = [
c.weekly + hw.a12c + jdk + cc.c2 + suite
for jdk in cc.jdks_of_interest
for suite in bench.groups.main_suites
] + [
c.monthly + hw.a12c + jdk + cc.c2 + bench.specjbb2015,
for jdk in cc.product_jdks
],
]),

local hotspot_profiling_builds = std.flattenArrays([
[
Expand Down Expand Up @@ -73,7 +67,7 @@
]
for jdk in cc.product_jdks
]),
local all_builds = hotspot_amd64_builds + hotspot_aarch64_builds + hotspot_profiling_builds +
local all_builds = hotspot_builds + hotspot_profiling_builds +
weekly_forks_amd64_builds + weekly_forks_aarch64_builds + economy_builds + no_tiered_builds + gc_variants_builds,
local filtered_builds = [b for b in all_builds if b.is_jdk_supported(b.jdk_version) && b.is_arch_supported(b.arch)],

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

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

"ASM_9.5" : {
"digest" : "sha512:9e65f2983783725bae196ca939b45246958731246df1c495089c8ea5ce646de77c4e01a5a9ba10642016bb3258e1727e9ebcece6e74d9e3c32f528025d76b955",
"ASM_9.7.1" : {
"digest" : "sha512:4767b01603dad5c79cc1e2b5f3722f72b1059d928f184f446ba11badeb1b381b3a3a9a801cc43d25d396df950b09d19597c73173c411b1da890de808b94f1f50",
"sourceDigest" : "sha512:d7c0de5912d04949a3d06cad366ff35a877da2682d9c74579625d62686032ea9349aff6102b17f92e9ec7eb4e9b1cd906b649c6a3ac798bfb9e31e5425de009d",
"maven" : {
"groupId" : "org.ow2.asm",
"artifactId" : "asm",
"version" : "9.5",
"version" : "9.7.1",
},
"license" : "BSD-new",
},

"ASM_TREE_9.5" : {
"digest" : "sha512:816de8f84c216a7bd97b2458bde64a4b99a039b7b59fbd1ef52edf8bf869edabb93967736fe0c61e8eb3e1520e0cefe69ba59cda12df30f9f85db75fb6c064f3",
"ASM_TREE_9.7.1" : {
"digest" : "sha512:e55008c392fdd35e95d3404766b12dd4b46e13d5c362fcd0ab42a65751a82737eaf0ebc857691d1916190d34407adfde4437615d69c278785416fd911e00978d",
"sourceDigest" : "sha512:3cea80bc7b55679dfa3d2065c6cb6951007cc7817082e9fcf4c5e3cdc073c22eddf7c7899cff60b1092049ec9038e8d3aa9a8828ef731739bda8b5afcec30e86",
"maven" : {
"groupId" : "org.ow2.asm",
"artifactId" : "asm-tree",
"version" : "9.5",
"version" : "9.7.1",
},
"dependencies" : ["ASM_9.5"],
"dependencies" : ["ASM_9.7.1"],
"license" : "BSD-new",
},

"ASM_UTIL_9.5" : {
"digest" : "sha512:f68284d8f8fd029f3f428112225b2035ed3a4216cf3b34e0aacc83c32a6d44ab5e5d128b60a13ef768e3396041a62cf63f7fd3445dc5a05ce0ae03a2b2ed3080",
"ASM_UTIL_9.7.1" : {
"digest" : "sha512:522d793d15a2c5ea6504a50222cf0750f1eab7b881cf289675042539b1aba8b3868197b1bebe729de728dd10020eb028ae16252dcd5d84fdcbf7f925832bc269",
"sourceDigest" : "sha512:387aa887bfec24aec287d9aacebfdc0c2e1ab16a4adce933aecac6fc41545ce43a3eea0ed139db52dd0d0af910cfd2162aa4d6330a81b32b64b36f03b49db66a",
"maven" : {
"groupId" : "org.ow2.asm",
"artifactId" : "asm-util",
"version" : "9.5",
"version" : "9.7.1",
},
"dependencies" : ["ASM_9.5"],
"dependencies" : ["ASM_9.7.1"],
"license" : "BSD-new",
},

"HSDIS" : {
Expand Down Expand Up @@ -244,8 +250,8 @@
"dependencies" : [
"jdk.graal.compiler",
"mx:JUNIT",
"ASM_TREE_9.5",
"ASM_UTIL_9.5",
"ASM_TREE_9.7.1",
"ASM_UTIL_9.7.1",
"JAVA_ALLOCATION_INSTRUMENTER",
"truffle:TRUFFLE_SL_TEST",
"truffle:TRUFFLE_TEST",
Expand Down Expand Up @@ -499,8 +505,8 @@
"truffle:TRUFFLE_COMPILER",
"truffle:TRUFFLE_RUNTIME",
"regex:TREGEX",
"ASM_TREE_9.5",
"ASM_UTIL_9.5",
"ASM_TREE_9.7.1",
"ASM_UTIL_9.7.1",
],
"exclude" : [
"mx:JUNIT",
Expand Down Expand Up @@ -557,8 +563,8 @@
org.graalvm.nativeimage.foreign,
org.graalvm.nativeimage.llvm,
com.oracle.svm.svm_enterprise,
com.oracle.svm.jdwp.resident,
com.oracle.svm_enterprise.ml_dataset,
com.oracle.svm.enterprise.jdwp.resident,
org.graalvm.nativeimage.base,
org.graalvm.extraimage.builder,
org.graalvm.extraimage.librarysupport,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/*
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.graal.compiler.core.test;

import java.util.HashMap;

import org.graalvm.collections.Pair;
import org.junit.Assert;
import org.junit.Test;

import jdk.graal.compiler.core.phases.HighTier;
import jdk.graal.compiler.options.OptionValues;
import jdk.vm.ci.code.InstalledCode;
import jdk.vm.ci.meta.ResolvedJavaMethod;

/**
* Tests that the cache used by the compiler tests properly handles different options.
*/
public class CacheResetTest extends GraalCompilerTest {

public static void snippet() {
// do nothing
}

private static final String SNIPPET_NAME = "snippet";

@Test
public void testSameOptionsReuse() {
final ResolvedJavaMethod installedCodeOwner = getResolvedJavaMethod(SNIPPET_NAME);

OptionValues opt = new OptionValues(getInitialOptions(), HighTier.Options.Inline, true);

test(opt, SNIPPET_NAME);
InstalledCode firstInstalled = getCachedCode(installedCodeOwner);

test(opt, SNIPPET_NAME);
InstalledCode secondInstalled = getCachedCode(installedCodeOwner);

assert firstInstalled.isValid();
assert secondInstalled.isValid();

Assert.assertEquals(firstInstalled.getStart(), secondInstalled.getStart());
}

@Test
public void testSameOptionsDeepReuse() {
final ResolvedJavaMethod installedCodeOwner = getResolvedJavaMethod(SNIPPET_NAME);

OptionValues opt = new OptionValues(getInitialOptions(), HighTier.Options.Inline, true);
test(opt, SNIPPET_NAME);
InstalledCode firstInstalled = getCachedCode(installedCodeOwner);

OptionValues opt1 = new OptionValues(getInitialOptions(), HighTier.Options.Inline, true);
test(opt1, SNIPPET_NAME);
InstalledCode secondInstalled = getCachedCode(installedCodeOwner);

assert firstInstalled.isValid();
assert secondInstalled.isValid();

Assert.assertEquals(firstInstalled.getStart(), secondInstalled.getStart());
}

private static InstalledCode getCachedCode(ResolvedJavaMethod method) {
HashMap<ResolvedJavaMethod, Pair<OptionValues, InstalledCode>> tlCache = cache.get();
Pair<OptionValues, InstalledCode> cached = tlCache.get(method);
return cached.getRight();
}

@Test
public void testDifferentOptionsNoReuse() {
final ResolvedJavaMethod installedCodeOwner = getResolvedJavaMethod(SNIPPET_NAME);

OptionValues opt = new OptionValues(getInitialOptions(), HighTier.Options.Inline, true);
test(opt, SNIPPET_NAME);
InstalledCode firstInstalled = getCachedCode(installedCodeOwner);

OptionValues opt1 = new OptionValues(getInitialOptions(), HighTier.Options.Inline, false);
test(opt1, SNIPPET_NAME);
InstalledCode secondInstalled = getCachedCode(installedCodeOwner);

assert firstInstalled.isValid();
assert secondInstalled.isValid();

Assert.assertNotEquals(firstInstalled.getStart(), secondInstalled.getStart());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
import jdk.vm.ci.meta.ResolvedJavaField;
import jdk.vm.ci.meta.ResolvedJavaMethod;
import jdk.vm.ci.meta.ResolvedJavaType;
import jdk.vm.ci.meta.SpeculationLog;
import jdk.vm.ci.meta.Value;

/**
Expand Down Expand Up @@ -329,12 +330,14 @@ public static void runTest(InvariantsTool tool) {
verifiers.add(new VerifyUsageWithEquals(LIRKind.class));
verifiers.add(new VerifyUsageWithEquals(ArithmeticOpTable.class));
verifiers.add(new VerifyUsageWithEquals(ArithmeticOpTable.Op.class));
verifiers.add(new VerifyUsageWithEquals(SpeculationLog.Speculation.class, SpeculationLog.NO_SPECULATION));

verifiers.add(new VerifySharedConstantEmptyArray());
verifiers.add(new VerifyDebugUsage());
verifiers.add(new VerifyVirtualizableUsage());
verifiers.add(new VerifyUpdateUsages());
verifiers.add(new VerifyLibGraalContextChecks());
verifiers.add(new VerifyWordFactoryUsage());
verifiers.add(new VerifyBailoutUsage());
verifiers.add(new VerifySystemPropertyUsage());
verifiers.add(new VerifyInstanceOfUsage());
Expand Down
Loading

0 comments on commit aaf3ac4

Please sign in to comment.