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
hotspot/src/share/vm
@ -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?");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1501,6 +1501,7 @@ class ScanMarkedObjectsAgainCarefullyClosure: public ObjectClosureCareful {
|
||||
CMSBitMap* _bitMap;
|
||||
CMSMarkStack* _markStack;
|
||||
MarkRefsIntoAndScanClosure* _scanningClosure;
|
||||
DEBUG_ONLY(HeapWord* _last_scanned_object;)
|
||||
|
||||
public:
|
||||
ScanMarkedObjectsAgainCarefullyClosure(CMSCollector* collector,
|
||||
@ -1514,8 +1515,9 @@ class ScanMarkedObjectsAgainCarefullyClosure: public ObjectClosureCareful {
|
||||
_yield(should_yield),
|
||||
_bitMap(bitMap),
|
||||
_markStack(markStack),
|
||||
_scanningClosure(cl) {
|
||||
}
|
||||
_scanningClosure(cl)
|
||||
DEBUG_ONLY(COMMA _last_scanned_object(NULL))
|
||||
{ }
|
||||
|
||||
void do_object(oop p) {
|
||||
guarantee(false, "call do_object_careful instead");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -235,7 +235,6 @@ address PhaseMacroExpand::basictype2arraycopy(BasicType t,
|
||||
return StubRoutines::select_arraycopy_function(t, aligned, disjoint, name, dest_uninitialized);
|
||||
}
|
||||
|
||||
#define COMMA ,
|
||||
#define XTOP LP64_ONLY(COMMA top())
|
||||
|
||||
// Generate an optimized call to arraycopy.
|
||||
|
@ -163,8 +163,6 @@ extern LONG WINAPI topLevelExceptionFilter(_EXCEPTION_POINTERS* );
|
||||
#define FP_SELECT(TypeName, intcode, fpcode) \
|
||||
FP_SELECT_##TypeName(intcode, fpcode)
|
||||
|
||||
#define COMMA ,
|
||||
|
||||
// Choose DT_RETURN_MARK macros based on the type: float/double -> void
|
||||
// (dtrace doesn't do FP yet)
|
||||
#define DT_RETURN_MARK_DECL_FOR(TypeName, name, type, probe) \
|
||||
|
@ -34,6 +34,9 @@
|
||||
// Makes a string of the macro expansion of a
|
||||
#define XSTR(a) STR(a)
|
||||
|
||||
// Allow commas in macro arguments.
|
||||
#define COMMA ,
|
||||
|
||||
// Apply pre-processor token pasting to the expansions of x and y.
|
||||
// The token pasting operator (##) prevents its arguments from being
|
||||
// expanded. This macro allows expansion of its arguments before the
|
||||
|
Loading…
x
Reference in New Issue
Block a user