Skip to content

Commit d27c09b

Browse files
authored
Add canary for openjdk regression test (#47)
The canary will be run alongside the newest revision in regression test to identify unnoticed environment changes. Related PR: mmtk/mmtk-core#1209
1 parent b0b2c58 commit d27c09b

5 files changed

+40
-10
lines changed

configs/openjdk-plot.yml

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ plans:
1414
baseline: ['jdk-g1', 'jdk-zgc']
1515
- plan: marksweep
1616
baseline: ['jdk-g1', 'jdk-zgc']
17+
# "canary" is not a real plan. It is for the canary build.
18+
# We add it here to make history_report.py recognize its result
19+
# and plot it in a separate block in parallel to other real plans in OpenJDK.
20+
- plan: canary
21+
baseline: ['jdk-g1', 'jdk-zgc']
1722
notes:
1823
- date: "20230116"
1924
time: "0000"

configs/running-openjdk-base.yml

+4
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,7 @@ runtimes:
9797
type: OpenJDK
9898
release: 11
9999
home: "./build/jdk-mmtk-branch/images/jdk"
100+
jdk-mmtk-canary:
101+
type: OpenJDK
102+
release: 11
103+
home: "./build/jdk-mmtk-canary/images/jdk"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
includes:
2+
- "./running-openjdk-base.yml"
3+
4+
configs:
5+
# Run GenImmix using the canary version.
6+
- "jdk-mmtk-canary|genimmix|common_mmtk"

scripts/history_report.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
prefix = config['name']
2828

29-
# all subfolders are plan names
29+
# all subfolders are plan names, or "canary" for the canary version
3030
plans = os.listdir(result_repo_vm_root)
3131

3232
# check from date and to date

scripts/openjdk-history-run.sh

+24-9
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,41 @@ set -ex
33
# include common.sh
44
. $(dirname "$0")/common.sh
55

6-
openjdk_binding=$(realpath $1)
7-
output_dir=$(realpath -m $2)
8-
openjdk_rev=$(git -C $openjdk_binding rev-parse HEAD)
6+
openjdk_binding_latest=$(realpath $1)
7+
openjdk_binding_canary=$(realpath $2)
8+
output_dir=$(realpath -m $3)
9+
# openjdk_rev is used for the commit message. We use the revision ID of the latest version.
10+
openjdk_rev=$(git -C $openjdk_binding_latest rev-parse HEAD)
911

1012
# OpenJDK root
11-
openjdk=$openjdk_binding/repos/openjdk
13+
openjdk=$openjdk_binding_latest/repos/openjdk
1214

1315
ensure_empty_dir $kit_build
1416
ensure_empty_dir $kit_upload
1517
ensure_empty_dir $log_dir
1618
checkout_result_repo
1719

1820
# Build
19-
build_openjdk_with_mmtk $openjdk_binding release jdk-mmtk
21+
build_openjdk_with_mmtk $openjdk_binding_latest release jdk-mmtk
22+
build_openjdk_with_mmtk $openjdk_binding_canary release jdk-mmtk-canary
2023

2124
run_exp() {
22-
plan=$1
25+
dir_name=$1
2326
config=$2
2427
heap_modifier=$3
28+
invocations=$history_invocations
29+
30+
# Use this when testing the scripts so that tests run faster, albeit producing less accurate results.
31+
if [ "$OPENJDK_HISTORY_RUN_TEST_FAST" = "1" ]; then
32+
invocations=1
33+
fi
2534

2635
# Run
27-
run_id=$(run_benchmarks $log_dir $kit_root/configs/$config $heap_modifier $history_invocations)
36+
run_id=$(run_benchmarks $log_dir $kit_root/configs/$config $heap_modifier $invocations)
2837
# Save result
29-
mkdir -p $result_repo_dir/openjdk/$plan
30-
cp -r $log_dir/$run_id $result_repo_dir/openjdk/$plan
38+
RESULT_DIR=$result_repo_dir/openjdk/$dir_name
39+
mkdir -p $RESULT_DIR
40+
cp -r $log_dir/$run_id $RESULT_DIR
3141
}
3242

3343
# Build
@@ -54,6 +64,11 @@ run_exp stickyimmix running-openjdk-stickyimmix-complete.yml 6
5464
# MarkSweep
5565
run_exp marksweep running-openjdk-marksweep-complete.yml 6
5666

67+
# GenImmix using the canary version.
68+
# If the performance of the canary version changed,
69+
# it means there is an environment change that impacts the performance.
70+
run_exp canary running-openjdk-canary-complete.yml 6
71+
5772
# Commit result
5873
commit_result_repo 'OpenJDK Binding: '$openjdk_rev
5974

0 commit comments

Comments
 (0)