RFR: Isolate shenandoahVerifier from stray headers
Aleksey Shipilev
shade at redhat.com
Tue Apr 24 08:12:13 UTC 2018
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
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list