--- a/src/hotspot/share/gc/cms/promotionInfo.cpp Mon May 07 14:42:05 2018 +0200
+++ b/src/hotspot/share/gc/cms/promotionInfo.cpp Mon May 07 14:42:08 2018 +0200
@@ -60,60 +60,6 @@
assert(!((FreeChunk*)this)->is_free(), "Error");
}
-//////////////////////////////////////////////////////////////////////////////
-// We go over the list of promoted objects, removing each from the list,
-// and applying the closure (this may, in turn, add more elements to
-// the tail of the promoted list, and these newly added objects will
-// also be processed) until the list is empty.
-// To aid verification and debugging, in the non-product builds
-// we actually forward _promoHead each time we process a promoted oop.
-// Note that this is not necessary in general (i.e. when we don't need to
-// call PromotionInfo::verify()) because oop_iterate can only add to the
-// end of _promoTail, and never needs to look at _promoHead.
-
-#define PROMOTED_OOPS_ITERATE_DEFN(OopClosureType, nv_suffix) \
- \
-void PromotionInfo::promoted_oops_iterate##nv_suffix(OopClosureType* cl) { \
- NOT_PRODUCT(verify()); \
- PromotedObject *curObj, *nextObj; \
- for (curObj = _promoHead; curObj != NULL; curObj = nextObj) { \
- if ((nextObj = curObj->next()) == NULL) { \
- /* protect ourselves against additions due to closure application \
- below by resetting the list. */ \
- assert(_promoTail == curObj, "Should have been the tail"); \
- _promoHead = _promoTail = NULL; \
- } \
- if (curObj->hasDisplacedMark()) { \
- /* restore displaced header */ \
- oop(curObj)->set_mark_raw(nextDisplacedHeader()); \
- } else { \
- /* restore prototypical header */ \
- oop(curObj)->init_mark_raw(); \
- } \
- /* The "promoted_mark" should now not be set */ \
- assert(!curObj->hasPromotedMark(), \
- "Should have been cleared by restoring displaced mark-word"); \
- NOT_PRODUCT(_promoHead = nextObj); \
- if (cl != NULL) oop(curObj)->oop_iterate(cl); \
- if (nextObj == NULL) { /* start at head of list reset above */ \
- nextObj = _promoHead; \
- } \
- } \
- assert(noPromotions(), "post-condition violation"); \
- assert(_promoHead == NULL && _promoTail == NULL, "emptied promoted list");\
- assert(_spoolHead == _spoolTail, "emptied spooling buffers"); \
- assert(_firstIndex == _nextIndex, "empty buffer"); \
-}
-
-// This should have been ALL_SINCE_...() just like the others,
-// but, because the body of the method above is somehwat longer,
-// the MSVC compiler cannot cope; as a workaround, we split the
-// macro into its 3 constituent parts below (see original macro
-// definition in specializedOopClosures.hpp).
-SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES_YOUNG(PROMOTED_OOPS_ITERATE_DEFN)
-PROMOTED_OOPS_ITERATE_DEFN(OopsInGenClosure,_v)
-
-
// Return the next displaced header, incrementing the pointer and
// recycling spool area as necessary.
markOop PromotionInfo::nextDisplacedHeader() {