RFR: Fix builds on unsupported platforms after C2 changes

Aleksey Shipilev shade at redhat.com
Wed Sep 5 08:46:56 UTC 2018


sh/jdk build is broken on non-Shenandoah platforms because:

/pool/buildbot/slaves/sobornost/shenandoah-jdkX/build/src/hotspot/share/opto/cfgnode.cpp: In
function ‘Node* is_x2logic(PhaseGVN*, PhiNode*, int)’:
/pool/buildbot/slaves/sobornost/shenandoah-jdkX/build/src/hotspot/share/opto/cfgnode.cpp:1319:11:
error: invalid use of incomplete type ‘class BarrierSetC2’
   in1 = bs->peek_thru_gc_barrier(in1);
           ^~
/pool/buildbot/slaves/sobornost/shenandoah-jdkX/build/src/hotspot/share/gc/shared/barrierSet.hpp:38:7:
note: forward declaration of ‘class BarrierSetC2’
 class BarrierSetC2;
       ^~~~~~~~~~~~

This is due to missing include for barrierSetC2, which is otherwise transitively included via
shenandoahSupport.hpp. Fix:

diff -r b67a4350c0b0 src/hotspot/share/opto/cfgnode.cpp
--- a/src/hotspot/share/opto/cfgnode.cpp	Tue Sep 04 12:47:36 2018 -0400
+++ b/src/hotspot/share/opto/cfgnode.cpp	Wed Sep 05 10:44:06 2018 +0200
@@ -24,6 +24,8 @@

 #include "precompiled.hpp"
 #include "classfile/systemDictionary.hpp"
+#include "gc/shared/barrierSet.hpp"
+#include "gc/shared/c2/barrierSetC2.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/objArrayKlass.hpp"

Testing: Linux arm32 build

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list