From 16b3be0a76b0a71c8f59168dfc94c06d8a899bd4 Mon Sep 17 00:00:00 2001 From: Albert Mingkun Yang Date: Mon, 12 Feb 2024 12:25:39 +0000 Subject: [PATCH] 8325503: Add GC specific prefix for CheckForUnmarked related classes Reviewed-by: kbarrett, tschatzl, stefank --- src/hotspot/share/gc/parallel/psCardTable.cpp | 12 ++++++------ src/hotspot/share/gc/serial/cardTableRS.cpp | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/hotspot/share/gc/parallel/psCardTable.cpp b/src/hotspot/share/gc/parallel/psCardTable.cpp index bba35e1a76d..345d81ed147 100644 --- a/src/hotspot/share/gc/parallel/psCardTable.cpp +++ b/src/hotspot/share/gc/parallel/psCardTable.cpp @@ -38,7 +38,7 @@ // Checks an individual oop for missing precise marks. Mark // may be either dirty or newgen. -class CheckForUnmarkedOops : public BasicOopIterateClosure { +class PSCheckForUnmarkedOops : public BasicOopIterateClosure { PSYoungGen* _young_gen; PSCardTable* _card_table; HeapWord* _unmarked_addr; @@ -55,7 +55,7 @@ class CheckForUnmarkedOops : public BasicOopIterateClosure { } public: - CheckForUnmarkedOops(PSYoungGen* young_gen, PSCardTable* card_table) : + PSCheckForUnmarkedOops(PSYoungGen* young_gen, PSCardTable* card_table) : _young_gen(young_gen), _card_table(card_table), _unmarked_addr(nullptr) { } void do_oop(oop* p) override { do_oop_work(p); } @@ -68,13 +68,13 @@ class CheckForUnmarkedOops : public BasicOopIterateClosure { // Checks all objects for the existence of some type of mark, // precise or imprecise, dirty or newgen. -class CheckForUnmarkedObjects : public ObjectClosure { +class PSCheckForUnmarkedObjects : public ObjectClosure { private: PSYoungGen* _young_gen; PSCardTable* _card_table; public: - CheckForUnmarkedObjects() { + PSCheckForUnmarkedObjects() { ParallelScavengeHeap* heap = ParallelScavengeHeap::heap(); _young_gen = heap->young_gen(); _card_table = heap->card_table(); @@ -85,7 +85,7 @@ class CheckForUnmarkedObjects : public ObjectClosure { // we test for missing precise marks first. If any are found, we don't // fail unless the object head is also unmarked. virtual void do_object(oop obj) { - CheckForUnmarkedOops object_check(_young_gen, _card_table); + PSCheckForUnmarkedOops object_check(_young_gen, _card_table); obj->oop_iterate(&object_check); if (object_check.has_unmarked_oop()) { 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, // This should be called before a scavenge. void PSCardTable::verify_all_young_refs_imprecise() { - CheckForUnmarkedObjects check; + PSCheckForUnmarkedObjects check; ParallelScavengeHeap* heap = ParallelScavengeHeap::heap(); PSOldGen* old_gen = heap->old_gen(); diff --git a/src/hotspot/share/gc/serial/cardTableRS.cpp b/src/hotspot/share/gc/serial/cardTableRS.cpp index be5a89936e8..5d431b3eb1a 100644 --- a/src/hotspot/share/gc/serial/cardTableRS.cpp +++ b/src/hotspot/share/gc/serial/cardTableRS.cpp @@ -71,7 +71,7 @@ void CardTableRS::maintain_old_to_young_invariant(TenuredGeneration* old_gen, } } -class CheckForUnmarkedOops : public BasicOopIterateClosure { +class SerialCheckForUnmarkedOops : public BasicOopIterateClosure { DefNewGeneration* _young_gen; CardTableRS* _card_table; HeapWord* _unmarked_addr; @@ -88,7 +88,7 @@ class CheckForUnmarkedOops : public BasicOopIterateClosure { } public: - CheckForUnmarkedOops(DefNewGeneration* young_gen, CardTableRS* card_table) : + SerialCheckForUnmarkedOops(DefNewGeneration* young_gen, CardTableRS* card_table) : _young_gen(young_gen), _card_table(card_table), _unmarked_addr(nullptr) {} @@ -114,7 +114,7 @@ void CardTableRS::verify() { } void do_object(oop obj) override { - CheckForUnmarkedOops object_check(_young_gen, _card_table); + SerialCheckForUnmarkedOops object_check(_young_gen, _card_table); obj->oop_iterate(&object_check); // If this obj is imprecisely-marked, the card for obj-start must be dirty. if (object_check.has_unmarked_oop()) {