--- old/src/hotspot/share/gc/shared/space.hpp 2018-04-27 15:29:57.502202440 +0200 +++ new/src/hotspot/share/gc/shared/space.hpp 2018-04-27 15:29:57.266202448 +0200 @@ -220,9 +220,11 @@ // Allocation (return NULL if full). Enforces mutual exclusion internally. virtual HeapWord* par_allocate(size_t word_size) = 0; +#if INCLUDE_SERIALGC // Mark-sweep-compact support: all spaces can update pointers to objects // moving as a part of compaction. virtual void adjust_pointers() = 0; +#endif virtual void print() const; virtual void print_on(outputStream* st) const; @@ -405,6 +407,7 @@ _next_compaction_space = csp; } +#if INCLUDE_SERIALGC // MarkSweep support phase2 // Start the process of compaction of the current space: compute @@ -420,6 +423,7 @@ virtual void adjust_pointers(); // MarkSweep support phase4 virtual void compact(); +#endif // INCLUDE_SERIALGC // The maximum percentage of objects that can be dead in the compacted // live part of a compacted space ("deadwood" support.) @@ -474,9 +478,11 @@ // and possibly also overriding obj_size(), and adjust_obj_size(). // These functions should avoid virtual calls whenever possible. +#if INCLUDE_SERIALGC // Frequently calls adjust_obj_size(). template static inline void scan_and_adjust_pointers(SpaceType* space); +#endif // Frequently calls obj_size(). template @@ -603,14 +609,14 @@ } -#if INCLUDE_ALL_GCS +#if INCLUDE_CMSGC // In support of parallel oop_iterate. #define ContigSpace_PAR_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \ void par_oop_iterate(MemRegion mr, OopClosureType* blk); ALL_PAR_OOP_ITERATE_CLOSURES(ContigSpace_PAR_OOP_ITERATE_DECL) #undef ContigSpace_PAR_OOP_ITERATE_DECL -#endif // INCLUDE_ALL_GCS +#endif // INCLUDE_CMSGC // Compaction support virtual void reset_after_compaction() { @@ -654,8 +660,10 @@ HeapWord** top_addr() { return &_top; } HeapWord** end_addr() { return &_end; } +#if INCLUDE_SERIALGC // Overrides for more efficient compaction support. void prepare_for_compaction(CompactPoint* cp); +#endif virtual void print_on(outputStream* st) const;