mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
6921317: (partial) G1: assert(top() == bottom() || zfs == Allocated,"Region must be empty, or we must be setting it to
Extended the failing assertion with the new message format to get more data. Reviewed-by: tonyp
This commit is contained in:
parent
d14dfb51af
commit
0d3978019b
2 changed files with 31 additions and 12 deletions
|
@ -554,11 +554,19 @@ HeapWord* HeapRegion::allocate(size_t size) {
|
|||
#endif
|
||||
|
||||
void HeapRegion::set_zero_fill_state_work(ZeroFillState zfs) {
|
||||
assert(top() == bottom() || zfs == Allocated,
|
||||
"Region must be empty, or we must be setting it to allocated.");
|
||||
assert(ZF_mon->owned_by_self() ||
|
||||
Universe::heap()->is_gc_active(),
|
||||
"Must hold the lock or be a full GC to modify.");
|
||||
#ifdef ASSERT
|
||||
if (top() != bottom() && zfs != Allocated) {
|
||||
ResourceMark rm;
|
||||
stringStream region_str;
|
||||
print_on(®ion_str);
|
||||
assert(top() == bottom() || zfs == Allocated,
|
||||
err_msg("Region must be empty, or we must be setting it to allocated. "
|
||||
"_zfs=%d, zfs=%d, region: %s", _zfs, zfs, region_str.as_string()));
|
||||
}
|
||||
#endif
|
||||
_zfs = zfs;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue