Skip to content

Commit daeea07

Browse files
authored
Merge pull request #46 from zakkak/2025-02-12-backports-23.1.5-batch1
Merge upstream vm-23.1.5 tag 1st batch
2 parents d1351c0 + a5083fd commit daeea07

File tree

49 files changed

+1056
-340
lines changed

Some content is hidden

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

49 files changed

+1056
-340
lines changed

ci/ci_common/bench-common.libsonnet

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@
3131
else true
3232
},
3333

34+
# max number of threads to use for benchmarking in general
35+
# the goal being to limit parallelism on very large servers which may not be respresentative of real-world scenarios
36+
bench_max_threads:: {
37+
restrict_threads:: 36
38+
},
39+
40+
bench_no_thread_cap:: {
41+
restrict_threads:: null,
42+
should_use_hwloc:: false
43+
},
44+
3445
bench_hw:: {
3546
_bench_machine:: {
3647
targets+: ["bench"],
@@ -42,15 +53,16 @@
4253
numa_nodes:: [],
4354
is_numa:: std.length(self.numa_nodes) > 0,
4455
num_threads:: error "num_threads must bet set!",
56+
hyperthreading:: true,
4557
threads_per_node:: if self.is_numa then self.num_threads / std.length(self.numa_nodes) else self.num_threads,
4658
},
4759

48-
x52:: common.linux_amd64 + self._bench_machine + {
49-
machine_name:: "x52",
50-
capabilities+: ["no_frequency_scaling", "tmpfs25g"],
60+
e3:: common.linux_amd64 + self._bench_machine + {
61+
machine_name:: "e3",
62+
capabilities: ["e3", "tmpfs25g", "linux", "amd64"],
5163
numa_nodes:: [0, 1],
52-
default_numa_node:: 0,
53-
num_threads:: 72
64+
default_numa_node:: 1,
65+
num_threads:: 256
5466
},
5567
x82:: common.linux_amd64 + self._bench_machine + {
5668
machine_name:: "x82",
@@ -62,31 +74,29 @@
6274
xgene3:: common.linux_aarch64 + self._bench_machine + {
6375
machine_name:: "xgene3",
6476
capabilities+: [],
65-
num_threads:: 32
77+
num_threads:: 32,
78+
hyperthreading:: false
6679
},
6780
a12c:: common.linux_aarch64 + self._bench_machine + {
6881
machine_name:: "a12c",
6982
capabilities+: ["no_frequency_scaling", "tmpfs25g"],
7083
numa_nodes:: [0, 1],
7184
default_numa_node:: 0,
72-
num_threads:: 160
85+
num_threads:: 160,
86+
hyperthreading:: false
7387
}
7488
},
7589

76-
hwlocIfNuma(numa, cmd, node=0)::
77-
if numa then
90+
hwloc_cmd(cmd, num_threads, node, hyperthreading, max_threads_per_node)::
91+
if num_threads == null then
7892
["hwloc-bind", "--cpubind", "node:"+node, "--membind", "node:"+node, "--"] + cmd
7993
else
80-
cmd,
81-
82-
parallelHwloc(cmd_node0, cmd_node1)::
83-
// Returns a list of commands that will run cmd_nod0 on NUMA node 0
84-
// concurrently with cmd_node1 on NUMA node 1 and then wait for both to complete.
85-
[
86-
$.hwlocIfNuma(true, cmd_node0, node=0) + ["&"],
87-
$.hwlocIfNuma(true, cmd_node1, node=1) + ["&"],
88-
["wait"]
89-
],
94+
local threads = if num_threads != null then num_threads else max_threads_per_node;
95+
assert if hyperthreading then threads % 2 == 0 else true: "It is required to bind to an even number of threads on hyperthreaded machines. Got requested "+threads+" threads";
96+
assert threads <= max_threads_per_node: "Benchmarking must run on a single NUMA node for stability reasons. Got requested "+threads+" threads but the machine has only "+max_threads_per_node+" threads per node"; local cores = if hyperthreading then "0-"+((threads/2)-1)+".pu:0-1" else "0-"+(threads-1)+".pu:0";
97+
local cpu_bind = if hyperthreading then "node:"+node+".core:"+cores else "node:"+node+".core:"+cores+".pu:0";
98+
["hwloc-bind", "--cpubind", cpu_bind, "--membind", "node:"+node, "--"] + cmd
99+
,
90100

91101
// building block used to generate fork builds
92102
many_forks_benchmarking:: common.build_base + {

common.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
"labsjdk-ce-21": {"name": "labsjdk", "version": "ce-21.0.2+13-jvmci-23.1-b30", "platformspecific": true },
2323
"labsjdk-ce-21Debug": {"name": "labsjdk", "version": "ce-21.0.2+13-jvmci-23.1-b30-debug", "platformspecific": true },
2424
"labsjdk-ce-21-llvm": {"name": "labsjdk", "version": "ce-21.0.2+13-jvmci-23.1-b30-sulong", "platformspecific": true },
25-
"labsjdk-ee-21": {"name": "labsjdk", "version": "ee-21.0.3+7-jvmci-23.1-b37", "platformspecific": true },
26-
"labsjdk-ee-21Debug": {"name": "labsjdk", "version": "ee-21.0.3+7-jvmci-23.1-b37-debug", "platformspecific": true },
27-
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.3+7-jvmci-23.1-b37-sulong", "platformspecific": true },
25+
"labsjdk-ee-21": {"name": "labsjdk", "version": "ee-21.0.4+3-jvmci-23.1-b38", "platformspecific": true },
26+
"labsjdk-ee-21Debug": {"name": "labsjdk", "version": "ee-21.0.4+3-jvmci-23.1-b38-debug", "platformspecific": true },
27+
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.4+3-jvmci-23.1-b38-sulong", "platformspecific": true },
2828

2929
"oraclejdk22": {"name": "jpg-jdk", "version": "22", "build_id": "2", "release": true, "platformspecific": true, "extrabundles": ["static-libs"]}
3030
},

compiler/ci/ci_common/benchmark-builders.jsonnet

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,40 @@
77

88
local main_builds = std.flattenArrays([
99
[
10-
c.daily + c.opt_post_merge + hw.x52 + jdk + cc.libgraal + bench.dacapo + { unicorn_pull_request_benchmarking:: {name: 'libgraal', metrics: ['time']}},
11-
c.weekly + hw.x52 + jdk + cc.libgraal + bench.dacapo_size_variants,
12-
c.weekly + hw.x52 + jdk + cc.libgraal + bench.dacapo_timing,
13-
c.daily + c.opt_post_merge + hw.x52 + jdk + cc.libgraal + bench.scala_dacapo + {unicorn_pull_request_benchmarking:: 'libgraal'},
14-
c.weekly + hw.x52 + jdk + cc.libgraal + bench.scala_dacapo_size_variants,
15-
c.weekly + hw.x52 + jdk + cc.libgraal + bench.scala_dacapo_timing,
16-
c.daily + c.opt_post_merge + hw.x52 + jdk + cc.libgraal + bench.renaissance + {unicorn_pull_request_benchmarking:: 'libgraal'},
17-
c.daily + c.opt_post_merge + hw.x52 + jdk + cc.libgraal + bench.specjvm2008 + {unicorn_pull_request_benchmarking:: 'libgraal'},
18-
c.weekly + hw.x52 + jdk + cc.libgraal + bench.specjbb2015,
19-
c.weekly + hw.x52 + jdk + cc.libgraal + bench.specjbb2015_full_machine,
20-
c.weekly + hw.x52 + jdk + cc.libgraal + bench.renaissance_0_11,
21-
c.daily + c.opt_post_merge + hw.x52 + jdk + cc.libgraal + bench.awfy + {unicorn_pull_request_benchmarking:: 'libgraal'},
22-
c.daily + hw.x52 + jdk + cc.libgraal + bench.microservice_benchmarks,
23-
c.daily + hw.x52 + jdk + cc.libgraal + bench.renaissance_legacy,
24-
c.daily + hw.x52 + jdk + cc.libgraal + bench.micros_graal_whitebox,
25-
c.daily + hw.x52 + jdk + cc.libgraal + bench.micros_graal_dist,
26-
c.daily + hw.x52 + jdk + cc.libgraal + bench.micros_misc_graal_dist,
27-
c.daily + hw.x52 + jdk + cc.libgraal + bench.micros_shootout_graal_dist,
10+
c.daily + c.opt_post_merge + hw.e3 + jdk + cc.libgraal + bench.dacapo + { unicorn_pull_request_benchmarking:: {name: 'libgraal', metrics: ['time']}},
11+
c.weekly + hw.e3 + jdk + cc.libgraal + bench.dacapo_size_variants,
12+
c.weekly + hw.e3 + jdk + cc.libgraal + bench.dacapo_timing,
13+
c.daily + c.opt_post_merge + hw.e3 + jdk + cc.libgraal + bench.scala_dacapo + {unicorn_pull_request_benchmarking:: 'libgraal'},
14+
c.weekly + hw.e3 + jdk + cc.libgraal + bench.scala_dacapo_size_variants,
15+
c.weekly + hw.e3 + jdk + cc.libgraal + bench.scala_dacapo_timing,
16+
c.daily + c.opt_post_merge + hw.e3 + jdk + cc.libgraal + bench.renaissance + {unicorn_pull_request_benchmarking:: 'libgraal'},
17+
c.daily + c.opt_post_merge + hw.e3 + jdk + cc.libgraal + bench.specjvm2008 + {unicorn_pull_request_benchmarking:: 'libgraal'},
18+
c.weekly + hw.e3 + jdk + cc.libgraal + bench.specjbb2015,
19+
c.weekly + hw.e3 + jdk + cc.libgraal + bench.specjbb2015_full_machine,
20+
c.weekly + hw.e3 + jdk + cc.libgraal + bench.renaissance_0_11,
21+
c.daily + c.opt_post_merge + hw.e3 + jdk + cc.libgraal + bench.awfy + {unicorn_pull_request_benchmarking:: 'libgraal'},
22+
c.daily + hw.e3 + jdk + cc.libgraal + bench.microservice_benchmarks,
23+
c.daily + hw.e3 + jdk + cc.libgraal + bench.renaissance_legacy,
24+
c.daily + hw.e3 + jdk + cc.libgraal + bench.micros_graal_whitebox,
25+
c.daily + hw.e3 + jdk + cc.libgraal + bench.micros_graal_dist,
26+
c.daily + hw.e3 + jdk + cc.libgraal + bench.micros_misc_graal_dist,
27+
c.daily + hw.e3 + jdk + cc.libgraal + bench.micros_shootout_graal_dist,
2828
]
2929
for jdk in cc.bench_jdks
3030
]),
3131

3232
local profiling_builds = std.flattenArrays([
3333
[
34-
c.weekly + hw.x52 + jdk + cc.libgraal + suite + cc.enable_profiling + { job_prefix:: "bench-compiler-profiling" },
35-
c.weekly + hw.x52 + jdk + cc.libgraal + suite + cc.footprint_tracking + { job_prefix:: "bench-compiler-footprint" }
34+
c.monthly + hw.e3 + jdk + cc.libgraal + suite + cc.enable_profiling + { job_prefix:: "bench-compiler-profiling" },
35+
c.monthly + hw.e3 + jdk + cc.libgraal + suite + cc.footprint_tracking + { job_prefix:: "bench-compiler-footprint" }
3636
]
3737
for jdk in cc.bench_jdks
3838
for suite in bench.groups.profiled_suites
3939
]),
4040

4141
local weekly_amd64_forks_builds = std.flattenArrays([
42-
bc.generate_fork_builds(c.weekly + hw.x52 + jdk + cc.libgraal + suite, subdir='compiler') +
43-
bc.generate_fork_builds(c.monthly + hw.x52 + jdk + cc.jargraal + suite, subdir='compiler')
42+
bc.generate_fork_builds(c.weekly + hw.e3 + jdk + cc.libgraal + suite, subdir='compiler') +
43+
bc.generate_fork_builds(c.monthly + hw.e3 + jdk + cc.jargraal + suite, subdir='compiler')
4444
for jdk in cc.bench_jdks
4545
for suite in bench.groups.weekly_forks_suites
4646
]),
@@ -63,7 +63,7 @@
6363
],
6464

6565
local zgc_builds = [
66-
c.weekly + hw.x52 + jdk + cc.libgraal + cc.zgc_mode + suite,
66+
c.weekly + hw.e3 + jdk + cc.libgraal + cc.zgc_mode + suite,
6767
for jdk in cc.bench_jdks
6868
for suite in bench.groups.main_suites + [bench.specjbb2015]
6969
],
@@ -76,13 +76,13 @@
7676
],
7777

