diff src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp @ 352:e0c09f7ec5c4

6702387: G1: assertion failure: assert(p == current_top || oop(p)->is_oop(),"p is not a block start") Summary: Do not coalesce dead and moved objects when removing self-forwarding pointers during the evacuation failure. Also fixed a issue in a BOT refinement code for TLABs. Reviewed-by: tonyp, jcoomes
author iveresov
date Thu, 03 Jul 2008 03:17:29 -0700
parents 37f87013dfd8
children ad8c8ca4ab0f
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp	Tue Jul 01 11:59:44 2008 -0700
+++ b/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp	Thu Jul 03 03:17:29 2008 -0700
@@ -412,7 +412,11 @@
   // offset table was actually a lab allocation, and was divided into
   // several objects subsequently.  Fix this situation as we answer the
   // query, by updating entries as we cross them.
-  size_t next_index = _array->index_for(n) + 1;
+
+  // If the fist object's end q is at the card boundary. Start refining
+  // with the corresponding card (the value of the entry will be basically
+  // set to 0). If the object crosses the boundary -- start from the next card.
+  size_t next_index = _array->index_for(n) + !_array->is_card_boundary(n);
   HeapWord* next_boundary = _array->address_for_index(next_index);
   if (csp() != NULL) {
     if (addr >= csp()->top()) return csp()->top();