mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8156548: gc/gctests/StringInternSyncWithGC2 fails with Test level exit status: 151
Avoid repeated verification. Reviewed-by: jmasa, drwhite
This commit is contained in:
parent
f1c490f5fa
commit
83dbb0faba
5 changed files with 26 additions and 20 deletions
|
@ -6096,19 +6096,23 @@ size_t ScanMarkedObjectsAgainCarefullyClosure::do_object_careful_m(
|
|||
size = CompactibleFreeListSpace::adjustObjectSize(
|
||||
p->oop_iterate_size(_scanningClosure));
|
||||
}
|
||||
#ifdef ASSERT
|
||||
size_t direct_size =
|
||||
CompactibleFreeListSpace::adjustObjectSize(p->size());
|
||||
assert(size == direct_size, "Inconsistency in size");
|
||||
assert(size >= 3, "Necessary for Printezis marks to work");
|
||||
if (!_bitMap->isMarked(addr+1)) {
|
||||
_bitMap->verifyNoOneBitsInRange(addr+2, addr+size);
|
||||
} else {
|
||||
_bitMap->verifyNoOneBitsInRange(addr+2, addr+size-1);
|
||||
assert(_bitMap->isMarked(addr+size-1),
|
||||
"inconsistent Printezis mark");
|
||||
}
|
||||
#endif // ASSERT
|
||||
#ifdef ASSERT
|
||||
size_t direct_size =
|
||||
CompactibleFreeListSpace::adjustObjectSize(p->size());
|
||||
assert(size == direct_size, "Inconsistency in size");
|
||||
assert(size >= 3, "Necessary for Printezis marks to work");
|
||||
HeapWord* start_pbit = addr + 1;
|
||||
HeapWord* end_pbit = addr + size - 1;
|
||||
assert(_bitMap->isMarked(start_pbit) == _bitMap->isMarked(end_pbit),
|
||||
"inconsistent Printezis mark");
|
||||
// Verify inner mark bits (between Printezis bits) are clear,
|
||||
// but don't repeat if there are multiple dirty regions for
|
||||
// the same object, to avoid potential O(N^2) performance.
|
||||
if (addr != _last_scanned_object) {
|
||||
_bitMap->verifyNoOneBitsInRange(start_pbit + 1, end_pbit);
|
||||
_last_scanned_object = addr;
|
||||
}
|
||||
#endif // ASSERT
|
||||
} else {
|
||||
// An uninitialized object.
|
||||
assert(_bitMap->isMarked(addr+1), "missing Printezis mark?");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue