diff src/share/vm/gc_implementation/g1/heapRegion.cpp @ 1550:c9a07413e82b

Merge
author jcoomes
date Thu, 20 May 2010 08:32:11 -0700
parents fb57d4cf76c2 cc387008223e
children c18cbe5936b8
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/heapRegion.cpp	Thu May 20 01:34:22 2010 -0700
+++ b/src/share/vm/gc_implementation/g1/heapRegion.cpp	Thu May 20 08:32:11 2010 -0700
@@ -554,11 +554,19 @@
 #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(&region_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;
 }