Skip to content

Commit d31d39f

Browse files
committed
Fix CI scripts for OpenJDK 21
1 parent 30f172f commit d31d39f

File tree

9 files changed

+31
-31
lines changed

9 files changed

+31
-31
lines changed

.github/scripts/ci-build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ build_target=$1
1313
# Build product bundle
1414
cd $OPENJDK_PATH
1515
sh configure --disable-warnings-as-errors --with-debug-level=$DEBUG_LEVEL
16-
make CONF=linux-x86_64-normal-server-$DEBUG_LEVEL THIRD_PARTY_HEAP=$BINDING_PATH/openjdk $OPENJDK_BUILD_TARGET
16+
make CONF=linux-x86_64-server-$DEBUG_LEVEL THIRD_PARTY_HEAP=$BINDING_PATH/openjdk $OPENJDK_BUILD_TARGET

.github/scripts/ci-checkout.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ OPENJDK_URL=`cargo read-manifest --manifest-path=$BINDING_PATH/mmtk/Cargo.toml |
77
OPENJDK_VERSION=`cargo read-manifest --manifest-path=$BINDING_PATH/mmtk/Cargo.toml | python3 -c 'import json,sys; print(json.load(sys.stdin)["metadata"]["openjdk"]["openjdk_version"])'`
88

99
# Use default openjdk path if it is not set (this is only need when MMTk core calls the script)
10-
OPENJDK_PATH=${OPENJDK_PATH:="$BINDING_PATH/repos/openjdk"}
10+
OPENJDK_PATH=${OPENJDK_PATH:="$BINDING_PATH/repos/jdk"}
1111

1212
rm -rf $OPENJDK_PATH
1313
git clone $OPENJDK_URL $OPENJDK_PATH

.github/scripts/ci-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ set -xe
22

33
. $(dirname "$0")/common.sh
44

5-
# Install nightly rust
5+
# Install the appropriate Rust toolchain
66
rustup toolchain install $RUSTUP_TOOLCHAIN
77
rustup target add i686-unknown-linux-gnu --toolchain $RUSTUP_TOOLCHAIN
88
rustup component add clippy --toolchain $RUSTUP_TOOLCHAIN

.github/scripts/ci-test-extended.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cur=$BINDING_PATH/.github/scripts
77
# OPENJDK_PATH is the default path set in ci-checkout.sh
88
export OPENJDK_PATH=$BINDING_PATH/repos/openjdk
99
export DEBUG_LEVEL=fastdebug
10-
export TEST_JAVA_BIN=$OPENJDK_PATH/build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java
10+
export TEST_JAVA_BIN=$OPENJDK_PATH/build/linux-x86_64-server-$DEBUG_LEVEL/jdk/bin/java
1111

1212
# Download dacapo
1313
export DACAPO_PATH=$BINDING_PATH/dacapo

.github/scripts/ci-test-minimal.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cur=$BINDING_PATH/.github/scripts
77
# OPENJDK_PATH is the default path set in ci-checkout.sh
88
export OPENJDK_PATH=$BINDING_PATH/repos/openjdk
99
export DEBUG_LEVEL=fastdebug
10-
export TEST_JAVA_BIN=$OPENJDK_PATH/build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java
10+
export TEST_JAVA_BIN=$OPENJDK_PATH/build/linux-x86_64-server-$DEBUG_LEVEL/jdk/bin/java
1111

1212
# Download dacapo
1313
export DACAPO_PATH=$BINDING_PATH/dacapo

.github/scripts/pgo-build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ cargo clean
1111
popd
1212

1313
# Compile with profiling support
14-
RUSTFLAGS="-Cprofile-generate=/tmp/$USER/pgo-data" make CONF=linux-x86_64-normal-server-release THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk images
14+
RUSTFLAGS="-Cprofile-generate=/tmp/$USER/pgo-data" make CONF=linux-x86_64-server-release THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk images
1515

1616
# Remove extraneous profiling data
1717
rm -rf /tmp/$USER/pgo-data/*
1818

1919
# Profile using fop
20-
MMTK_PLAN=GenImmix MMTK_STRESS_FACTOR=16777216 MMTK_PRECISE_STRESS=false ./build/linux-x86_64-normal-server-release/images/jdk/bin/java -XX:MetaspaceSize=500M -XX:+DisableExplicitGC -XX:-TieredCompilation -Xcomp -XX:+UseThirdPartyHeap -Xms60M -Xmx60M -jar /usr/share/benchmarks/dacapo/dacapo-23.9-RC3-chopin.jar -n 5 fop
20+
MMTK_PLAN=GenImmix MMTK_STRESS_FACTOR=16777216 MMTK_PRECISE_STRESS=false ./build/linux-x86_64-server-release/images/jdk/bin/java -XX:MetaspaceSize=500M -XX:+DisableExplicitGC -XX:-TieredCompilation -Xcomp -XX:+UseThirdPartyHeap -Xms60M -Xmx60M -jar /usr/share/benchmarks/dacapo/dacapo-23.9-RC3-chopin.jar -n 5 fop
2121

2222
# Merge profiling data
2323
/opt/rust/toolchains/1.71.1-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-profdata merge -o /tmp/$USER/pgo-data/merged.profdata /tmp/$USER/pgo-data
@@ -27,4 +27,4 @@ cargo clean
2727
popd
2828

2929
# Compile using profiling data
30-
RUSTFLAGS="-Cprofile-use=/tmp/$USER/pgo-data/merged.profdata -Cllvm-args=-pgo-warn-missing-function" make CONF=linux-x86_64-normal-server-release THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk images
30+
RUSTFLAGS="-Cprofile-use=/tmp/$USER/pgo-data/merged.profdata -Cllvm-args=-pgo-warn-missing-function" make CONF=linux-x86_64-server-release THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk images

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ jobs:
6868
with:
6969
name: linux-x86_64-server-${{ inputs.debug-level }}-bundles-${{ env.BUILD_SUFFIX }}
7070
path: |
71-
./git/openjdk/build/linux-x86_64-normal-server-${{ inputs.debug-level }}/bundles/*_bin.tar.gz
72-
./git/openjdk/build/linux-x86_64-normal-server-${{ inputs.debug-level }}/bundles/*_bin-debug.tar.gz
71+
./git/openjdk/build/linux-x86_64-server-${{ inputs.debug-level }}/bundles/*_bin.tar.gz
72+
./git/openjdk/build/linux-x86_64-server-${{ inputs.debug-level }}/bundles/*_bin-debug.tar.gz
7373
retention-days: 2

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,17 @@ $ sh configure --disable-warnings-as-errors --with-debug-level=$DEBUG_LEVEL
113113
Then build OpenJDK (this will build MMTk as well):
114114

115115
```console
116-
$ make CONF=linux-x86_64-normal-server-release THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk images
116+
$ make CONF=linux-x86_64-server-release THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk images
117117
```
118118

119-
The output jdk is then found at `./build/linux-x86_64-normal-server-release/images/jdk`.
119+
The output jdk is then found at `./build/linux-x86_64-server-release/images/jdk`.
120120

121121
> **Note:** The above `make` command will build the `images` target, which is a proper release build of OpenJDK. It is **essential** that you use this target if you are planning on evaluating your build (e.g. measuring performance, gathering minimum heap values, etc). However, if you are simply developing and building incremental changes often, you may want to use the [`default` target or "exploded image"](https://github.com/openjdk/jdk11u/blob/master/doc/building.md#Running-make), which has a marginally shorter build time. However, be wary, as the exploded image is the (roughly) minimal set of outputs required to run the built JDK and is not guaranteed to run all benchmarks. It may have bloated minimum heap values as well.
122122
>
123-
> The exploded image can be built as follows. The output jdk can be found at `./build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk`.
123+
> The exploded image can be built as follows. The output jdk can be found at `./build/linux-x86_64-server-$DEBUG_LEVEL/jdk`.
124124
>
125125
> ```console
126-
> $ make CONF=linux-x86_64-normal-server-$DEBUG_LEVEL THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk
126+
> $ make CONF=linux-x86_64-server-$DEBUG_LEVEL THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk
127127
> ```
128128
>
129129
> Again: **do not use the exploded image for performance analysis**.
@@ -151,7 +151,7 @@ stress factor of 4 MB in order to trigger more GC events.
151151
First we compile MMTk with profiling support:
152152

153153
```console
154-
$ RUSTFLAGS="-Cprofile-generate=/tmp/$USER/pgo-data" make CONF=linux-x86_64-normal-server-release THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk images
154+
$ RUSTFLAGS="-Cprofile-generate=/tmp/$USER/pgo-data" make CONF=linux-x86_64-server-release THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk images
155155
$ rm -rf /tmp/$USER/pgo-data/*
156156
```
157157
We clear the `/tmp/$USER/pgo-data` directory as during compilation, the JVM we
@@ -162,7 +162,7 @@ We then run `fop` in order to get some profiling data. Note that your location
162162
for the DaCapo benchmarks may be different:
163163

164164
```bash
165-
MMTK_PLAN=GenImmix MMTK_STRESS_FACTOR=4194304 MMTK_PRECISE_STRESS=false ./build/linux-x86_64-normal-server-release/images/jdk/bin/java -XX:MetaspaceSize=500M -XX:+DisableExplicitGC -XX:-TieredCompilation -Xcomp -XX:+UseThirdPartyHeap -Xms60M -Xmx60M -jar /usr/share/benchmarks/dacapo/dacapo-evaluation-git-6e411f33.jar -n 5 fop
165+
MMTK_PLAN=GenImmix MMTK_STRESS_FACTOR=4194304 MMTK_PRECISE_STRESS=false ./build/linux-x86_64-server-release/images/jdk/bin/java -XX:MetaspaceSize=500M -XX:+DisableExplicitGC -XX:-TieredCompilation -Xcomp -XX:+UseThirdPartyHeap -Xms60M -Xmx60M -jar /usr/share/benchmarks/dacapo/dacapo-evaluation-git-6e411f33.jar -n 5 fop
166166
```
167167

168168
We have to merge the profiling data into something we can feed into the Rust
@@ -179,11 +179,11 @@ your Rust version.*
179179
Finally, we build a new image using the profiling data as an input:
180180

181181
```console
182-
$ RUSTFLAGS="-Cprofile-use=/tmp/$USER/pgo-data/merged.profdata -Cllvm-args=-pgo-warn-missing-function" make CONF=linux-x86_64-normal-server-release THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk images
182+
$ RUSTFLAGS="-Cprofile-use=/tmp/$USER/pgo-data/merged.profdata -Cllvm-args=-pgo-warn-missing-function" make CONF=linux-x86_64-server-release THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk images
183183
```
184184

185185
We now have an OpenJDK build under
186-
`./build/linux-x86_64-normal-server-release/images/jdk` with MMTk that has been
186+
`./build/linux-x86_64-server-release/images/jdk` with MMTk that has been
187187
optimized using PGO.
188188

189189
For ease of use, we have provided an example script which does the above in
@@ -197,7 +197,7 @@ metadata), but by setting the environment variable `MMTK_MARK_IN_HEADER=1` while
197197
building OpenJDK, we can change its location to be in the object's header:
198198

199199
```console
200-
$ MMTK_MARK_IN_HEADER=1 make CONF=linux-x86_64-normal-server-$DEBUG_LEVEL THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk
200+
$ MMTK_MARK_IN_HEADER=1 make CONF=linux-x86_64-server-$DEBUG_LEVEL THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk
201201
```
202202

203203
### Valid object bit
@@ -207,7 +207,7 @@ environment variable `MMTK_VO_BIT=1` when building OpenJDK. This will set the fe
207207
for mmtk-core, as well as compiling the fastpath for the VO bit.
208208

209209
```console
210-
$ MMTK_VO_BIT=1 make CONF=linux-x86_64-normal-server-$DEBUG_LEVEL THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk
210+
$ MMTK_VO_BIT=1 make CONF=linux-x86_64-server-$DEBUG_LEVEL THIRD_PARTY_HEAP=$PWD/../mmtk-openjdk/openjdk
211211
```
212212

213213
## Test
@@ -221,8 +221,8 @@ class HelloWorld {
221221
System.out.println("Hello World!");
222222
}
223223
}
224-
$ ./build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/javac HelloWorld.java
225-
$ ./build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java HelloWorld
224+
$ ./build/linux-x86_64-server-$DEBUG_LEVEL/jdk/bin/javac HelloWorld.java
225+
$ ./build/linux-x86_64-server-$DEBUG_LEVEL/jdk/bin/java HelloWorld
226226
Hello World!
227227
```
228228

@@ -231,7 +231,7 @@ Hello World!
231231
Pass `-XX:+UseThirdPartyHeap` as java command line arguments to enable MMTk.
232232

233233
```
234-
$ ./build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap HelloWorld
234+
$ ./build/linux-x86_64-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap HelloWorld
235235
```
236236

237237
If `DEBUG_LEVEL` is `release`, you should just see
@@ -266,7 +266,7 @@ $ wget https://sourceforge.net/projects/dacapobench/files/9.12-bach-MR1/dacapo-9
266266
Run a DaCapo benchmark (e.g. `lusearch`):
267267

268268
```console
269-
$ ./build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -Xms512M -Xmx512M -jar ./dacapo-9.12-MR1-bach.jar lusearch
269+
$ ./build/linux-x86_64-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -Xms512M -Xmx512M -jar ./dacapo-9.12-MR1-bach.jar lusearch
270270
Using scaled threading model. 24 processors detected, 24 threads used to drive the workload, in a possible range of [1,64]
271271
===== DaCapo 9.12-MR1 lusearch starting =====
272272
4 query batches completed

TESTING-legacy.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ cargo +nightly build
3434
cd ..
3535
# Build OpenJDK
3636
bash configure --disable-warnings-as-errors --with-debug-level=<DEBUG_LEVEL>
37-
CONF=linux-x86_64-normal-server-<DEBUG_LEVEL> make
38-
# JDK is at `build/linux-x86_64-normal-server-<DEBUG_LEVEL>/jdk`
37+
CONF=linux-x86_64-server-<DEBUG_LEVEL> make
38+
# JDK is at `build/linux-x86_64-server-<DEBUG_LEVEL>/jdk`
3939
```
4040

4141
## Building (release)
@@ -48,13 +48,13 @@ cargo +nightly build --release
4848
cd ..
4949
# Build OpenJDK
5050
bash configure --disable-warnings-as-errors
51-
CONF=linux-x86_64-normal-server-release make
52-
# JDK is at `build/linux-x86_64-normal-server-release/jdk`
51+
CONF=linux-x86_64-server-release make
52+
# JDK is at `build/linux-x86_64-server-release/jdk`
5353
```
5454

5555
## Testing
5656

57-
1. `java` binary is at `build/linux-x86_64-normal-server-<DEBUG_LEVEL>/jdk/bin/java`.
57+
1. `java` binary is at `build/linux-x86_64-server-<DEBUG_LEVEL>/jdk/bin/java`.
5858
2. Set env `LD_LIBRARY_PATH` to include `$PWD/mmtk/vmbindings/openjdk/target/debug` (or `$PWD/mmtk/vmbindings/openjdk/target/release` if openjdk is built with debug level `release`).
5959
3. To enable MMTk, pass `-XX:+UseMMTk -XX:-UseCompressedOops` to `java`.
6060

@@ -63,13 +63,13 @@ e.g.:
6363
* If `DEBUG_LEVEL` = `fastdebug`, `slowdebug` or `optimized`:
6464
```bash
6565
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/mmtk/vmbindings/openjdk/target/debug
66-
build/linux-x86_64-normal-server-fastdebug/jdk/bin/java -XX:+UseMMTk -XX:-UseCompressedOops HelloWorld
66+
build/linux-x86_64-server-fastdebug/jdk/bin/java -XX:+UseMMTk -XX:-UseCompressedOops HelloWorld
6767
```
6868

6969
* If `DEBUG_LEVEL` = `release`:
7070
```bash
7171
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/mmtk/vmbindings/openjdk/target/release
72-
build/linux-x86_64-normal-server-release/jdk/bin/java -XX:+UseMMTk -XX:-UseCompressedOops HelloWorld
72+
build/linux-x86_64-server-release/jdk/bin/java -XX:+UseMMTk -XX:-UseCompressedOops HelloWorld
7373
```
7474

7575
> Original instructions by Abdullah Al Mamun and Tanveer Hannan

0 commit comments

Comments
 (0)