< prev index next >
src/hotspot/share/gc/shared/space.cpp
Print this page
rev 49911 : imported patch removeAllGCs
@@ -23,11 +23,10 @@
*/
#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"
#include "gc/shared/genOopClosures.inline.hpp"
#include "gc/shared/space.hpp"
@@ -42,10 +41,13 @@
#include "runtime/safepoint.hpp"
#include "utilities/align.hpp"
#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) {
if (top_obj != NULL) {
if (_sp->block_is_obj(top_obj)) {
@@ -410,10 +412,12 @@
cp->threshold =
cp->space->cross_threshold(compact_top - size, compact_top);
return compact_top;
}
+#if INCLUDE_SERIALGC
+
void ContiguousSpace::prepare_for_compaction(CompactPoint* cp) {
scan_and_forward(this, cp);
}
void CompactibleSpace::adjust_pointers() {
@@ -427,10 +431,12 @@
void CompactibleSpace::compact() {
scan_and_compact(this);
}
+#endif // INCLUDE_SERIALGC
+
void Space::print_short() const { print_short_on(tty); }
void Space::print_short_on(outputStream* st) const {
st->print(" space " SIZE_FORMAT "K, %3d%% used", capacity() / K,
(int) ((double) used() * 100 / capacity()));
@@ -482,11 +488,11 @@
bool Space::obj_is_alive(const HeapWord* p) const {
assert (block_is_obj(p), "The address should point to an object");
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) {\
HeapWord* obj_addr = mr.start(); \
HeapWord* t = mr.end(); \
@@ -497,11 +503,11 @@
}
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;
HeapWord* obj_addr = bottom();
HeapWord* t = top();
< prev index next >