RFR: Fix incorrect ifdef INCLUDE_SHENANDOAHGC
Roman Kennke
rkennke at redhat.com
Tue Jun 12 08:52:38 UTC 2018
Yes, please! Thanks for fixing!
Roman
> AArch64 (and possibly x86_32) build fails with:
>
> /pool/buildbot/slaves/sobornost/shenandoah-jdkX/build/src/hotspot/cpu/aarch64/aarch64.ad:9430:8:
> error: ‘class MacroAssembler’ has no member named ‘shenandoah_write_barrier’
> __ shenandoah_write_barrier(d);
>
> The reason is incorrect usage of INCLUDE_SHENANDOAHGC in some places, and missing header declaration.
>
> Fixed by:
>
> diff -r 0ccf50d8fa91 src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
> --- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp Mon Jun 11 16:08:42 2018 +0200
> +++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp Tue Jun 12 09:09:59 2018 +0200
> @@ -4065,11 +4065,11 @@
> // Used for storing NULLs.
> void MacroAssembler::store_heap_oop_null(Address dst) {
> access_store_at(T_OBJECT, IN_HEAP, dst, noreg, noreg, noreg);
> }
>
> -#ifdef INCLUDE_SHENANDOAHGC
> +#if INCLUDE_SHENANDOAHGC
> void MacroAssembler::shenandoah_write_barrier(Register dst) {
> assert(UseShenandoahGC && (ShenandoahWriteBarrier || ShenandoahStoreValEnqueueBarrier), "Should
> be enabled");
> assert(dst != rscratch1, "need rscratch1");
> assert(dst != rscratch2, "need rscratch2");
>
> diff -r 0ccf50d8fa91 src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp
> --- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp Mon Jun 11 16:08:42 2018 +0200
> +++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp Tue Jun 12 09:09:59 2018 +0200
> @@ -25,10 +25,11 @@
>
> #ifndef CPU_AARCH64_VM_MACROASSEMBLER_AARCH64_HPP
> #define CPU_AARCH64_VM_MACROASSEMBLER_AARCH64_HPP
>
> #include "asm/assembler.hpp"
> +#include "utilities/macros.hpp"
>
> // MacroAssembler extends Assembler by frequently used macros.
> //
> // Instructions for which a 'better' code sequence exists depending
> // on arguments should also go in here.
> @@ -792,10 +793,14 @@
> void store_check(Register obj); // store check for obj - register is destroyed
> afterwards
> void store_check(Register obj, Address dst); // same as above, dst is exact store location
> (reg. is destroyed)
>
> void resolve_jobject(Register value, Register thread, Register tmp);
>
> +#if INCLUDE_SHENANDOAHGC
> + void shenandoah_write_barrier(Register dst);
> +#endif
> +
> // oop manipulations
> void load_klass(Register dst, Register src);
> void store_klass(Register dst, Register src);
> void cmp_klass(Register oop, Register trial_klass, Register tmp);
>
> diff -r 0ccf50d8fa91 src/hotspot/cpu/x86/macroAssembler_x86.cpp
> --- a/src/hotspot/cpu/x86/macroAssembler_x86.cpp Mon Jun 11 16:08:42 2018 +0200
> +++ b/src/hotspot/cpu/x86/macroAssembler_x86.cpp Tue Jun 12 09:09:59 2018 +0200
> @@ -50,11 +50,11 @@
> #include "utilities/macros.hpp"
> #include "crc32c.h"
> #ifdef COMPILER2
> #include "opto/intrinsicnode.hpp"
> #endif
> -#ifdef INCLUDE_SHENANDOAHGC
> +#if INCLUDE_SHENANDOAHGC
> #include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
> #endif
>
> #ifdef PRODUCT
> #define BLOCK_COMMENT(str) /* nothing */
> diff -r 0ccf50d8fa91 src/hotspot/cpu/x86/macroAssembler_x86.hpp
> --- a/src/hotspot/cpu/x86/macroAssembler_x86.hpp Mon Jun 11 16:08:42 2018 +0200
> +++ b/src/hotspot/cpu/x86/macroAssembler_x86.hpp Tue Jun 12 09:09:59 2018 +0200
> @@ -295,13 +295,13 @@
>
> // jobjects
> void clear_jweak_tag(Register possibly_jweak);
> void resolve_jobject(Register value, Register thread, Register tmp);
>
> -#ifdef INCLUDE_SHENANDOAHGC
> +#if INCLUDE_SHENANDOAHGC
> void shenandoah_write_barrier(Register dst);
> -#endif // INCLUDE_SHENANDOAHGC
> +#endif
>
> // C 'boolean' to Java boolean: x == 0 ? 0 : 1
> void c2bool(Register x);
>
> // C++ bool manipulation
>
> Thanks,
> -Aleksey
>
More information about the shenandoah-dev
mailing list