Skip to content

Commit a51643a

Browse files
committed
Merge branch 'master' of https://github.com/oracle/graal into pr-windows-typeinfo
2 parents 5f289af + 4ce1c06 commit a51643a

File tree

1,057 files changed

+68111
-44408
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,057 files changed

+68111
-44408
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,16 @@ jobs:
5656
include:
5757
# /compiler
5858
- env:
59-
JDK_VERSION: "19"
59+
JDK_VERSION: "20"
6060
GATE_TAGS: "style,fullbuild,test"
6161
PRIMARY: "compiler"
6262
- env:
63-
JDK_VERSION: "19"
63+
JDK_VERSION: "20"
6464
GATE_TAGS: "build,bootstraplite"
6565
PRIMARY: "compiler"
6666
# /espresso
6767
- env:
68-
JDK_VERSION: "17" # espresso does not support JDK19 yet
68+
JDK_VERSION: "17" # espresso does not support JDK20 yet
6969
GATE_TAGS: "style,fullbuild"
7070
PRIMARY: "espresso"
7171
# /substratevm
@@ -96,7 +96,7 @@ jobs:
9696
PRIMARY: "sulong"
9797
# /truffle
9898
- env:
99-
JDK_VERSION: "19"
99+
JDK_VERSION: "20"
100100
GATE_TAGS: "" # Truffle does not use tags
101101
PRIMARY: "truffle"
102102
# /vm

ci.jsonnet

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Common
2-
local common = import 'common.jsonnet';
2+
local common = import 'ci/ci_common/common.jsonnet';
33
local graal_common = import 'graal-common.json';
44

55
# Compiler
@@ -35,12 +35,12 @@ local javadoc = import "ci_includes/publish-javadoc.jsonnet";
3535
# VM
3636
local vm = import 'vm/ci/ci_includes/vm.jsonnet';
3737

38-
local verify_ci = (import 'ci-check.libsonnet').verify_ci;
38+
local verify_ci = (import 'ci/ci_common/ci-check.libsonnet').verify_ci;
3939

