--- a/hotspot/src/share/vm/gc/g1/heapRegion.inline.hpp Thu Aug 06 01:48:27 2015 -0700
+++ b/hotspot/src/share/vm/gc/g1/heapRegion.inline.hpp Thu Aug 06 15:49:50 2015 +0200
@@ -26,7 +26,7 @@
#define SHARE_VM_GC_G1_HEAPREGION_INLINE_HPP
#include "gc/g1/g1BlockOffsetTable.inline.hpp"
-#include "gc/g1/g1CollectedHeap.hpp"
+#include "gc/g1/g1CollectedHeap.inline.hpp"
#include "gc/g1/heapRegion.hpp"
#include "gc/shared/space.hpp"
#include "oops/oop.inline.hpp"
@@ -200,4 +200,18 @@
return G1CollectedHeap::heap()->is_in_cset(this);
}
+inline HeapRegion* HeapRegion::next_in_collection_set() const {
+ assert(in_collection_set(), "should only invoke on member of CS.");
+ assert(_next_in_special_set == NULL ||
+ _next_in_special_set->in_collection_set(),
+ "Malformed CS.");
+ return _next_in_special_set;
+}
+
+void HeapRegion::set_next_in_collection_set(HeapRegion* r) {
+ assert(in_collection_set(), "should only invoke on member of CS.");
+ assert(r == NULL || r->in_collection_set(), "Malformed CS.");
+ _next_in_special_set = r;
+}
+
#endif // SHARE_VM_GC_G1_HEAPREGION_INLINE_HPP