From 81a378196016c17ab09b0322535dc6863abc6bad Mon Sep 17 00:00:00 2001 From: "yunyao.zxl" Date: Tue, 18 Feb 2020 16:26:50 +0800 Subject: [PATCH] [Misc] Solve fastdebug build issues Summary: fix some misc things to build fastdebug version dragonwell11 Test Plan: build Dragonwell in fastdebug mode Reviewed-by: luchsh,sanhong,D-D-H Issue: https://github.com/alibaba/dragonwell11/issues/13 --- .github/workflows/check_pr.yml | 16 ++++++++++++++++ make.sh | 8 ++++++-- .../share/gc/shared/allocTracer.inline.hpp | 4 ++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check_pr.yml b/.github/workflows/check_pr.yml index 46d444a408..f7672c29fb 100644 --- a/.github/workflows/check_pr.yml +++ b/.github/workflows/check_pr.yml @@ -46,6 +46,22 @@ jobs: TEST_JDK_HOME=build/linux-x86_64-normal-server-release/images/jdk ${TEST_JDK_HOME}/bin/java -version + build_fastdebug_jdk: + runs-on: ubuntu-latest + container: + image: docker.io/dragonwelljdk/build_jdk:11u + steps: + - uses: actions/checkout@v2 + - name: Compile fastdebug mode + run: | + chmod 755 configure + bash make.sh fastdebug + + - name: Sanity test + run: | + TEST_JDK_HOME=build/linux-x86_64-normal-server-fastdebug/images/jdk + ${TEST_JDK_HOME}/bin/java -version + build_slowdebug_jdk: runs-on: ubuntu-latest container: diff --git a/make.sh b/make.sh index c2cddbe493..d7851a5453 100755 --- a/make.sh +++ b/make.sh @@ -1,7 +1,7 @@ #!/bin/bash if [ $# != 1 ]; then - echo "USAGE: $0 release/debug" + echo "USAGE: $0 release/debug/fastdebug" exit fi @@ -19,8 +19,12 @@ case "${BUILD_MODE}" in DEBUG_LEVEL="slowdebug" JDK_IMAGES_DIR=`pwd`/build/linux-x86_64-normal-server-slowdebug/images ;; + fastdebug) + DEBUG_LEVEL="fastdebug" + JDK_IMAGES_DIR=`pwd`/build/linux-x86_64-normal-server-fastdebug/images + ;; *) - echo "Argument must be release or debug!" + echo "Argument must be release or debug or fastdebug!" exit 1 ;; esac diff --git a/src/hotspot/share/gc/shared/allocTracer.inline.hpp b/src/hotspot/share/gc/shared/allocTracer.inline.hpp index 09dddd9a0b..63fb4ce3d0 100644 --- a/src/hotspot/share/gc/shared/allocTracer.inline.hpp +++ b/src/hotspot/share/gc/shared/allocTracer.inline.hpp @@ -57,7 +57,7 @@ inline void AllocTracer::send_opto_array_allocation_event(Klass* klass, oop obj, EventOptoArrayObjectAllocation event; if (event.should_commit()) { event.set_objectClass(klass); - event.set_address((TraceAddress)obj); + event.set_address(cast_from_oop(obj)); event.set_allocationSize(alloc_size); event.commit(); } @@ -67,7 +67,7 @@ inline void AllocTracer::send_opto_instance_allocation_event(Klass* klass, oop o EventOptoInstanceObjectAllocation event; if (event.should_commit()) { event.set_objectClass(klass); - event.set_address((TraceAddress)obj); + event.set_address(cast_from_oop(obj)); event.commit(); } } -- GitLab