Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
1118f62
feat(wall): track all threads for unfiltered wall-clock precheck
kaahos Jul 19, 2026
40dbe8e
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Jul 20, 2026
d82291f
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Jul 21, 2026
ec76f58
fix: apply review suggestions
kaahos Jul 21, 2026
52def55
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Jul 21, 2026
9723a5a
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Jul 22, 2026
e6c6793
fix: apply review
kaahos Jul 23, 2026
51a9178
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Jul 24, 2026
9e3701e
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Jul 24, 2026
4954d49
test: scope precheck workloads to all threads
kaahos Jul 16, 2026
80f8049
fix: preserve JVMTI frames in overlapping buffers
kaahos Jul 16, 2026
31c5cfc
test: compare precheck counter delta
kaahos Jul 17, 2026
efb6648
fix: address sphinx review
kaahos Jul 19, 2026
22b8e00
fix(wall): register unfiltered threads from lifecycle callbacks
kaahos Jul 24, 2026
d124905
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Jul 31, 2026
82e05b6
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Aug 3, 2026
f5b81de
test: remove obsolete thread context reset
kaahos Aug 3, 2026
b397ac9
Merge remote-tracking branch 'origin/main' into paul.fournillon/wallc…
kaahos Aug 14, 2026
599c21e
fix(test): migrate UnfilteredWallPrecheckTest to jafar JFR API
kaahos Aug 16, 2026
a68d3f2
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Aug 17, 2026
391fdd2
fix: address some review comments
kaahos Aug 18, 2026
d6f5b1a
fix: address review comments
kaahos Aug 19, 2026
4d2c505
fix: avoid CAS on context-window enter/exit hot path
kaahos Aug 19, 2026
8ef675e
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Aug 19, 2026
172e453
fix: fix musl bug
kaahos Aug 19, 2026
1b94815
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Aug 20, 2026
26ae49b
fix: address some review comments
kaahos Aug 21, 2026
930f734
fix: restore <unloaded> label and self-skip force-failure test in non…
jbachorik Aug 25, 2026
772e5aa
fix: extract wallclock suppresion stuff from ThreadFilter into wallCl…
kaahos Sep 28, 2026
cd2ad5b
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Sep 28, 2026
c8701f7
fix: address glibc issue with random
kaahos Sep 28, 2026
30f63dc
fix: fix fuzz test
kaahos Sep 29, 2026
37af845
fix: fix mutex performance regressions
kaahos Sep 29, 2026
016e3f9
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Sep 29, 2026
dc9d91b
fix: guard attributionPC against null pc (UBSan)
jbachorik Sep 30, 2026
d6a04bf
fix: use CallTraceSet in fuzz_callTraceStorage processTraces lambda
jbachorik Sep 30, 2026
fbfa879
test: assert <unloaded> label on the dump that fired jmethodid_skippe…
jbachorik Sep 30, 2026
70a0cad
fix: changes to reduce memory footprint
kaahos Sep 30, 2026
b158ab9
fix: add chaos and fuzzing tests
kaahos Sep 30, 2026
9a18895
Merge branch 'fix/nightlies_sanitized' into paul.fournillon/wallclock…
kaahos Sep 30, 2026
d6f6e9c
fix: address nits
kaahos Oct 1, 2026
73b532d
fix: fix wrong comments
kaahos Oct 1, 2026
6ae8dda
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Oct 2, 2026
fa0e33d
fix: address review comments
kaahos Oct 8, 2026
b77821f
test: move flaky self-calibrating ThreadFilter perf tests to a benchmark
kaahos Oct 8, 2026
aef6d90
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Oct 9, 2026
b13fd76
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Oct 9, 2026
c433cb4
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Oct 12, 2026
5018858
fix: retain thread identities across recording restarts
kaahos Oct 20, 2026
7124b6c
fix: preserve wall-clock memory accounting across timer restarts
kaahos Oct 20, 2026
70230b4
perf: register unfiltered wall-clock threads lazily
kaahos Oct 20, 2026
926fd3a
fix: address TID bug
kaahos Oct 21, 2026
7928e27
fix: enforce weak tests and chaos tests
kaahos Oct 21, 2026
b1cda93
Merge branch 'main' into paul.fournillon/wallclock-all-threads
kaahos Oct 21, 2026
64e4f99
Merge main into wallclock-all-threads
kaahos Nov 11, 2026
f083608
Fix wall-clock precheck accounting and chaos agent loading (#983)
kaahos Nov 11, 2026
808698f
Fix wall-clock precheck weighting and context lifecycles
kaahos Nov 12, 2026
7e7732b
Make wall block tracking lazy and skip clean boundary resets
kaahos Nov 13, 2026
8ce583c
Bound wall precheck TID lookups to 256 probes
kaahos Nov 15, 2026
847d568
Validate pinned malloc import layouts before patching
kaahos Nov 16, 2026
dd1ca0e
fix(ci): select and verify the labeled integration JVM
kaahos Nov 16, 2026
281b5ae
fix: protect crash-handler bootstrap during thread teardown
kaahos Nov 17, 2026
ca50a03
test: skip crash-bootstrap mask-semantics tests under TSan
kaahos Nov 17, 2026
2701fa5
test: repair bounded GC generations test lifecycle
kaahos Nov 17, 2026
81493bc
fix: block profiling before publishing thread exit marks
kaahos Nov 17, 2026
5d19fd6
Mark unprovisionable musl/OpenJ9 combinations not applicable
kaahos Nov 18, 2026
5cfd570
test(ci): make the pipeline exclusion literal explicit
kaahos Nov 18, 2026
06e672f
fix(ci): pin Semeru release tags and archive names separately
kaahos Nov 18, 2026
d3b1171
fix(nativemem): reject samples on exit-marked threads
kaahos Nov 18, 2026
7abb2b5
fix(nativemem): validate import identity with live loader headers
kaahos Nov 18, 2026
bd58934
fix(nativemem): keep loader operations outside the patch mutex
kaahos Nov 18, 2026
514c0f9
perf(nativemem): decide sampling before the exit-registry lookup
kaahos Nov 19, 2026
1d53ad8
chore(stack): merge main into #663
kaahos Nov 19, 2026
11069d5
test(crash): cover the last probe position of the exit registry
kaahos Nov 19, 2026
790590a
docs(crash): count the identity syscall in crash-handler entry cost
kaahos Nov 19, 2026
a2c4a46
test(crash): isolate last-probe registry tests in forked children
kaahos Nov 19, 2026
8c951f0
fix(wall): account retained block-tracker backing in its own native-m…
kaahos Nov 19, 2026
4ecb575
test(wall): guard retained block-tracker memory across idle cycles
kaahos Nov 19, 2026
69bb65e
fix(test): clear trace context in test teardown instead of stopProfiler
kaahos Nov 20, 2026
b75a9fc
test(memleak): align generations test with recording-scoped liveness
kaahos Nov 20, 2026
5578def
chore(stack): merge main into #663
kaahos Nov 20, 2026
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
1 change: 1 addition & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ shell-unit-tests:
- bash .gitlab/scripts/tests/test_run_gtest_quarantine.sh
- bash .gitlab/jdk-integration/tests/select_test_jdk_test.sh
- bash .gitlab/dd-trace-integration/tests/post_pr_comment_test.sh
- python3 .gitlab/dd-trace-integration/tests/test_jvm_selection.py
- bash .gitlab/dd-trace-integration/tests/validate_quarantine_test.sh

# Shared version detection used by benchmarks and reliability pipelines
Expand Down
224 changes: 118 additions & 106 deletions .gitlab/dd-trace-integration/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2026, Datadog, Inc.

# dd-trace-java Integration Tests
# Tests the java-profiler ddprof-lib artifact with patched dd-java-agent

Expand Down Expand Up @@ -93,6 +95,9 @@ prepare-patched-agent:
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
# Not applicable: upstream OpenJ9 requires glibc and publishes no musl runtime.
- if: '$JVM_TYPE == "openj9" && $LIBC_VARIANT == "musl"'
when: never
- when: on_success
interruptible: true
timeout: 10m
Expand All @@ -110,125 +115,132 @@ prepare-patched-agent:
apk add --no-cache curl wget unzip bc bash ca-certificates
fi

JDK_INSTALLED=false
if command -v apt-get &> /dev/null; then
if apt-get install -y -qq openjdk-${JAVA_VERSION}-jdk 2>/dev/null || apt-get install -y -qq openjdk-${JAVA_VERSION}-jre-headless 2>/dev/null; then
JDK_INSTALLED=true
fi
elif command -v apk &> /dev/null; then
if [ "${JVM_TYPE}" = "openj9" ]; then
source .gitlab/dd-trace-integration/install-openj9.sh /opt/java
elif [ "${JVM_TYPE}" = "hotspot" ]; then
JDK_INSTALLED=false
fi

if [ "${JDK_INSTALLED}" = false ]; then
ARCH_NAME=$(uname -m)
case "${ARCH_NAME}" in
x86_64) JDK_ARCH="amd64" ;;
aarch64) JDK_ARCH="aarch64" ;;
*) echo "ERROR: Unsupported architecture: ${ARCH_NAME}"; exit 1 ;;
esac

