RFR: Isolate shenandoahVerifier from stray headers

Roman Kennke rkennke at redhat.com
Tue Apr 24 09:23:01 UTC 2018


Am 24.04.2018 um 10:12 schrieb Aleksey Shipilev:
> We have the name clash against macroAssembler_arm.hpp / verify_oop macro with Verifier, see for
> example here:
>   https://bugs.openjdk.java.net/browse/JDK-8200103
> 
> The easiest way to avoid this is separate shenandoahVerifier from those headers. There is an
> accidental path via shenandoahPacer.inline.hpp too, which should not have include precompiled.hpp to
> begin with.
> 
> diff -r fa755ee8fe3b src/hotspot/share/gc/shenandoah/shenandoahPacer.inline.hpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahPacer.inline.hpp	Mon Apr 23 23:03:19 2018 +0200
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahPacer.inline.hpp	Tue Apr 24 10:07:56 2018 +0200
> @@ -24,7 +24,6 @@
>  #ifndef SHARE_VM_GC_SHENANDOAH_SHENANDOAHPACER_INLINE_HPP
>  #define SHARE_VM_GC_SHENANDOAH_SHENANDOAHPACER_INLINE_HPP
> 
> -#include "precompiled.hpp"
>  #include "gc/shenandoah/shenandoahPacer.hpp"
> 
>  inline void ShenandoahPacer::report_mark(size_t words) {
> diff -r fa755ee8fe3b src/hotspot/share/gc/shenandoah/shenandoahVerifier.cpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahVerifier.cpp	Mon Apr 23 23:03:19 2018 +0200
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahVerifier.cpp	Tue Apr 24 10:07:56 2018 +0200
> @@ -20,7 +20,8 @@
>   * questions.
>   *
>   */
> -#include "precompiled.hpp"
> +
> +// Deliberately avoids precompiled headers, to break name clashes and accidental dependencies
> 
>  #include "gc/shenandoah/brooksPointer.hpp"
>  #include "gc/shenandoah/shenandoahAsserts.hpp"
> 
> 
> Testing: x86_64 non-PCH build + hotspot_fast_gc_shenandoah, arm32 PCH build
> 

Uh wtf.

Please push it.
Thanks, Roman





More information about the shenandoah-dev mailing list