Skip to content

Commit

Permalink
Improve jsonnet abstractions in benchmark command generation
Browse files Browse the repository at this point in the history
  • Loading branch information
farquet committed Jun 8, 2021
1 parent 79d9269 commit b0c1ad0
Show file tree
Hide file tree
Showing 7 changed files with 170 additions and 243 deletions.
11 changes: 11 additions & 0 deletions common-utils.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,15 @@
),
# exported name
composable(o) :: _composable(o),

# prefixes the given number with 'jdk'
prefixed_jdk(jdk_version)::
if jdk_version == null || std.length(std.toString(jdk_version)) == 0 then
null
else
"jdk" + std.toString(jdk_version),

# generate a string of hyphen-separated items from the given list, skipping null values
hyphenize(a_list)::
std.join("-", std.filterMap(function(el) el != null, function(el) std.toString(el), a_list))
}
61 changes: 16 additions & 45 deletions common.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,25 @@
jdt:: downloads.jdt,

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

// Job frequencies
// ***************
on_demand:: {
targets+: [],
},
post_merge:: {
targets+: ["post-merge"],
},
daily:: {
targets+: ["daily"],
},
weekly:: {
targets+: ["weekly"],
},

// Heap settings
// *************
local small_heap = "1G",
Expand Down Expand Up @@ -127,48 +142,4 @@
"darwin-amd64":: self.darwin + self.amd64,
"windows-amd64":: self.windows + self.amd64,
"linux-aarch64":: self.linux + self.aarch64,

// Benchmarking building blocks
// ****************************
bench_hw:: {
_bench_machine:: {
targets+: ["bench"],
machine_name:: error "machine_name must be set!",
local _machine_name = self.machine_name,
capabilities+: [_machine_name],
environment+: { "MACHINE_NAME": _machine_name },
numa_nodes:: [],
is_numa:: std.length(self.numa_nodes) > 0,
},

x52:: $.linux + $.amd64 + self._bench_machine + {
machine_name:: "x52",
capabilities+: ["no_frequency_scaling", "tmpfs25g"],
numa_nodes:: [0, 1]
},
xgene3:: $.linux + $.aarch64 + self._bench_machine + {
machine_name:: "xgene3",
capabilities+: [],
},
a12c:: $.linux + $.aarch64 + self._bench_machine + {
machine_name:: "a12c",
capabilities+: ["no_frequency_scaling", "tmpfs25g"],
numa_nodes:: [0, 1]
}
},

hwlocIfNuma(numa, cmd, node=0)::
if numa then
["hwloc-bind", "--cpubind", "node:"+node, "--membind", "node:"+node, "--"] + cmd
else
cmd,

