Skip to content

Commit ec6c35c

Browse files
committedJan 31, 2024
8324970: Serial: Refactor signature of maintain_old_to_young_invariant
Reviewed-by: tschatzl
1 parent b5c267f commit ec6c35c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎src/hotspot/share/gc/serial/cardTableRS.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "gc/serial/cardTableRS.hpp"
2828
#include "gc/serial/generation.hpp"
2929
#include "gc/serial/serialHeap.hpp"
30+
#include "gc/serial/tenuredGeneration.hpp"
3031
#include "gc/shared/space.inline.hpp"
3132
#include "memory/iterator.inline.hpp"
3233
#include "utilities/align.hpp"
@@ -54,9 +55,8 @@ void CardTableRS::verify_used_region_at_save_marks(Space* sp) const {
5455
}
5556
#endif
5657

57-
void CardTableRS::maintain_old_to_young_invariant(Generation* old_gen, bool is_young_gen_empty) {
58-
assert(SerialHeap::heap()->is_old_gen(old_gen), "precondition");
59-
58+
void CardTableRS::maintain_old_to_young_invariant(TenuredGeneration* old_gen,
59+
bool is_young_gen_empty) {
6060
if (is_young_gen_empty) {
6161
clear_MemRegion(old_gen->prev_used_region());
6262
} else {

‎src/hotspot/share/gc/serial/cardTableRS.hpp

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

32-
class Generation;
3332
class Space;
33+
class TenuredGeneration;
3434
class TenuredSpace;
3535

3636
// This RemSet uses a card table both as shared data structure
@@ -80,7 +80,7 @@ class CardTableRS : public CardTable {
8080
// the old generation card table completely if the young generation had been
8181
// completely evacuated, otherwise dirties the whole old generation to
8282
// conservatively not loose any old-to-young pointer.
83-
void maintain_old_to_young_invariant(Generation* old_gen, bool is_young_gen_empty);
83+
void maintain_old_to_young_invariant(TenuredGeneration* old_gen, bool is_young_gen_empty);
8484

8585
// Iterate over the portion of the card-table which covers the given
8686
// region mr in the given space and apply cl to any dirty sub-regions

0 commit comments

Comments
 (0)
Please sign in to comment.