Skip to content

Commit

Permalink
8329580: Parallel: Remove VerifyObjectStartArray
Browse files Browse the repository at this point in the history
Reviewed-by: tschatzl, gli
  • Loading branch information
albertnetymk committed Apr 4, 2024
1 parent 8efd7aa commit a169c06
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 48 deletions.
18 changes: 0 additions & 18 deletions src/hotspot/share/gc/parallel/psOldGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,24 +377,6 @@ void PSOldGen::verify() {
object_space()->verify();
}

class VerifyObjectStartArrayClosure : public ObjectClosure {
ObjectStartArray* _start_array;

public:
VerifyObjectStartArrayClosure(ObjectStartArray* start_array) :
_start_array(start_array) { }

virtual void do_object(oop obj) {
HeapWord* test_addr = cast_from_oop<HeapWord*>(obj) + 1;
guarantee(_start_array->object_start(test_addr) == cast_from_oop<HeapWord*>(obj), "ObjectStartArray cannot find start of object");
}
};

void PSOldGen::verify_object_start_array() {
VerifyObjectStartArrayClosure check(&_start_array);
object_iterate(&check);
}

#ifndef PRODUCT
void PSOldGen::record_spaces_top() {
assert(ZapUnusedHeapArea, "Not mangling unused space");
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/gc/parallel/psOldGen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ class PSOldGen : public CHeapObj<mtGC> {
virtual void print_on(outputStream* st) const;

void verify();
void verify_object_start_array();

// Performance Counter support
void update_counters();
Expand Down
12 changes: 0 additions & 12 deletions src/hotspot/share/gc/parallel/psParallelCompact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -913,12 +913,6 @@ void PSParallelCompact::pre_compact()
Universe::verify("Before GC");
}

// Verify object start arrays
if (VerifyObjectStartArray &&
VerifyBeforeGC) {
heap->old_gen()->verify_object_start_array();
}

DEBUG_ONLY(mark_bitmap()->verify_clear();)
DEBUG_ONLY(summary_data().verify_clear();)

Expand Down Expand Up @@ -1535,12 +1529,6 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
Universe::verify("After GC");
}

// Re-verify object start arrays
if (VerifyObjectStartArray &&
VerifyAfterGC) {
old_gen->verify_object_start_array();
}

if (ZapUnusedHeapArea) {
old_gen->object_space()->check_mangled_unused_area_complete();
}
Expand Down
12 changes: 0 additions & 12 deletions src/hotspot/share/gc/parallel/psScavenge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,6 @@ bool PSScavenge::invoke_no_policy() {
// Let the size policy know we're starting
size_policy->minor_collection_begin();

// Verify the object start arrays.
if (VerifyObjectStartArray &&
VerifyBeforeGC) {
old_gen->verify_object_start_array();
}

// Verify no unmarked old->young roots
if (VerifyRememberedSets) {
heap->card_table()->verify_all_young_refs_imprecise();
Expand Down Expand Up @@ -634,12 +628,6 @@ bool PSScavenge::invoke_no_policy() {
DerivedPointerTable::update_pointers();
#endif

// Re-verify object start arrays
if (VerifyObjectStartArray &&
VerifyAfterGC) {
old_gen->verify_object_start_array();
}

if (VerifyRememberedSets) {
heap->card_table()->verify_all_young_refs_imprecise();
}
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/gc/shared/gc_globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,6 @@
product(bool, VerifyRememberedSets, false, DIAGNOSTIC, \
"Verify GC remembered sets") \
\
product(bool, VerifyObjectStartArray, true, DIAGNOSTIC, \
"Verify GC object start array if verify before/after") \
\
product(bool, DisableExplicitGC, false, \
"Ignore calls to System.gc()") \
\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+VerifyBeforeGC -XX:+VerifyDuringGC -XX:+VerifyAfterGC
* -XX:+UseG1GC -XX:+G1VerifyHeapRegionCodeRoots
* -XX:+VerifyRememberedSets -XX:+VerifyObjectStartArray
* -XX:+VerifyRememberedSets
* -XX:+G1VerifyBitmaps
* gc.g1.TestVerificationInConcurrentCycle
*/
Expand All @@ -55,7 +55,7 @@
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:+VerifyBeforeGC -XX:+VerifyDuringGC -XX:+VerifyAfterGC
* -XX:+UseG1GC -XX:+G1VerifyHeapRegionCodeRoots
* -XX:+VerifyRememberedSets -XX:+VerifyObjectStartArray
* -XX:+VerifyRememberedSets
* gc.g1.TestVerificationInConcurrentCycle
*/

Expand Down

1 comment on commit a169c06

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.