Skip to content

Commit 16b3be0

Browse files
committedFeb 12, 2024
8325503: Add GC specific prefix for CheckForUnmarked related classes
Reviewed-by: kbarrett, tschatzl, stefank
1 parent 1358850 commit 16b3be0

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed
 

‎src/hotspot/share/gc/parallel/psCardTable.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
// Checks an individual oop for missing precise marks. Mark
4040
// may be either dirty or newgen.
41-
class CheckForUnmarkedOops : public BasicOopIterateClosure {
41+
class PSCheckForUnmarkedOops : public BasicOopIterateClosure {
4242
PSYoungGen* _young_gen;
4343
PSCardTable* _card_table;
4444
HeapWord* _unmarked_addr;
@@ -55,7 +55,7 @@ class CheckForUnmarkedOops : public BasicOopIterateClosure {
5555
}
5656

5757
public:
58-
CheckForUnmarkedOops(PSYoungGen* young_gen, PSCardTable* card_table) :
58+
PSCheckForUnmarkedOops(PSYoungGen* young_gen, PSCardTable* card_table) :
5959
_young_gen(young_gen), _card_table(card_table), _unmarked_addr(nullptr) { }
6060

6161
void do_oop(oop* p) override { do_oop_work(p); }
@@ -68,13 +68,13 @@ class CheckForUnmarkedOops : public BasicOopIterateClosure {
6868

6969
// Checks all objects for the existence of some type of mark,
7070
// precise or imprecise, dirty or newgen.
71-
class CheckForUnmarkedObjects : public ObjectClosure {
71+
class PSCheckForUnmarkedObjects : public ObjectClosure {
7272
private:
7373
PSYoungGen* _young_gen;
7474
PSCardTable* _card_table;
7575

7676
public:
77-
CheckForUnmarkedObjects() {
77+
PSCheckForUnmarkedObjects() {
7878
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
7979
_young_gen = heap->young_gen();
8080
_card_table = heap->card_table();
@@ -85,7 +85,7 @@ class CheckForUnmarkedObjects : public ObjectClosure {
8585
// we test for missing precise marks first. If any are found, we don't
8686
// fail unless the object head is also unmarked.
8787
virtual void do_object(oop obj) {
88-
CheckForUnmarkedOops object_check(_young_gen, _card_table);
88+
PSCheckForUnmarkedOops object_check(_young_gen, _card_table);
8989
obj->oop_iterate(&object_check);
9090
if (object_check.has_unmarked_oop()) {
9191
guarantee(_card_table->is_dirty_for_addr(obj), "Found unmarked young_gen object");
@@ -377,7 +377,7 @@ void PSCardTable::scavenge_contents_parallel(ObjectStartArray* start_array,
377377

378378
// This should be called before a scavenge.
379379
void PSCardTable::verify_all_young_refs_imprecise() {
380-
CheckForUnmarkedObjects check;
380+
PSCheckForUnmarkedObjects check;
381381

382382
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
383383
PSOldGen* old_gen = heap->old_gen();

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void CardTableRS::maintain_old_to_young_invariant(TenuredGeneration* old_gen,
7171
}
7272
}
7373

74-
class CheckForUnmarkedOops : public BasicOopIterateClosure {
74+
class SerialCheckForUnmarkedOops : public BasicOopIterateClosure {
7575
DefNewGeneration* _young_gen;
7676
CardTableRS* _card_table;
7777
HeapWord* _unmarked_addr;
@@ -88,7 +88,7 @@ class CheckForUnmarkedOops : public BasicOopIterateClosure {
8888
}
8989

9090
public:
91-
CheckForUnmarkedOops(DefNewGeneration* young_gen, CardTableRS* card_table) :
91+
SerialCheckForUnmarkedOops(DefNewGeneration* young_gen, CardTableRS* card_table) :
9292
_young_gen(young_gen),
9393
_card_table(card_table),
9494
_unmarked_addr(nullptr) {}
@@ -114,7 +114,7 @@ void CardTableRS::verify() {
114114
}
115115

116116
void do_object(oop obj) override {
117-
CheckForUnmarkedOops object_check(_young_gen, _card_table);
117+
SerialCheckForUnmarkedOops object_check(_young_gen, _card_table);
118118
obj->oop_iterate(&object_check);
119119
// If this obj is imprecisely-marked, the card for obj-start must be dirty.
120120
if (object_check.has_unmarked_oop()) {

0 commit comments

Comments
 (0)
Please sign in to comment.