src/share/vm/gc_implementation/g1/heapRegion.cpp

changeset 1905
c9a07413e82b
parent 1840
fb57d4cf76c2
parent 1900
cc387008223e
child 1907
c18cbe5936b8
     1.1 --- a/src/share/vm/gc_implementation/g1/heapRegion.cpp	Thu May 20 01:34:22 2010 -0700
     1.2 +++ b/src/share/vm/gc_implementation/g1/heapRegion.cpp	Thu May 20 08:32:11 2010 -0700
     1.3 @@ -554,11 +554,19 @@
     1.4  #endif
     1.5  
     1.6  void HeapRegion::set_zero_fill_state_work(ZeroFillState zfs) {
     1.7 -  assert(top() == bottom() || zfs == Allocated,
     1.8 -         "Region must be empty, or we must be setting it to allocated.");
     1.9    assert(ZF_mon->owned_by_self() ||
    1.10           Universe::heap()->is_gc_active(),
    1.11           "Must hold the lock or be a full GC to modify.");
    1.12 +#ifdef ASSERT
    1.13 +  if (top() != bottom() && zfs != Allocated) {
    1.14 +    ResourceMark rm;
    1.15 +    stringStream region_str;
    1.16 +    print_on(&region_str);
    1.17 +    assert(top() == bottom() || zfs == Allocated,
    1.18 +           err_msg("Region must be empty, or we must be setting it to allocated. "
    1.19 +                   "_zfs=%d, zfs=%d, region: %s", _zfs, zfs, region_str.as_string()));
    1.20 +  }
    1.21 +#endif
    1.22    _zfs = zfs;
    1.23  }
    1.24  

mercurial