Skip to content

Commit

Permalink
Fix jvmci warning and build native agent (#20)
Browse files Browse the repository at this point in the history
* Update GraalHotSpotVMConfig.java

* Update gluon-build.yml

* Update gluon-release.yml

* Update gluon-build.yml

* Update gluon-build.yml

* Update gluon-release.yml

* Update gluon-build.yml

* Update gluon-build.yml

* Update gluon-release.yml
  • Loading branch information
jperedadnr authored Sep 8, 2024
1 parent 373d063 commit 490e0c7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 19 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/gluon-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ name: Gluon Build
on:
push:
branches:
- 'master'
- 'gluon24'
pull_request:
branches:
- 'master'
- 'gluon24'
workflow_dispatch:

env:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
LABS_HOME: ${{ github.workspace }}/jdk
MX_PYTHON: python3.9
MX_PATH: ${{ github.workspace }}/mx
GRAALVM_SVM: graalvm-java23-${{ matrix.NAME }}-24.1
GRAALVM_SVM: graalvm-java23-${{ matrix.NAME }}-23+25.1
DYNAMIC_IMPORTS: "/substratevm"
DISABLE_POLYGLOT: true
DISABLE_LIBPOLYGLOT: true
Expand Down Expand Up @@ -70,17 +70,15 @@ jobs:
tar -xf labsjdk-ce-${{ env.LABS_TAG }}-${{ matrix.NAME }}-${{ matrix.ARCH }}.tar.gz
echo "JAVA_HOME=${{ github.workspace }}/labsjdk-ce-23-jvmci-b01${{ matrix.HOME }}" >> ${GITHUB_ENV}
- name: Build GraalVM
id: build-graalvm
run: |
cd substratevm
${MX_PATH}/mx --dy /substratevm build
GRAALVM_HOME=`${MX_PATH}/mx --dy /substratevm graalvm-home`
echo "::set-output name=graalvm-home-dir::$GRAALVM_HOME"
${MX_PATH}/mx --dy /substratevm --native-images=lib:native-image-agent build
echo "GRAALVM_HOME=`${MX_PATH}/mx --native-images=lib:native-image-agent graalvm-home`" >> ${GITHUB_ENV}
cd ..
- name: Create distribution
working-directory: ./vm
run: |
cd ${{ steps.build-graalvm.outputs.graalvm-home-dir }}/..
cd ${{ env.GRAALVM_HOME }}/..
if [[ ${{ matrix.os }} != 'ubuntu-latest' ]]
then
cd ../..
Expand Down Expand Up @@ -112,7 +110,7 @@ jobs:
LABS_HOME: ${{ github.workspace }}/jdk
MX_PYTHON: 'python'
MX_PATH: ${{ github.workspace }}/mx
GRAALVM_SVM: graalvm-java23-${{ matrix.NAME }}-24.1
GRAALVM_SVM: graalvm-java23-${{ matrix.NAME }}-23+25.1
DYNAMIC_IMPORTS: "/substratevm"
DISABLE_POLYGLOT: true
DISABLE_LIBPOLYGLOT: true
Expand Down Expand Up @@ -141,8 +139,8 @@ jobs:
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
call ${{ env.MX_PATH }}\mx.cmd -p substratevm build
call ${{ env.MX_PATH }}\mx.cmd -p substratevm graalvm-home > graalvm-home-with-forward-slashes.txt
call ${{ env.MX_PATH }}\mx.cmd -p substratevm --dy /substratevm --native-images=lib:native-image-agent build
call ${{ env.MX_PATH }}\mx.cmd -p substratevm --native-images=lib:native-image-agent graalvm-home > graalvm-home-with-forward-slashes.txt
set /p GRAALVM_HOME=<graalvm-home-with-forward-slashes.txt
setlocal enabledelayedexpansion
set "GRAALVM_HOME=%GRAALVM_HOME:/=\%"
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/gluon-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,10 @@ jobs:
tar -xf labsjdk-ce-${{ env.LABS_TAG }}-${{ matrix.NAME }}-${{ matrix.ARCH }}.tar.gz
echo "JAVA_HOME=${{ github.workspace }}/labsjdk-ce-23-jvmci-b01${{ matrix.HOME }}" >> ${GITHUB_ENV}
- name: Build GraalVM
id: build-graalvm
run: |
cd substratevm
${MX_PATH}/mx --dy /substratevm build
GRAALVM_HOME=`${MX_PATH}/mx --dy /substratevm graalvm-home`
echo "::set-output name=graalvm-home-dir::$GRAALVM_HOME"
${MX_PATH}/mx --dy /substratevm --native-images=lib:native-image-agent build
echo "GRAALVM_HOME=`${MX_PATH}/mx --native-images=lib:native-image-agent graalvm-home`" >> ${GITHUB_ENV}
cd ..
- name: Create distribution
working-directory: ./vm
Expand Down Expand Up @@ -152,12 +150,11 @@ jobs:
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
call ${{ env.MX_PATH }}\mx.cmd -p substratevm build
call ${{ env.MX_PATH }}\mx.cmd -p substratevm graalvm-home > graalvm-home-with-forward-slashes.txt
call ${{ env.MX_PATH }}\mx.cmd -p substratevm --dy /substratevm --native-images=lib:native-image-agent build
call ${{ env.MX_PATH }}\mx.cmd -p substratevm --native-images=lib:native-image-agent graalvm-home > graalvm-home-with-forward-slashes.txt
set /p GRAALVM_HOME=<graalvm-home-with-forward-slashes.txt
setlocal enabledelayedexpansion
set "GRAALVM_HOME=%GRAALVM_HOME:/=\%"
echo "::set-output name=graalvm-home-dir::%GRAALVM_HOME%"
echo GRAALVM_HOME=%GRAALVM_HOME% >> %GITHUB_ENV%
- name: Create distribution
working-directory: ./vm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public long defaultPrototypeMarkWord() {
public final long verifyOopMask = getFieldValue("CompilerToVM::Data::Universe_verify_oop_mask", Long.class, "uintptr_t");
public final long verifyOopBits = getFieldValue("CompilerToVM::Data::Universe_verify_oop_bits", Long.class, "uintptr_t");

public final int logOfHRGrainBytes = getFieldValue("HeapRegion::LogOfHRGrainBytes", Integer.class, JDK >= 22 ? "uint" : "int");
public final int logOfHRGrainBytes = getFieldValue(JDK >= 23 ? "G1HeapRegion::LogOfHRGrainBytes" : "HeapRegion::LogOfHRGrainBytes", Integer.class, JDK >= 22 ? "uint" : "int");

public final int cardtableShift = getFieldValue("CompilerToVM::Data::cardtable_shift", Integer.class, "int");
public final long cardtableStartAddress = getFieldValue("CompilerToVM::Data::cardtable_start_address", Long.class, "CardTable::CardValue*");
Expand Down

0 comments on commit 490e0c7

Please sign in to comment.