if command -v apk &> /dev/null; then
JDK_LIBC="musl"
else
JDK_LIBC="glibc"
if command -v apt-get &> /dev/null; then
if apt-get install -y -qq openjdk-${JAVA_VERSION}-jdk 2>/dev/null || apt-get install -y -qq openjdk-${JAVA_VERSION}-jre-headless 2>/dev/null; then
JDK_INSTALLED=true
fi
elif command -v apk &> /dev/null; then
JDK_INSTALLED=false
fi

JDK_DIR="/opt/java/jdk-${JAVA_VERSION}"
mkdir -p /opt/java

if [ "${JDK_LIBC}" = "musl" ]; then
case "${JAVA_VERSION}" in
8) LIBERICA_VERSION="8u514+5" ;;
11) LIBERICA_VERSION="11.0.33+11" ;;
17) LIBERICA_VERSION="17.0.21+11" ;;
21) LIBERICA_VERSION="21.0.13+11" ;;
25) LIBERICA_VERSION="25.0.5+11" ;;
*) echo "ERROR: Unsupported JDK version: ${JAVA_VERSION}"; exit 1 ;;
esac
case "${JDK_ARCH}" in
amd64) LIBERICA_ARCH="x64" ;;
*) LIBERICA_ARCH="${JDK_ARCH}" ;;
if [ "${JDK_INSTALLED}" = false ]; then
ARCH_NAME=$(uname -m)
case "${ARCH_NAME}" in
x86_64) JDK_ARCH="amd64" ;;
aarch64) JDK_ARCH="aarch64" ;;
*) echo "ERROR: Unsupported architecture: ${ARCH_NAME}"; exit 1 ;;
esac
DOWNLOAD_URL="https://download.bell-sw.com/java/${LIBERICA_VERSION}/bellsoft-jdk${LIBERICA_VERSION}-linux-${LIBERICA_ARCH}-musl-lite.tar.gz"
else
case "${JDK_ARCH}" in
amd64) ADOPTIUM_ARCH="x64" ;;
*) ADOPTIUM_ARCH="${JDK_ARCH}" ;;
esac
DOWNLOAD_URL="https://api.adoptium.net/v3/binary/latest/${JAVA_VERSION}/ga/linux/${ADOPTIUM_ARCH}/jdk/hotspot/normal/eclipse"
fi