7878
local no_tiered_builds = [
79-
c.weekly + hw.x52 + jdk + cc.libgraal + cc.no_tiered_comp + suite,
79+
c.monthly + hw.e3 + jdk + cc.libgraal + cc.no_tiered_comp + suite,
8080
for jdk in cc.bench_jdks
8181
for suite in bench.groups.main_suites
8282
],
8383

8484
local no_profile_info_builds = [
85-
c.weekly + hw.x52 + jdk + cc.libgraal + cc.no_profile_info + suite,
85+
c.monthly + hw.e3 + jdk + cc.libgraal + cc.no_profile_info + suite,
8686
for jdk in cc.bench_jdks
8787
for suite in bench.groups.main_suites
8888
],

compiler/ci/ci_common/benchmark-suites.libsonnet

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
// suite definitions
2828
// *****************
29-
awfy: cc.compiler_benchmark + c.heap.small + {
29+
awfy: cc.compiler_benchmark + c.heap.small + bc.bench_max_threads + {
3030
suite:: "awfy",
3131
run+: [
3232
self.benchmark_cmd + ["awfy:*", "--"] + self.extra_vm_args
@@ -38,7 +38,7 @@
3838
max_jdk_version:: null
3939
},
4040

41-
dacapo: cc.compiler_benchmark + c.heap.default + {
41+
dacapo: cc.compiler_benchmark + c.heap.default + bc.bench_max_threads + {
4242
suite:: "dacapo",
4343
run+: [
4444
self.benchmark_cmd + ["dacapo:*", "--"] + self.extra_vm_args
@@ -50,7 +50,7 @@
5050
max_jdk_version:: null
5151
},
5252

53-
dacapo_size_variants: cc.compiler_benchmark + c.heap.default + {
53+
dacapo_size_variants: cc.compiler_benchmark + c.heap.default + bc.bench_max_threads + {
5454
suite:: "dacapo-size-variants",
5555
run+: [
5656
self.benchmark_cmd + ["dacapo-small:*", "--"] + self.extra_vm_args,
@@ -76,7 +76,7 @@
7676
max_jdk_version:: null
7777
},
7878

79-
scala_dacapo: cc.compiler_benchmark + c.heap.default + {
79+
scala_dacapo: cc.compiler_benchmark + c.heap.default + bc.bench_max_threads + {
8080
suite:: "scala-dacapo",
8181
run+: [
8282
self.benchmark_cmd + ["scala-dacapo:*", "--"] + self.extra_vm_args
@@ -88,7 +88,7 @@
8888
max_jdk_version:: null
8989
},
9090

91-
scala_dacapo_size_variants: cc.compiler_benchmark + c.heap.default + {
91+
scala_dacapo_size_variants: cc.compiler_benchmark + c.heap.default + bc.bench_max_threads + {
9292
suite:: "scala-dacapo-size-variants",
9393
run+: [
9494
self.benchmark_cmd + ["scala-dacapo-tiny:*", "--"] + self.extra_vm_args,
@@ -119,7 +119,7 @@
119119
max_jdk_version:: null
120120
},
121121

122-
renaissance_template(suite_version=null, suite_name="renaissance", max_jdk_version=null):: cc.compiler_benchmark + c.heap.default + {
122+
renaissance_template(suite_version=null, suite_name="renaissance", max_jdk_version=null):: cc.compiler_benchmark + c.heap.default + bc.bench_max_threads + {
123123
suite:: suite_name,
124124
local suite_version_args = if suite_version != null then ["--bench-suite-version=" + suite_version] else [],
125125
run+: [
@@ -208,7 +208,7 @@
208208
},
209209

210210
// Microservice benchmarks
211-
microservice_benchmarks: cc.compiler_benchmark + {
211+
microservice_benchmarks: cc.compiler_benchmark + bc.bench_no_thread_cap + { # no thread cap here since hwloc is handled at the mx level for microservices
212212
suite:: "microservices",
213213
packages+: {
214214
"pip:psutil": "==5.8.0"
@@ -221,16 +221,8 @@
221221
local hwlocBind_16C_32T = ["--hwloc-bind=--cpubind node:0.core:0-15.pu:0-1 --membind node:0"],
222222
run+: [
223223
# shopcart-wrk
224-
self.benchmark_cmd + ["shopcart-wrk:mixed-tiny"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms32m", "-Xmx112m", "-XX:ActiveProcessorCount=1", "-XX:MaxDirectMemorySize=256m"],
225-
bench_upload,
226-
self.benchmark_cmd + ["shopcart-wrk:mixed-small"] + hwlocBind_2C_2T + ["--"] + self.extra_vm_args + ["-Xms64m", "-Xmx224m", "-XX:ActiveProcessorCount=2", "-XX:MaxDirectMemorySize=512m"],
227-
bench_upload,
228-
self.benchmark_cmd + ["shopcart-wrk:mixed-medium"] + hwlocBind_4C_4T + ["--"] + self.extra_vm_args + ["-Xms128m", "-Xmx512m", "-XX:ActiveProcessorCount=4", "-XX:MaxDirectMemorySize=1024m"],
229-
bench_upload,
230224
self.benchmark_cmd + ["shopcart-wrk:mixed-large"] + hwlocBind_16C_16T + ["--"] + self.extra_vm_args + ["-Xms512m", "-Xmx3072m", "-XX:ActiveProcessorCount=16", "-XX:MaxDirectMemorySize=4096m"],
231225
bench_upload,
232-
self.benchmark_cmd + ["shopcart-wrk:mixed-huge"] + hwlocBind_16C_32T + ["--"] + self.extra_vm_args + ["-Xms1024m", "-Xmx8192m", "-XX:ActiveProcessorCount=32", "-XX:MaxDirectMemorySize=8192m"],
233-
bench_upload,
234226

235227
# tika-wrk odt
236228
self.benchmark_cmd + ["tika-wrk:odt-tiny"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms32m", "-Xmx150m", "-XX:ActiveProcessorCount=1"],
@@ -249,16 +241,8 @@
249241
bench_upload,
250242

251243
# petclinic-wrk
252-
self.benchmark_cmd + ["petclinic-wrk:mixed-tiny"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms32m", "-Xmx100m", "-XX:ActiveProcessorCount=1"],
253-
bench_upload,
254-
self.benchmark_cmd + ["petclinic-wrk:mixed-small"] + hwlocBind_2C_2T + ["--"] + self.extra_vm_args + ["-Xms40m", "-Xmx144m", "-XX:ActiveProcessorCount=2"],
255-
bench_upload,
256-
self.benchmark_cmd + ["petclinic-wrk:mixed-medium"] + hwlocBind_4C_4T + ["--"] + self.extra_vm_args + ["-Xms80m", "-Xmx256m", "-XX:ActiveProcessorCount=4"],
257-
bench_upload,
258244
self.benchmark_cmd + ["petclinic-wrk:mixed-large"] + hwlocBind_16C_16T + ["--"] + self.extra_vm_args + ["-Xms320m", "-Xmx1280m", "-XX:ActiveProcessorCount=16"],
259245
bench_upload,
260-
self.benchmark_cmd + ["petclinic-wrk:mixed-huge"] + hwlocBind_16C_32T + ["--"] + self.extra_vm_args + ["-Xms640m", "-Xmx3072m", "-XX:ActiveProcessorCount=32"],
261-
bench_upload,
262246

263247
# helloworld-wrk
264248
self.benchmark_cmd + ["micronaut-helloworld-wrk:helloworld"] + hwlocBind_1C_1T + ["--"] + self.extra_vm_args + ["-Xms8m", "-Xmx64m", "-XX:ActiveProcessorCount=1", "-XX:MaxDirectMemorySize=256m"],
@@ -275,7 +259,7 @@
275259
},
276260

277261
// JMH microbenchmarks
278-
micros_graal_whitebox: cc.compiler_benchmark + c.heap.default + {
262+
micros_graal_whitebox: cc.compiler_benchmark + c.heap.default + bc.bench_max_threads + {
279263
suite:: "micros-graal-whitebox",
280264
run+: [
281265
self.benchmark_cmd + ["jmh-whitebox:*", "--"] + self.extra_vm_args
@@ -285,7 +269,7 @@
285269
max_jdk_version:: null
286270
},
287271

288-
micros_graal_dist: cc.compiler_benchmark + c.heap.default + {
272+
micros_graal_dist: cc.compiler_benchmark + c.heap.default + bc.bench_max_threads + {
289273
suite:: "micros-graal-dist",
290274
run+: [
291275
self.benchmark_cmd + ["jmh-dist:GRAAL_COMPILER_MICRO_BENCHMARKS", "--"] + self.extra_vm_args
@@ -295,7 +279,7 @@
295279
max_jdk_version:: null
296280
},
297281

298-
micros_misc_graal_dist: cc.compiler_benchmark + c.heap.default + {
282+
micros_misc_graal_dist: cc.compiler_benchmark + c.heap.default + bc.bench_max_threads + {
299283
suite:: "micros-misc-graal-dist",
300284
run+: [
301285
self.benchmark_cmd + ["jmh-dist:GRAAL_BENCH_MISC", "--"] + self.extra_vm_args
@@ -305,7 +289,7 @@
305289
max_jdk_version:: null
306290
},
307291

308-
micros_shootout_graal_dist: cc.compiler_benchmark + c.heap.default {
292+
micros_shootout_graal_dist: cc.compiler_benchmark + c.heap.default + bc.bench_max_threads + {
309293
suite:: "micros-shootout-graal-dist",
310294
run+: [
311295
self.benchmark_cmd + ["jmh-dist:GRAAL_BENCH_SHOOTOUT", "--"] + self.extra_vm_args

compiler/ci/ci_common/compiler-common.libsonnet

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
"${BENCH_RESULTS_FILE_PATH}",
6767
"--machine-name=${MACHINE_NAME}"] +
6868
(if std.objectHasAll(self.environment, 'MX_TRACKER') then ["--tracker=" + self.environment['MX_TRACKER']] else ["--tracker=rss"]),
69-
benchmark_cmd:: bench_common.hwlocIfNuma(self.should_use_hwloc, self.plain_benchmark_cmd, node=self.default_numa_node),
69+
restrict_threads:: null, # can be overridden to restrict the benchmark to the given number of threads. If null, will use one full NUMA node
70+
benchmark_cmd:: if self.should_use_hwloc then bench_common.hwloc_cmd(self.plain_benchmark_cmd, self.restrict_threads, self.default_numa_node, self.hyperthreading, self.threads_per_node) else self.plain_benchmark_cmd,
7071
min_heap_size:: if std.objectHasAll(self.environment, 'XMS') then ["-Xms${XMS}"] else [],
7172
max_heap_size:: if std.objectHasAll(self.environment, 'XMX') then ["-Xmx${XMX}"] else [],
7273
_WarnMissingIntrinsic:: true, # won't be needed after GR-34642

0 commit comments

Comments
 (0)