Skip to content

Commit f629152

Browse files
committed
8304055: G1: Remove OldGCAllocRegion::release
Reviewed-by: iwalulya, tschatzl
1 parent b5108b4 commit f629152

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

src/hotspot/share/gc/g1/g1AllocRegion.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -364,31 +364,3 @@ size_t G1GCAllocRegion::retire(bool fill_up) {
364364
}
365365
return end_waste;
366366
}
367-
368-
HeapRegion* OldGCAllocRegion::release() {
369-
HeapRegion* cur = get();
370-
if (cur != NULL) {
371-
// Determine how far we are from the next card boundary. If it is smaller than
372-
// the minimum object size we can allocate into, expand into the next card.
373-
HeapWord* top = cur->top();
374-
HeapWord* aligned_top = align_up(top, BOTConstants::card_size());
375-
376-
size_t to_allocate_words = pointer_delta(aligned_top, top, HeapWordSize);
377-
378-
if (to_allocate_words != 0) {
379-
// We are not at a card boundary. Fill up, possibly into the next, taking the
380-
// end of the region and the minimum object size into account.
381-
to_allocate_words = MIN2(pointer_delta(cur->end(), cur->top(), HeapWordSize),
382-
MAX2(to_allocate_words, G1CollectedHeap::min_fill_size()));
383-
384-
// Skip allocation if there is not enough space to allocate even the smallest
385-
// possible object. In this case this region will not be retained, so the
386-
// original problem cannot occur.
387-
if (to_allocate_words >= G1CollectedHeap::min_fill_size()) {
388-
HeapWord* dummy = attempt_allocation(to_allocate_words);
389-
cur->fill_with_dummy_object(dummy, to_allocate_words);
390-
}
391-
}
392-
}
393-
return G1AllocRegion::release();
394-
}

src/hotspot/share/gc/g1/g1AllocRegion.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,6 @@ class OldGCAllocRegion : public G1GCAllocRegion {
275275
public:
276276
OldGCAllocRegion(G1EvacStats* stats)
277277
: G1GCAllocRegion("Old GC Alloc Region", true /* bot_updates */, stats, G1HeapRegionAttr::Old) { }
278-
279-
// This specialization of release() makes sure that the last card that has
280-
// been allocated into has been completely filled by a dummy object. This
281-
// avoids races when remembered set scanning wants to update the BOT of the
282-
// last card in the retained old gc alloc region, and allocation threads
283-
// allocating into that card at the same time.
284-
virtual HeapRegion* release();
285278
};
286279

287280
#endif // SHARE_GC_G1_G1ALLOCREGION_HPP

0 commit comments

Comments
 (0)