# A broken egress hop returns a short non-gzip body that fails tar inside
# `curl | tar` and is lost with the pipe. Download to a file, log curl's
# outcome, and dump the body on failure; a non-tar failure also traces the
# redirect chain once.
dump_jdk_body() {
ls -l "$1" || true
sha256sum "$1" || true
head -c 256 "$1" | od -c | head -20 || true
}
save_body() {
if [ "$(wc -c < "$1")" -le 1048576 ]; then
cp "$1" "$2" || true
if command -v apk &> /dev/null; then
JDK_LIBC="musl"
else
echo "failure body larger than 1MB, not saved"
JDK_LIBC="glibc"
fi
}

MAX_RETRIES=3
for attempt in $(seq 1 $MAX_RETRIES); do
JDK_TARBALL=$(mktemp /tmp/jdk-download.XXXXXXXX) || exit 1
CURL_STATUS=0
CURL_META=$(curl -Lk --retry 3 --retry-delay 5 -o "${JDK_TARBALL}" \
-w 'http_code=%{http_code} effective_url=%{url_effective} redirects=%{num_redirects} size=%{size_download}' \
"${DOWNLOAD_URL}") || CURL_STATUS=$?
echo "JDK download attempt ${attempt}/${MAX_RETRIES}: curl exit=${CURL_STATUS} ${CURL_META}"
# A 4xx is deterministic (e.g. a mistyped pin): dump the body and stop
# instead of burning the remaining retries on the same error.
HTTP_CODE=${CURL_META%% *}
HTTP_CODE=${HTTP_CODE#http_code=}
if [ "${HTTP_CODE:-0}" -ge 400 ] 2>/dev/null && [ "${HTTP_CODE:-0}" -lt 500 ]; then
echo "JDK download failed with HTTP ${HTTP_CODE}:"

JDK_DIR="/opt/java/jdk-${JAVA_VERSION}"
mkdir -p /opt/java

if [ "${JDK_LIBC}" = "musl" ]; then
case "${JAVA_VERSION}" in
8) LIBERICA_VERSION="8u514+5" ;;
11) LIBERICA_VERSION="11.0.33+11" ;;
17) LIBERICA_VERSION="17.0.21+11" ;;
21) LIBERICA_VERSION="21.0.13+11" ;;
25) LIBERICA_VERSION="25.0.5+11" ;;
*) echo "ERROR: Unsupported JDK version: ${JAVA_VERSION}"; exit 1 ;;
esac
case "${JDK_ARCH}" in
amd64) LIBERICA_ARCH="x64" ;;
*) LIBERICA_ARCH="${JDK_ARCH}" ;;
esac
DOWNLOAD_URL="https://download.bell-sw.com/java/${LIBERICA_VERSION}/bellsoft-jdk${LIBERICA_VERSION}-linux-${LIBERICA_ARCH}-musl-lite.tar.gz"
else
case "${JDK_ARCH}" in
amd64) ADOPTIUM_ARCH="x64" ;;
*) ADOPTIUM_ARCH="${JDK_ARCH}" ;;
esac
DOWNLOAD_URL="https://api.adoptium.net/v3/binary/latest/${JAVA_VERSION}/ga/linux/${ADOPTIUM_ARCH}/jdk/hotspot/normal/eclipse"
fi