4040
{
4141
# Ensure that entries in common.jsonnet can be resolved.
42-
_checkCommon: (import 'common.jsonnet'),
43-
ci_resources:: (import 'ci-resources.libsonnet'),
42+
_checkCommon: (import 'ci/ci_common/common.jsonnet'),
43+
ci_resources:: (import 'ci/ci_common/ci-resources.libsonnet'),
4444
overlay: graal_common.ci.overlay,
4545
specVersion: "3",
4646
builds: [common.add_excludes_guard(b) for b in (

bench-common.libsonnet renamed to ci/ci_common/bench-common.libsonnet

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
local common = import "common.jsonnet",
2+
local common = import "ci/ci_common/common.jsonnet",
33
local utils = import "common-utils.libsonnet",
44

55
# benchmark job base with automatically generated name
@@ -86,19 +86,20 @@
8686
["wait"]
8787
],
8888

89+
// building block used to generate fork builds
8990
many_forks_benchmarking:: common.build_base + {
90-
// building block used to generate fork builds
91-
local benchmarking_config_repo = self.ci_resources.infra.benchmarking_config_repo,
91+
// assumes that the CI provides the following env vars: CURRENT_BRANCH, BUILD_DIR (as absolute path)
92+
local config_repo = "$BUILD_DIR/benchmarking-config",
9293
environment+: {
93-
BENCHMARKING_CONFIG_REPO: "$BUILD_DIR/benchmarking-config",
94-
FORK_COUNTS_DIRECTORY: "$BENCHMARKING_CONFIG_REPO/fork-counts",
94+
FORK_COUNTS_DIRECTORY: config_repo + "/fork-counts",
9595
FORK_COUNT_FILE: error "FORK_COUNT_FILE env var must be set to use the many forks execution!"
9696
},
97+
// there is no guarantee that those setup steps run first or from the repo root folder, so all paths must be absolute
9798
setup+: [
9899
["set-export", "CURRENT_BRANCH", ["git", "rev-parse", "--abbrev-ref", "HEAD"]],
99100
["echo", "[BENCH-FORKS-CONFIG] Using configuration files from branch ${CURRENT_BRANCH} if it exists remotely."],
100-
["git", "clone", benchmarking_config_repo, "${BENCHMARKING_CONFIG_REPO}"],
101-
["test", "${CURRENT_BRANCH}", "=", "master", "||", "git", "-C", "${BENCHMARKING_CONFIG_REPO}", "checkout", "--track", "origin/${CURRENT_BRANCH}", "||", "echo", "Using default fork counts since there is no branch named '${CURRENT_BRANCH}' in the benchmarking-config repo."]
101+
["git", "clone", self.ci_resources.infra.benchmarking_config_repo, config_repo],
102+
["test", "${CURRENT_BRANCH}", "=", "master", "||", "git", "-C", config_repo, "checkout", "--track", "origin/${CURRENT_BRANCH}", "||", "echo", "Using default fork counts since there is no branch named '${CURRENT_BRANCH}' in the benchmarking-config repo."]
102103
]
103104
},
104105

File renamed without changes.
File renamed without changes.

common-utils.libsonnet renamed to ci/ci_common/common-utils.libsonnet

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,16 @@
7575
hyphenize(a_list)::
7676
std.join("-", std.filterMap(function(el) el != null, function(el) std.toString(el), a_list)),
7777

78+
# Pattern for a guard.includes clause that captures all top-level CI files.
79+
top_level_ci:: ["*.json", "*.jsonnet", "*.libsonnet", "ci/**"],
80+
7881
# Adds a CI build predicate to `build` if it is a gate such that it is only
79-
# run if a non-documentation file in any of `suites` has been updated.
82+
# run if a top level CI file or a non-documentation file in any of `suites` has been updated
8083
add_gate_predicate(build, suites, extra_includes=[], extra_excludes=[])::
8184
if std.member(build.targets, "gate") then
8285
build + {
8386
guard+: {
84-
includes+: [ suite + "/**" for suite in suites ] + extra_includes + ["/*.jsonnet", "/*.libsonnet", "/*.json"],
87+
includes+: [ suite + "/**" for suite in suites ] + extra_includes + $.top_level_ci,
8588
excludes+: [ suite + "/docs/**" for suite in suites ] + [ "**.md" ] + extra_excludes
8689
}
8790
}
@@ -94,4 +97,22 @@
9497
if objectHas(o, f) then o[f] else default
9598
,
9699

100+
# Makes all properties of an object visible. By default, this function will turn hidden properties to public ones.
101+
# Some properties, namely functions, cannot be manifested as json. Trying to do so will result in an error.
102+
# Sometimes, e.g., for error reporting or debugging, it is useful to print it nevertheless, ignoring the
103+
# functions.
104+
make_visible(o, inc_hidden=true)::
105+
local objectFields = if inc_hidden then std.objectFieldsAll else std.objectFields;
106+
if std.type(o) == "array" then
107+
[$.make_visible(e, inc_hidden=inc_hidden) for e in o]
108+
else if std.type(o) == "object" then
109+
{
110+
[key] : $.make_visible(o[key], inc_hidden=inc_hidden)
111+
for key in objectFields(o)
112+
}
113+
else if std.type(o) == "function" then
114+
"<function>"
115+
else
116+
o
117+
,
97118
}

common.jsonnet renamed to ci/ci_common/common.jsonnet

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
local composable = (import "common-utils.libsonnet").composable;
22

3-
local mx_version = (import "common.json").mx_version;
4-
local common_json = composable(import "common.json");
5-
local repo_config = import 'repo-configuration.libsonnet';
3+
local mx_version = (import "../../common.json").mx_version;
4+
local common_json = composable(import "../../common.json");
5+
local repo_config = import '../repo-configuration.libsonnet';
66
local jdks = common_json.jdks;
77
local deps = common_json.deps;
88
local downloads = common_json.downloads;
@@ -51,7 +51,7 @@ local add_jdk_version(name) =
5151

5252
build_base:: {
5353
// holds location of CI resources that can easily be overwritten in an overlay
54-
ci_resources:: (import "ci-resources.libsonnet"),
54+
ci_resources:: (import "ci/ci_common/ci-resources.libsonnet"),
5555
},
5656

5757
// Job frequencies
@@ -128,6 +128,11 @@ local add_jdk_version(name) =
128128
labsjdk17LLVM:: self["labsjdk-" + repo_config.graalvm_edition + "-17-llvm"],
129129
labsjdk19LLVM:: self["labsjdk-" + repo_config.graalvm_edition + "-19-llvm"],
130130

131+
# Only CE exists for JDK 20 until JDK 20 GA.
132+
labsjdk20:: self["labsjdk-ce-20"],
133+
labsjdk20Debug:: self["labsjdk-ce-20Debug"],
134+
labsjdk20LLVM:: self["labsjdk-ce-20-llvm"],
135+
131136

132137
// Hardware definitions
133138
// ********************

ci/ci_common/run-spec-examples.libsonnet

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ local r = import "run-spec.libsonnet";
184184
//
185185
local _result =
186186
{
187-
"serialgc": {
187+
"gc:serialgc": {
188188
"<all-os>": {
189189
"<build-config>": {
190190
"features": "SerialGC"
@@ -197,7 +197,7 @@ local r = import "run-spec.libsonnet";
197197
}
198198
}
199199
},
200-
"serialgc_musl": {
200+
"gc:serialgc_libc:musl": {
201201
"<all-os>": {
202202
"<build-config>": {
203203
"features": "SerialGCMusl"
@@ -210,7 +210,7 @@ local r = import "run-spec.libsonnet";
210210
}
211211
}
212212
},
213-
"g1gc": {
213+
"gc:g1gc": {
214214
"<all-os>": {
215215
"<build-config>": {
216216
"features": "G1GC"

ci/ci_common/run-spec-impl.libsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ local supported_oss_names = r.supported_oss_names;
33
local supported_archs_names = r.supported_archs_names;
44
local supported_jdks_names = r.supported_jdks_names;
55

6-
local std_get = (import "../../common-utils.libsonnet").std_get;
6+
local std_get = (import "../../ci/ci_common/common-utils.libsonnet").std_get;
77
{
88
//
99
local CONFIG_KEY = "<build-config>",
@@ -103,7 +103,7 @@ local std_get = (import "../../common-utils.libsonnet").std_get;
103103
for field in std.objectFieldsAll(obj)
104104
]);
105105
// create a stable name from features
106-
local variant_name_from_features(features) = std.join("_", [features[f] for f in feature_order if std.member(std.objectFieldsAll(features), f)]);
106+
local variant_name_from_features(features) = std.join("_", ["%s:%s" % [f, features[f]] for f in feature_order if std.member(std.objectFieldsAll(features), f)]);
107107
// turn the features list into a variants dictionary
108108
local features_to_variant(arr) = [
109109
{

ci/ci_common/run-spec-tools.libsonnet

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ local _impl = import "run-spec-impl.libsonnet";
33
local supported_oss_names = r.supported_oss_names;
44
local supported_archs_names = r.supported_archs_names;
55
local supported_jdks_names = r.supported_jdks_names;
6-
local std_get = (import "../../common-utils.libsonnet").std_get;
6+
local std_get = (import "../../ci/ci_common/common-utils.libsonnet").std_get;
77
{
88
local map_os_arch_jdk(fn) =
99
[fn(os, arch, jdk)
@@ -20,7 +20,7 @@ local std_get = (import "../../common-utils.libsonnet").std_get;
2020
]
2121
,
2222
// return a table of the target, convert to CSV using `jq -r ".[] | @csv"`
23-
target_table(processed_spec, with_variants=false)::
23+
target_table(processed_spec, with_variants=false, with_empty=false, task_details_title="task details", task_details_factory=function(spec) "")::
2424
local map_matrix = map_jdk_os_arch;
2525
local task_dict = processed_spec.after_pushdown(inc_hidden=true);
2626
local platform_titles = map_matrix(function(os, arch, jdk) std.join("-", [os, arch, jdk]));
@@ -33,21 +33,51 @@ local std_get = (import "../../common-utils.libsonnet").std_get;
3333
else
3434
""
3535
;
36-
local get_gate_tags(spec) =
37-
std.join(" ", std_get(spec, "mxgate_tags", ["<unavailable>"]))
38-
;
3936
local cols = std.flattenArrays([
4037
local default_config = r.get_task_spec(task_dict[build]);
4138
local as_variants = {
4239
"": _impl.get_platform_spec(task_dict[build])
4340
} + if with_variants then std.prune(std_get(_impl.get_platform_spec(task_dict[build]), "variants", default={})) else {};
44-
[
41+
std.foldl(function(acc, variant) acc +
4542
local run_spec = as_variants[variant];
46-
[build, variant, get_gate_tags(default_config)] + map_matrix(function(os, arch, jdk) get_target(default_config, run_spec, os, arch, jdk))
47-
for variant in std.objectFieldsAll(as_variants)
48-
]
43+
local matrix = map_matrix(function(os, arch, jdk) get_target(default_config, run_spec, os, arch, jdk));
44+
local is_empty = std.set(matrix) == [""];
45+
if with_empty || !is_empty then
46+
[[build, variant, task_details_factory(default_config)] + matrix]
47+
else
48+
[]
49+
,
50+
std.objectFieldsAll(as_variants),
51+
[])
4952
for build in std.objectFieldsAll(task_dict)
5053
]);
51-
local table = [ ["name", "variant", "gate tags"] + platform_titles] + cols;
54+
local table = [ ["name", "variant", task_details_title] + platform_titles] + cols;
5255
table
56+
,
57+
// Removes the 'timelimit' property from an object.
58+
// Usually, this is used to remove hard-coded (default) timelimits defined in `common.json`.
59+
// These definitions assume that the os/arch definition comes first and will be refined later.
60+
// With run-spec, however, this is not true in general because the os/arch is only fixed later
61+
// in the pipeline. Thus, hard-coded timelimits would override any previous settings. To resolve
62+
// this, we delete the default value altogether and explicitly set the timelimits for all jobs.
63+
//
64+
// Implementation note: we cannot set the value to `null` and use `std.prune` because that deletes hidden fields.
65+
delete_timelimit(b)::
66+
local public_fields = std.objectFields(b);
67+
std.foldl(function(acc, k) acc +
68+
local value = b[k];
69+
if std.member(public_fields, k) then
70+
if std.type(value) == "string" then
71+
{ [k]: value }
72+
else
73+
{ [k]+: value }
74+
else
75+
if std.type(value) == "string" then
76+
{ [k]:: value }
77+
else
78+
{ [k]+:: value }
79+
,
80+
[k for k in std.objectFieldsAll(b) if k != "timelimit"],
81+
{}
82+
),
5383
}

0 commit comments

Comments
 (0)