Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add canary for openjdk regression test #47

Merged
merged 3 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions configs/openjdk-plot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ plans:
baseline: ['jdk-g1', 'jdk-zgc']
- plan: marksweep
baseline: ['jdk-g1', 'jdk-zgc']
# "canary" is not a real plan. It is for the canary build.
# We add it here to make history_report.py recognize its result
# and plot it in a separate block in parallel to other real plans in OpenJDK.
- plan: canary
baseline: ['jdk-g1', 'jdk-zgc']
notes:
- date: "20230116"
time: "0000"
Expand Down
4 changes: 4 additions & 0 deletions configs/running-openjdk-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,7 @@ runtimes:
type: OpenJDK
release: 11
home: "./build/jdk-mmtk-branch/images/jdk"
jdk-mmtk-canary:
type: OpenJDK
release: 11
home: "./build/jdk-mmtk-canary/images/jdk"
6 changes: 6 additions & 0 deletions configs/running-openjdk-canary-complete.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
includes:
- "./running-openjdk-base.yml"

configs:
# Run GenImmix using the canary version.
- "jdk-mmtk-canary|genimmix|common_mmtk"
2 changes: 1 addition & 1 deletion scripts/history_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

prefix = config['name']

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

# check from date and to date
Expand Down
33 changes: 24 additions & 9 deletions scripts/openjdk-history-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,41 @@ set -ex
# include common.sh
. $(dirname "$0")/common.sh

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

# OpenJDK root
openjdk=$openjdk_binding/repos/openjdk
openjdk=$openjdk_binding_latest/repos/openjdk

ensure_empty_dir $kit_build
ensure_empty_dir $kit_upload
ensure_empty_dir $log_dir
checkout_result_repo

# Build
build_openjdk_with_mmtk $openjdk_binding release jdk-mmtk
build_openjdk_with_mmtk $openjdk_binding_latest release jdk-mmtk
build_openjdk_with_mmtk $openjdk_binding_canary release jdk-mmtk-canary

run_exp() {
plan=$1
dir_name=$1
config=$2
heap_modifier=$3
invocations=$history_invocations

# Use this when testing the scripts so that tests run faster, albeit producing less accurate results.
if [ "$OPENJDK_HISTORY_RUN_TEST_FAST" = "1" ]; then
invocations=1
fi

# Run
run_id=$(run_benchmarks $log_dir $kit_root/configs/$config $heap_modifier $history_invocations)
run_id=$(run_benchmarks $log_dir $kit_root/configs/$config $heap_modifier $invocations)
# Save result
mkdir -p $result_repo_dir/openjdk/$plan
cp -r $log_dir/$run_id $result_repo_dir/openjdk/$plan
RESULT_DIR=$result_repo_dir/openjdk/$dir_name
mkdir -p $RESULT_DIR
cp -r $log_dir/$run_id $RESULT_DIR
}

# Build
Expand All @@ -54,6 +64,11 @@ run_exp stickyimmix running-openjdk-stickyimmix-complete.yml 6
# MarkSweep
run_exp marksweep running-openjdk-marksweep-complete.yml 6

# GenImmix using the canary version.
# If the performance of the canary version changed,
# it means there is an environment change that impacts the performance.
run_exp canary running-openjdk-canary-complete.yml 6

# Commit result
commit_result_repo 'OpenJDK Binding: '$openjdk_rev

Expand Down