parallelHwloc(cmd_node0, cmd_node1)::
// Returns a list of commands that will run cmd_nod0 on NUMA node 0
// concurrently with cmd_node1 on NUMA node 1 and then wait for both to complete.
[
$.hwlocIfNuma(true, cmd_node0, node=0) + ["&"],
$.hwlocIfNuma(true, cmd_node1, node=1) + ["&"],
["wait"]
]
}
147 changes: 74 additions & 73 deletions compiler/ci_common/benchmark-builders.jsonnet
Original file line number Diff line number Diff line change
@@ -1,84 +1,85 @@
{
local c = (import '../../common.jsonnet'),
local bc = (import '../../bench-common.libsonnet'),
local cc = (import 'compiler-common.libsonnet'),
local bench = (import 'benchmark-suites.libsonnet'),
local hw = c.bench_hw,
local hw = bc.bench_hw,

local jdk8 = c.oraclejdk8,
local jdk11 = c.labsjdk11,

local main_builds = [
cc.post_merge + hw.x52 + jdk8 + cc.libgraal + bench.dacapo,
cc.daily + hw.x52 + jdk8 + cc.jargraal + bench.dacapo,
cc.weekly + hw.x52 + jdk8 + cc.libgraal + bench.dacapo_timing,
cc.weekly + hw.x52 + jdk8 + cc.jargraal + bench.dacapo_timing,
cc.post_merge + hw.x52 + jdk8 + cc.libgraal + bench.scala_dacapo,
cc.daily + hw.x52 + jdk8 + cc.jargraal + bench.scala_dacapo,
cc.weekly + hw.x52 + jdk8 + cc.libgraal + bench.scala_dacapo_timing,
cc.weekly + hw.x52 + jdk8 + cc.jargraal + bench.scala_dacapo_timing,
cc.post_merge + hw.x52 + jdk8 + cc.libgraal + bench.renaissance,
cc.daily + hw.x52 + jdk8 + cc.jargraal + bench.renaissance,
cc.daily + hw.x52 + jdk8 + cc.libgraal + bench.specjvm2008,
cc.daily + hw.x52 + jdk8 + cc.jargraal + bench.specjvm2008,
cc.daily + hw.x52 + jdk8 + cc.libgraal + bench.specjbb2005,
cc.daily + hw.x52 + jdk8 + cc.jargraal + bench.specjbb2005,
cc.daily + hw.x52 + jdk8 + cc.libgraal + bench.specjbb2015,
cc.daily + hw.x52 + jdk8 + cc.jargraal + bench.specjbb2015,
cc.weekly + hw.x52 + jdk8 + cc.libgraal + bench.specjbb2015_full_machine,
cc.on_demand + hw.x52 + jdk8 + cc.jargraal + bench.specjbb2015_full_machine,
cc.weekly + hw.x52 + jdk8 + cc.libgraal + bench.renaissance_0_10,
cc.on_demand + hw.x52 + jdk8 + cc.jargraal + bench.renaissance_0_10,
cc.daily + hw.x52 + jdk8 + cc.libgraal + bench.awfy,
cc.daily + hw.x52 + jdk8 + cc.jargraal + bench.awfy,
cc.post_merge + hw.x52 + jdk8 + cc.libgraal + bench.renaissance_legacy,
cc.daily + hw.x52 + jdk8 + cc.jargraal + bench.renaissance_legacy,
cc.daily + hw.x52 + jdk8 + cc.libgraal + bench.micros_graal_whitebox,
cc.weekly + hw.x52 + jdk8 + cc.jargraal + bench.micros_graal_whitebox,
cc.daily + hw.x52 + jdk8 + cc.libgraal + bench.micros_graal_dist,
cc.weekly + hw.x52 + jdk8 + cc.jargraal + bench.micros_graal_dist,
cc.daily + hw.x52 + jdk8 + cc.libgraal + bench.micros_misc_graal_dist,
cc.weekly + hw.x52 + jdk8 + cc.jargraal + bench.micros_misc_graal_dist,
cc.daily + hw.x52 + jdk8 + cc.libgraal + bench.micros_shootout_graal_dist,
cc.weekly + hw.x52 + jdk8 + cc.jargraal + bench.micros_shootout_graal_dist,
cc.daily + hw.x52 + jdk11 + cc.libgraal + bench.dacapo,
cc.daily + hw.x52 + jdk11 + cc.jargraal + bench.dacapo,
cc.weekly + hw.x52 + jdk11 + cc.libgraal + bench.dacapo_timing,
cc.weekly + hw.x52 + jdk11 + cc.jargraal + bench.dacapo_timing,
cc.daily + hw.x52 + jdk11 + cc.libgraal + bench.scala_dacapo,
cc.daily + hw.x52 + jdk11 + cc.jargraal + bench.scala_dacapo,
cc.weekly + hw.x52 + jdk11 + cc.libgraal + bench.scala_dacapo_timing,
cc.weekly + hw.x52 + jdk11 + cc.jargraal + bench.scala_dacapo_timing,
cc.post_merge + hw.x52 + jdk11 + cc.libgraal + bench.renaissance,
cc.daily + hw.x52 + jdk11 + cc.jargraal + bench.renaissance,
cc.post_merge + hw.x52 + jdk11 + cc.libgraal + bench.specjvm2008,
cc.daily + hw.x52 + jdk11 + cc.jargraal + bench.specjvm2008,
cc.daily + hw.x52 + jdk11 + cc.libgraal + bench.specjbb2005,
cc.daily + hw.x52 + jdk11 + cc.jargraal + bench.specjbb2005,
cc.daily + hw.x52 + jdk11 + cc.libgraal + bench.specjbb2015,
cc.daily + hw.x52 + jdk11 + cc.jargraal + bench.specjbb2015,
cc.weekly + hw.x52 + jdk11 + cc.libgraal + bench.specjbb2015_full_machine,
cc.on_demand + hw.x52 + jdk11 + cc.jargraal + bench.specjbb2015_full_machine,
cc.weekly + hw.x52 + jdk11 + cc.libgraal + bench.renaissance_0_10,
cc.on_demand + hw.x52 + jdk11 + cc.jargraal + bench.renaissance_0_10,
cc.daily + hw.x52 + jdk11 + cc.libgraal + bench.awfy,
cc.daily + hw.x52 + jdk11 + cc.jargraal + bench.awfy,
cc.post_merge + hw.x52 + jdk11 + cc.libgraal + bench.renaissance_legacy,
cc.daily + hw.x52 + jdk11 + cc.jargraal + bench.renaissance_legacy,
cc.daily + hw.x52 + jdk11 + cc.libgraal + bench.micros_graal_whitebox,
cc.weekly + hw.x52 + jdk11 + cc.jargraal + bench.micros_graal_whitebox,
cc.daily + hw.x52 + jdk11 + cc.libgraal + bench.micros_graal_dist,
cc.weekly + hw.x52 + jdk11 + cc.jargraal + bench.micros_graal_dist,
cc.daily + hw.x52 + jdk11 + cc.libgraal + bench.micros_misc_graal_dist,
cc.weekly + hw.x52 + jdk11 + cc.jargraal + bench.micros_misc_graal_dist,
cc.daily + hw.x52 + jdk11 + cc.libgraal + bench.micros_shootout_graal_dist,
cc.weekly + hw.x52 + jdk11 + cc.jargraal + bench.micros_shootout_graal_dist,
c.post_merge + hw.x52 + jdk8 + cc.libgraal + bench.dacapo,
c.daily + hw.x52 + jdk8 + cc.jargraal + bench.dacapo,
c.weekly + hw.x52 + jdk8 + cc.libgraal + bench.dacapo_timing,
c.weekly + hw.x52 + jdk8 + cc.jargraal + bench.dacapo_timing,
c.post_merge + hw.x52 + jdk8 + cc.libgraal + bench.scala_dacapo,
c.daily + hw.x52 + jdk8 + cc.jargraal + bench.scala_dacapo,
c.weekly + hw.x52 + jdk8 + cc.libgraal + bench.scala_dacapo_timing,
c.weekly + hw.x52 + jdk8 + cc.jargraal + bench.scala_dacapo_timing,
c.post_merge + hw.x52 + jdk8 + cc.libgraal + bench.renaissance,
c.daily + hw.x52 + jdk8 + cc.jargraal + bench.renaissance,
c.daily + hw.x52 + jdk8 + cc.libgraal + bench.specjvm2008,
c.daily + hw.x52 + jdk8 + cc.jargraal + bench.specjvm2008,
c.daily + hw.x52 + jdk8 + cc.libgraal + bench.specjbb2005,
c.daily + hw.x52 + jdk8 + cc.jargraal + bench.specjbb2005,
c.daily + hw.x52 + jdk8 + cc.libgraal + bench.specjbb2015,
c.daily + hw.x52 + jdk8 + cc.jargraal + bench.specjbb2015,
c.weekly + hw.x52 + jdk8 + cc.libgraal + bench.specjbb2015_full_machine,
c.on_demand + hw.x52 + jdk8 + cc.jargraal + bench.specjbb2015_full_machine,
c.weekly + hw.x52 + jdk8 + cc.libgraal + bench.renaissance_0_10,
c.on_demand + hw.x52 + jdk8 + cc.jargraal + bench.renaissance_0_10,
c.daily + hw.x52 + jdk8 + cc.libgraal + bench.awfy,
c.daily + hw.x52 + jdk8 + cc.jargraal + bench.awfy,
c.post_merge + hw.x52 + jdk8 + cc.libgraal + bench.renaissance_legacy,
c.daily + hw.x52 + jdk8 + cc.jargraal + bench.renaissance_legacy,
c.daily + hw.x52 + jdk8 + cc.libgraal + bench.micros_graal_whitebox,
c.weekly + hw.x52 + jdk8 + cc.jargraal + bench.micros_graal_whitebox,
c.daily + hw.x52 + jdk8 + cc.libgraal + bench.micros_graal_dist,
c.weekly + hw.x52 + jdk8 + cc.jargraal + bench.micros_graal_dist,
c.daily + hw.x52 + jdk8 + cc.libgraal + bench.micros_misc_graal_dist,
c.weekly + hw.x52 + jdk8 + cc.jargraal + bench.micros_misc_graal_dist,
c.daily + hw.x52 + jdk8 + cc.libgraal + bench.micros_shootout_graal_dist,
c.weekly + hw.x52 + jdk8 + cc.jargraal + bench.micros_shootout_graal_dist,
c.daily + hw.x52 + jdk11 + cc.libgraal + bench.dacapo,
c.daily + hw.x52 + jdk11 + cc.jargraal + bench.dacapo,
c.weekly + hw.x52 + jdk11 + cc.libgraal + bench.dacapo_timing,
c.weekly + hw.x52 + jdk11 + cc.jargraal + bench.dacapo_timing,
c.daily + hw.x52 + jdk11 + cc.libgraal + bench.scala_dacapo,
c.daily + hw.x52 + jdk11 + cc.jargraal + bench.scala_dacapo,
c.weekly + hw.x52 + jdk11 + cc.libgraal + bench.scala_dacapo_timing,
c.weekly + hw.x52 + jdk11 + cc.jargraal + bench.scala_dacapo_timing,
c.post_merge + hw.x52 + jdk11 + cc.libgraal + bench.renaissance,
c.daily + hw.x52 + jdk11 + cc.jargraal + bench.renaissance,
c.post_merge + hw.x52 + jdk11 + cc.libgraal + bench.specjvm2008,
c.daily + hw.x52 + jdk11 + cc.jargraal + bench.specjvm2008,
c.daily + hw.x52 + jdk11 + cc.libgraal + bench.specjbb2005,
c.daily + hw.x52 + jdk11 + cc.jargraal + bench.specjbb2005,
c.daily + hw.x52 + jdk11 + cc.libgraal + bench.specjbb2015,
c.daily + hw.x52 + jdk11 + cc.jargraal + bench.specjbb2015,
c.weekly + hw.x52 + jdk11 + cc.libgraal + bench.specjbb2015_full_machine,
c.on_demand + hw.x52 + jdk11 + cc.jargraal + bench.specjbb2015_full_machine,
c.weekly + hw.x52 + jdk11 + cc.libgraal + bench.renaissance_0_10,
c.on_demand + hw.x52 + jdk11 + cc.jargraal + bench.renaissance_0_10,
c.daily + hw.x52 + jdk11 + cc.libgraal + bench.awfy,
c.daily + hw.x52 + jdk11 + cc.jargraal + bench.awfy,
c.post_merge + hw.x52 + jdk11 + cc.libgraal + bench.renaissance_legacy,
c.daily + hw.x52 + jdk11 + cc.jargraal + bench.renaissance_legacy,
c.daily + hw.x52 + jdk11 + cc.libgraal + bench.micros_graal_whitebox,
c.weekly + hw.x52 + jdk11 + cc.jargraal + bench.micros_graal_whitebox,
c.daily + hw.x52 + jdk11 + cc.libgraal + bench.micros_graal_dist,
c.weekly + hw.x52 + jdk11 + cc.jargraal + bench.micros_graal_dist,
c.daily + hw.x52 + jdk11 + cc.libgraal + bench.micros_misc_graal_dist,
c.weekly + hw.x52 + jdk11 + cc.jargraal + bench.micros_misc_graal_dist,
c.daily + hw.x52 + jdk11 + cc.libgraal + bench.micros_shootout_graal_dist,
c.weekly + hw.x52 + jdk11 + cc.jargraal + bench.micros_shootout_graal_dist,
],

// JFR and async-profiler jobs
local profiling_builds = std.flattenArrays([
[
cc.weekly + hw.x52 + jdk + cc.libgraal + cc.enable_profiling + suite + { job_prefix:: "bench-profiling" },
cc.weekly + hw.x52 + jdk + cc.jargraal + cc.enable_profiling + suite + { job_prefix:: "bench-profiling" }
c.weekly + hw.x52 + jdk + cc.libgraal + cc.enable_profiling + suite + { job_prefix:: "bench-profiling" },
c.weekly + hw.x52 + jdk + cc.jargraal + cc.enable_profiling + suite + { job_prefix:: "bench-profiling" }
]
for jdk in [jdk8, jdk11]
for suite in bench.groups.profiled_suites
Expand All @@ -87,8 +88,8 @@
// Microservices
local microservice_builds = std.flattenArrays([
[
cc.daily + hw.x52 + jdk + cc.libgraal + suite,
cc.daily + hw.x52 + jdk + cc.jargraal + suite
c.daily + hw.x52 + jdk + cc.libgraal + suite,
c.daily + hw.x52 + jdk + cc.jargraal + suite
]
for jdk in [jdk8, jdk11]
for suite in bench.groups.microservice_suites
Expand All @@ -97,17 +98,17 @@
// intensive weekly benchmarking
local weekly_forks_builds = std.flattenArrays([
std.flattenArrays([
cc.generate_fork_builds(cc.weekly + hw.x52 + jdk + cc.libgraal + suite),
cc.generate_fork_builds(cc.weekly + hw.x52 + jdk + cc.jargraal + suite)
cc.generate_fork_builds(c.weekly + hw.x52 + jdk + cc.libgraal + suite),
cc.generate_fork_builds(c.weekly + hw.x52 + jdk + cc.jargraal + suite)
])
for jdk in [jdk8, jdk11]
for suite in bench.groups.weekly_forks_suites
]),

local aarch64_builds = std.flattenArrays([
[
cc.weekly + hw.xgene3 + jdk11 + cc.libgraal + suite,
cc.weekly + hw.xgene3 + jdk11 + cc.jargraal + suite
c.weekly + hw.xgene3 + jdk11 + cc.libgraal + suite,
c.weekly + hw.xgene3 + jdk11 + cc.jargraal + suite
]
for suite in bench.groups.main_suites
]),
Expand Down
Loading

0 comments on commit b0c1ad0

Please sign in to comment.