From 7bb1649977e7fe8ecd93f52bef7600e354931d75 Mon Sep 17 00:00:00 2001 From: "yunyao.zxl" Date: Tue, 18 Feb 2020 16:07:45 +0800 Subject: [PATCH] [Misc] Solve fastdebug build issues Summary: fix some misc things to build fastdebug version dragonwell8: fastdebug version has `-DCHECK_UNHANDLED_OOPS` which will make `oop` as an object instead of a pointer. Test Plan: build Dragonwell in fastdebug mode Reviewed-by: luchsh,D-D-H Issue: https://github.com/alibaba/dragonwell8/issues/82 --- .github/workflows/check_pr.yml | 68 +++++++++++++++++++ .../vm/gc_interface/allocTracer.inline.hpp | 4 +- 2 files changed, 70 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_pr.yml b/.github/workflows/check_pr.yml index 7e2c08f63..0e7f33dc9 100644 --- a/.github/workflows/check_pr.yml +++ b/.github/workflows/check_pr.yml @@ -100,6 +100,74 @@ jobs: #run: | #make test TEST="hotspot_tier1 jdk_tier1" + build_fastdebug_jdk: + runs-on: ubuntu-latest + container: + image: docker.io/dragonwelljdk/build_jdk:8u + steps: + - name: Check out alibaba/dragonwell8_hotspot + uses: actions/checkout@v2 + with: + path: 'hotspot' + - name: Check out alibaba/dragonwell8_corba + uses: actions/checkout@v2 + with: + repository: 'alibaba/dragonwell8_corba' + path: 'corba' + - name: Check out alibaba/dragonwell8_langtools + uses: actions/checkout@v2 + with: + repository: 'alibaba/dragonwell8_langtools' + path: 'langtools' + - name: Check out alibaba/dragonwell8 + uses: actions/checkout@v2 + with: + repository: 'alibaba/dragonwell8' + path: 'dragonwell8' + - name: Check out alibaba/dragonwell8_jdk + uses: actions/checkout@v2 + with: + repository: 'alibaba/dragonwell8_jdk' + path: 'jdk' + - name: Check out alibaba/dragonwell8_jaxws + uses: actions/checkout@v2 + with: + repository: 'alibaba/dragonwell8_jaxws' + path: 'jaxws' + - name: Check out alibaba/dragonwell8_jaxp + uses: actions/checkout@v2 + with: + repository: 'alibaba/dragonwell8_jaxp' + path: 'jaxp' + - name: Check out alibaba/dragonwell8_nashorn + uses: actions/checkout@v2 + with: + repository: 'alibaba/dragonwell8_nashorn' + path: 'nashorn' + + - name: Compile fastdebug mode + run: | + mv hotspot dragonwell8 + mv langtools dragonwell8 + mv jdk dragonwell8 + mv corba dragonwell8 + mv jaxp dragonwell8 + mv jaxws dragonwell8 + mv nashorn dragonwell8 + cd dragonwell8 + sh configure --with-debug-level=fastdebug --with-cacerts-file=${PWD}/common/security/cacerts --with-milestone=fcs --enable-unlimited-crypto + make LOG=trace images + + - name: Sanity test + run: | + cd dragonwell8 + TEST_JDK_HOME=build/linux-x86_64-normal-server-fastdebug/images/j2sdk-image + ${TEST_JDK_HOME}/bin/java -version + + #- name: Tier1 test + #run: | + #make test TEST="hotspot_tier1 jdk_tier1" + build_slowdebug_jdk: runs-on: ubuntu-latest container: diff --git a/src/share/vm/gc_interface/allocTracer.inline.hpp b/src/share/vm/gc_interface/allocTracer.inline.hpp index 8c37d4966..38e112ab3 100644 --- a/src/share/vm/gc_interface/allocTracer.inline.hpp +++ b/src/share/vm/gc_interface/allocTracer.inline.hpp @@ -60,7 +60,7 @@ inline void AllocTracer::send_opto_array_allocation_event(KlassHandle klass, oop EventOptoArrayObjectAllocation event; if (event.should_commit()) { event.set_objectClass(klass()); - event.set_address((TYPE_ADDRESS)obj); + event.set_address(cast_from_oop(obj)); event.set_allocationSize(alloc_size); event.commit(); } @@ -70,7 +70,7 @@ inline void AllocTracer::send_opto_instance_allocation_event(KlassHandle klass, EventOptoInstanceObjectAllocation event; if (event.should_commit()) { event.set_objectClass(klass()); - event.set_address((TYPE_ADDRESS)obj); + event.set_address(cast_from_oop(obj)); event.commit(); } } -- GitLab