--- a/src/hotspot/share/gc/shared/space.cpp Fri May 04 09:29:14 2018 +0200
+++ b/src/hotspot/share/gc/shared/space.cpp Fri May 04 11:41:35 2018 +0200
@@ -25,7 +25,6 @@
#include "precompiled.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
-#include "gc/serial/defNewGeneration.hpp"
#include "gc/shared/blockOffsetTable.inline.hpp"
#include "gc/shared/collectedHeap.inline.hpp"
#include "gc/shared/genCollectedHeap.hpp"
@@ -44,6 +43,9 @@
#include "utilities/copy.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
+#if INCLUDE_SERIALGC
+#include "gc/serial/defNewGeneration.hpp"
+#endif
HeapWord* DirtyCardToOopClosure::get_actual_top(HeapWord* top,
HeapWord* top_obj) {
@@ -412,6 +414,8 @@
return compact_top;
}
+#if INCLUDE_SERIALGC
+
void ContiguousSpace::prepare_for_compaction(CompactPoint* cp) {
scan_and_forward(this, cp);
}
@@ -429,6 +433,8 @@
scan_and_compact(this);
}
+#endif // INCLUDE_SERIALGC
+
void Space::print_short() const { print_short_on(tty); }
void Space::print_short_on(outputStream* st) const {
@@ -484,7 +490,7 @@
return true;
}
-#if INCLUDE_ALL_GCS
+#if INCLUDE_CMSGC
#define ContigSpace_PAR_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
\
void ContiguousSpace::par_oop_iterate(MemRegion mr, OopClosureType* blk) {\
@@ -499,7 +505,7 @@
ALL_PAR_OOP_ITERATE_CLOSURES(ContigSpace_PAR_OOP_ITERATE_DEFN)
#undef ContigSpace_PAR_OOP_ITERATE_DEFN
-#endif // INCLUDE_ALL_GCS
+#endif // INCLUDE_CMSGC
void ContiguousSpace::oop_iterate(ExtendedOopClosure* blk) {
if (is_empty()) return;