# A broken egress hop returns a short non-gzip body that fails tar inside
# `curl | tar` and is lost with the pipe. Download to a file, log curl's
# outcome, and dump the body on failure; a non-tar failure also traces the
# redirect chain once.
dump_jdk_body() {
ls -l "$1" || true
sha256sum "$1" || true
head -c 256 "$1" | od -c | head -20 || true
}
save_body() {
if [ "$(wc -c < "$1")" -le 1048576 ]; then
cp "$1" "$2" || true
else
echo "failure body larger than 1MB, not saved"
fi
}

MAX_RETRIES=3
for attempt in $(seq 1 $MAX_RETRIES); do
JDK_TARBALL=$(mktemp /tmp/jdk-download.XXXXXXXX) || exit 1
CURL_STATUS=0
CURL_META=$(curl -Lk --retry 3 --retry-delay 5 -o "${JDK_TARBALL}" \
-w 'http_code=%{http_code} effective_url=%{url_effective} redirects=%{num_redirects} size=%{size_download}' \
"${DOWNLOAD_URL}") || CURL_STATUS=$?
echo "JDK download attempt ${attempt}/${MAX_RETRIES}: curl exit=${CURL_STATUS} ${CURL_META}"
# A 4xx is deterministic (e.g. a mistyped pin): dump the body and stop
# instead of burning the remaining retries on the same error.
HTTP_CODE=${CURL_META%% *}
HTTP_CODE=${HTTP_CODE#http_code=}
if [ "${HTTP_CODE:-0}" -ge 400 ] 2>/dev/null && [ "${HTTP_CODE:-0}" -lt 500 ]; then
echo "JDK download failed with HTTP ${HTTP_CODE}:"
dump_jdk_body "${JDK_TARBALL}"
save_body "${JDK_TARBALL}" /tmp/jdk-download-failed.bin
rm -f "${JDK_TARBALL}"
exit 1
fi
# Extract into a per-attempt staging dir: a failed tar must not leave a
# partial JDK tree that a later attempt would extract over. An empty
# extraction is a failed attempt, not a success.
STAGE_DIR=$(mktemp -d /opt/java/.jdk-stage.XXXXXXXX) || exit 1
if [ "${CURL_STATUS}" -eq 0 ] && tar xzf "${JDK_TARBALL}" -C "${STAGE_DIR}" && [ -n "$(ls -A "${STAGE_DIR}")" ]; then
mv "${STAGE_DIR}"/* /opt/java/
rm -rf "${STAGE_DIR}" "${JDK_TARBALL}"
break
fi
rm -rf "${STAGE_DIR}"
echo "JDK download attempt ${attempt} produced a non-tar or empty body:"
dump_jdk_body "${JDK_TARBALL}"
save_body "${JDK_TARBALL}" /tmp/jdk-download-failed.bin
save_body "${JDK_TARBALL}" "/tmp/jdk-download-failed-attempt${attempt}.bin"
if [ "$attempt" -eq 1 ]; then
echo "JDK download probe (${DOWNLOAD_URL}):"
curl -sIL --max-redirs 5 "${DOWNLOAD_URL}" 2>&1 | head -100 || true
fi
rm -f "${JDK_TARBALL}"
exit 1
fi
# Extract into a per-attempt staging dir: a failed tar must not leave a
# partial JDK tree that a later attempt would extract over. An empty
# extraction is a failed attempt, not a success.
STAGE_DIR=$(mktemp -d /opt/java/.jdk-stage.XXXXXXXX) || exit 1
if [ "${CURL_STATUS}" -eq 0 ] && tar xzf "${JDK_TARBALL}" -C "${STAGE_DIR}" && [ -n "$(ls -A "${STAGE_DIR}")" ]; then
mv "${STAGE_DIR}"/* /opt/java/
rm -rf "${STAGE_DIR}" "${JDK_TARBALL}"
break
fi
rm -rf "${STAGE_DIR}"
echo "JDK download attempt ${attempt} produced a non-tar or empty body:"
dump_jdk_body "${JDK_TARBALL}"
save_body "${JDK_TARBALL}" "/tmp/jdk-download-failed-attempt${attempt}.bin"
if [ "$attempt" -eq 1 ]; then
echo "JDK download probe (${DOWNLOAD_URL}):"
curl -sIL --max-redirs 5 "${DOWNLOAD_URL}" 2>&1 | head -100 || true
fi
rm -f "${JDK_TARBALL}"
[ $attempt -lt $MAX_RETRIES ] && sleep 10 || exit 1
done

EXTRACTED_DIR=$(find /opt/java -maxdepth 1 -type d \( -name "jdk-*" -o -name "jdk8u*" \) ! -name "jdk-${JAVA_VERSION}" | head -1)
[ -z "${EXTRACTED_DIR}" ] && exit 1
ln -sf "${EXTRACTED_DIR}" "${JDK_DIR}"
export JAVA_HOME="${JDK_DIR}"
[ $attempt -lt $MAX_RETRIES ] && sleep 10 || exit 1
done

EXTRACTED_DIR=$(find /opt/java -maxdepth 1 -type d \( -name "jdk-*" -o -name "jdk8u*" \) ! -name "jdk-${JAVA_VERSION}" | head -1)
[ -z "${EXTRACTED_DIR}" ] && exit 1
ln -sf "${EXTRACTED_DIR}" "${JDK_DIR}"
export JAVA_HOME="${JDK_DIR}"
else
export JAVA_HOME=$(find /usr/lib/jvm -name "java-${JAVA_VERSION}-*" -type d | head -1)
[ -z "${JAVA_HOME}" ] && export JAVA_HOME=$(find /usr/lib/jvm -name "openjdk-${JAVA_VERSION}" -type d | head -1)
[ -z "${JAVA_HOME}" ] && export JAVA_HOME=$(find /usr/lib/jvm -name "java-1.${JAVA_VERSION}*" -type d | head -1)
[ -z "${JAVA_HOME}" ] && export JAVA_HOME=$(find /usr/lib/jvm -maxdepth 1 -type d | grep -E "(jdk|java|openjdk)" | head -1)
[ -z "${JAVA_HOME}" ] && exit 1
fi
else
export JAVA_HOME=$(find /usr/lib/jvm -name "java-${JAVA_VERSION}-*" -type d | head -1)
[ -z "${JAVA_HOME}" ] && export JAVA_HOME=$(find /usr/lib/jvm -name "openjdk-${JAVA_VERSION}" -type d | head -1)
[ -z "${JAVA_HOME}" ] && export JAVA_HOME=$(find /usr/lib/jvm -name "java-1.${JAVA_VERSION}*" -type d | head -1)
[ -z "${JAVA_HOME}" ] && export JAVA_HOME=$(find /usr/lib/jvm -maxdepth 1 -type d | grep -E "(jdk|java|openjdk)" | head -1)
[ -z "${JAVA_HOME}" ] && exit 1
echo "ERROR: Unsupported JVM_TYPE: ${JVM_TYPE}"
exit 1
fi

echo "Using JAVA_HOME: ${JAVA_HOME}"
${JAVA_HOME}/bin/java -version
bash .gitlab/dd-trace-integration/verify-jvm.sh

.gitlab/dd-trace-integration/install-prerequisites.sh
.gitlab/dd-trace-integration/run-integration-test.sh
Expand Down
74 changes: 74 additions & 0 deletions .gitlab/dd-trace-integration/install-openj9.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/usr/bin/env bash
# Copyright 2026, Datadog, Inc.
# Source with an installation root to export the selected Semeru JAVA_HOME.
set -euo pipefail

if [ "${LIBC_VARIANT}" != glibc ]; then
echo "ERROR: OpenJ9 integration requires glibc; no OpenJ9 musl runtime is configured" >&2
exit 1
fi

case "${ARCH}" in
x64|arm64) ;;
*) echo "ERROR: Unsupported OpenJ9 architecture: ${ARCH}" >&2; exit 1 ;;
esac

case "${JAVA_VERSION}" in
8|11|17|21|25) ;;
*) echo "ERROR: Unsupported OpenJ9 JDK version: ${JAVA_VERSION}" >&2; exit 1 ;;
esac

# Tags and archive names are separate upstream identifiers, not a version template.
case "${JAVA_VERSION}-${ARCH}" in
8-x64)
SEMERU_TAG=jdk-8.0.512.0
Comment thread
kaahos marked this conversation as resolved.
Resolved
SEMERU_ARCHIVE=ibm-semeru-open-jdk_x64_linux_8.0.512.0.tar.gz
;;
8-arm64)
SEMERU_TAG=jdk-8.0.512.0
SEMERU_ARCHIVE=ibm-semeru-open-jdk_aarch64_linux_8.0.512.0.tar.gz
;;
11-x64)
SEMERU_TAG=jdk-11.0.33.0
SEMERU_ARCHIVE=ibm-semeru-open-jdk_x64_linux_11.0.33.0.tar.gz
;;
11-arm64)
SEMERU_TAG=jdk-11.0.33.0
SEMERU_ARCHIVE=ibm-semeru-open-jdk_aarch64_linux_11.0.33.0.tar.gz
;;
17-x64)
SEMERU_TAG=jdk-17.0.21.0
SEMERU_ARCHIVE=ibm-semeru-open-jdk_x64_linux_17.0.21.0.tar.gz
;;
17-arm64)
SEMERU_TAG=jdk-17.0.21.0
SEMERU_ARCHIVE=ibm-semeru-open-jdk_aarch64_linux_17.0.21.0.tar.gz
;;
21-x64)
SEMERU_TAG=jdk-21.0.13.0
SEMERU_ARCHIVE=ibm-semeru-open-jdk_x64_linux_21.0.13.0.tar.gz
;;
21-arm64)
SEMERU_TAG=jdk-21.0.13.0
SEMERU_ARCHIVE=ibm-semeru-open-jdk_aarch64_linux_21.0.13.0.tar.gz
;;
25-x64)
SEMERU_TAG=jdk-25.0.5.0
SEMERU_ARCHIVE=ibm-semeru-open-jdk_x64_linux_25.0.5.0.tar.gz
;;
25-arm64)
SEMERU_TAG=jdk-25.0.5.0
SEMERU_ARCHIVE=ibm-semeru-open-jdk_aarch64_linux_25.0.5.0.tar.gz
;;
esac

export JAVA_HOME="${1:?installation root required}/openj9-${JAVA_VERSION}"
DOWNLOAD_URL="https://github.com/ibmruntimes/semeru${JAVA_VERSION}-binaries/releases/download/${SEMERU_TAG}/${SEMERU_ARCHIVE}"
mkdir -p "${JAVA_HOME}"
curl --fail --location --retry 3 --retry-delay 5 "${DOWNLOAD_URL}" \
| tar xzf - -C "${JAVA_HOME}" --strip-components=1

if [ ! -x "${JAVA_HOME}/bin/java" ] || [ ! -x "${JAVA_HOME}/bin/javac" ]; then
echo "ERROR: Semeru archive does not contain an executable JDK at ${JAVA_HOME}" >&2
exit 1
fi
Loading
Loading