Skip to content

Commit 216775f

Browse files
committed
8298144: Remove Space::new_dcto_cl
Reviewed-by: stefank, tschatzl
1 parent c612f93 commit 216775f

File tree

4 files changed

+6
-21
lines changed

4 files changed

+6
-21
lines changed

src/hotspot/share/gc/shared/cardTableRS.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void ClearNoncleanCardWrapper::do_MemRegion(MemRegion mr) {
111111
}
112112
}
113113

114-
void CardTableRS::younger_refs_in_space_iterate(Space* sp,
114+
void CardTableRS::younger_refs_in_space_iterate(ContiguousSpace* sp,
115115
HeapWord* gen_boundary,
116116
OopIterateClosure* cl) {
117117
verify_used_region_at_save_marks(sp);
@@ -440,7 +440,7 @@ void CardTableRS::initialize() {
440440
CardTable::initialize();
441441
}
442442

443-
void CardTableRS::non_clean_card_iterate(Space* sp,
443+
void CardTableRS::non_clean_card_iterate(ContiguousSpace* sp,
444444
HeapWord* gen_boundary,
445445
MemRegion mr,
446446
OopIterateClosure* cl,

src/hotspot/share/gc/shared/cardTableRS.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
#include "memory/memRegion.hpp"
3030
#include "oops/oop.hpp"
3131

32+
class ContiguousSpace;
3233
class DirtyCardToOopClosure;
3334
class Generation;
3435
class Space;
35-
3636
// This RemSet uses a card table both as shared data structure
3737
// for a mod ref barrier set and for the rem set information.
3838

@@ -47,7 +47,7 @@ class CardTableRS : public CardTable {
4747
public:
4848
CardTableRS(MemRegion whole_heap);
4949

50-
void younger_refs_in_space_iterate(Space* sp, HeapWord* gen_boundary, OopIterateClosure* cl);
50+
void younger_refs_in_space_iterate(ContiguousSpace* sp, HeapWord* gen_boundary, OopIterateClosure* cl);
5151

5252
virtual void verify_used_region_at_save_marks(Space* sp) const NOT_DEBUG_RETURN;
5353

@@ -70,7 +70,7 @@ class CardTableRS : public CardTable {
7070
// Iterate over the portion of the card-table which covers the given
7171
// region mr in the given space and apply cl to any dirty sub-regions
7272
// of mr. Clears the dirty cards as they are processed.
73-
void non_clean_card_iterate(Space* sp,
73+
void non_clean_card_iterate(ContiguousSpace* sp,
7474
HeapWord* gen_boundary,
7575
MemRegion mr,
7676
OopIterateClosure* cl,

src/hotspot/share/gc/shared/space.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,6 @@ void DirtyCardToOopClosure::do_MemRegion(MemRegion mr) {
161161
_min_done = bottom;
162162
}
163163

164-
DirtyCardToOopClosure* Space::new_dcto_cl(OopIterateClosure* cl,
165-
CardTable::PrecisionStyle precision,
166-
HeapWord* boundary) {
167-
return new DirtyCardToOopClosure(this, cl, precision, boundary);
168-
}
169-
170164
HeapWord* ContiguousSpaceDCTOC::get_actual_top(HeapWord* top,
171165
HeapWord* top_obj) {
172166
if (top_obj != NULL && top_obj < (_sp->toContiguousSpace())->top()) {

src/hotspot/share/gc/shared/space.hpp

+1-10
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,6 @@ class Space: public CHeapObj<mtGC> {
173173
// included in the iteration.
174174
virtual void object_iterate(ObjectClosure* blk) = 0;
175175

176-
// Create and return a new dirty card to oop closure. Can be
177-
// overridden to return the appropriate type of closure
178-
// depending on the type of space in which the closure will
179-
// operate. ResourceArea allocated.
180-
virtual DirtyCardToOopClosure* new_dcto_cl(OopIterateClosure* cl,
181-
CardTable::PrecisionStyle precision,
182-
HeapWord* boundary);
183-
184176
// If "p" is in the space, returns the address of the start of the
185177
// "block" that contains "p". We say "block" instead of "object" since
186178
// some heaps may not pack objects densely; a chunk may either be an
@@ -474,10 +466,9 @@ class ContiguousSpace: public CompactibleSpace {
474466
set_top(compaction_top());
475467
}
476468

477-
// Override.
478469
DirtyCardToOopClosure* new_dcto_cl(OopIterateClosure* cl,
479470
CardTable::PrecisionStyle precision,
480-
HeapWord* boundary) override;
471+
HeapWord* boundary);
481472

482473
// Apply "blk->do_oop" to the addresses of all reference fields in objects
483474
// starting with the _saved_mark_word, which was noted during a generation's

0 commit comments

Comments
 (0)