RFR: 8209883: ZGC: Compile without C1 broken
Aleksey Shipilev
shade at redhat.com
Thu Aug 23 17:59:28 UTC 2018
On 08/23/2018 06:44 PM, Vladimir Kozlov wrote:
> Can you explain where ZBarrierSetC1 declaration will come if zBarrierSetC1.hpp is not included?
(not Per, but I'll try to answer)
There are two forward declarations:
39 class ZBarrierSetC1;
40 class ZBarrierSetC2;
These are enough, i.e. no need for definition, because make_barrier_set() would handle paths with
COMPILER{1,2} disabled.
Pretty much every other *BarrierSet.cpp does the same. See e.g. g1BarrierSet.cpp:
#include "utilities/macros.hpp"
#ifdef COMPILER1
#include "gc/g1/c1/g1BarrierSetC1.hpp"
#endif
#ifdef COMPILER2
#include "gc/g1/c2/g1BarrierSetC2.hpp"
#endif
class G1BarrierSetC1;
class G1BarrierSetC2;
G1BarrierSet::G1BarrierSet(G1CardTable* card_table) :
CardTableBarrierSet(make_barrier_set_assembler<G1BarrierSetAssembler>(),
make_barrier_set_c1<G1BarrierSetC1>(),
make_barrier_set_c2<G1BarrierSetC2>(),
Thanks,
-Aleksey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20180823/e0860678/signature.asc>
More information about the hotspot-gc-dev
mailing list