< prev index next >

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

Print this page
rev 7903 : imported patch skip_stale

@@ -3563,10 +3563,11 @@
 #if _MARKING_STATS_
   _local_pushes                  = 0;
   _local_pops                    = 0;
   _local_max_size                = 0;
   _objs_scanned                  = 0;
+  _stale_humongous_queue_entries = 0;
   _global_pushes                 = 0;
   _global_pops                   = 0;
   _global_max_size               = 0;
   _global_transfers_to           = 0;
   _global_transfers_from         = 0;

@@ -3816,14 +3817,18 @@
         gclog_or_tty->print_cr("[%u] popped "PTR_FORMAT, _worker_id,
                                p2i((void*) obj));
       }
 
       assert(_g1h->is_in_g1_reserved((HeapWord*) obj), "invariant" );
-      assert(!_g1h->is_on_master_free_list(
-                  _g1h->heap_region_containing((HeapWord*) obj)), "invariant");
 
+      if (is_stale_humongous_queue_entry(obj)) {
+        statsOnly( ++stale_humongous_queue_entries );
+      } else {
+        assert(!_g1h->is_on_master_free_list(
+                 _g1h->heap_region_containing(obj)), "invariant");
       scan_object(obj);
+      }
 
       if (_task_queue->size() <= target_size || has_aborted()) {
         ret = false;
       } else {
         ret = _task_queue->pop_local(obj);

@@ -3946,10 +3951,12 @@
                          _global_transfers_to,_global_transfers_from);
   gclog_or_tty->print_cr("  Regions: claimed = %d", _regions_claimed);
   gclog_or_tty->print_cr("  SATB buffers: processed = %d", _satb_buffers_processed);
   gclog_or_tty->print_cr("  Steals: attempts = %d, successes = %d",
                          _steal_attempts, _steals);
+  gclog_or_tty->print_cr("  Skipped stale humongous queue entries = %d",
+                         _stale_humongous_queue_entries);
   gclog_or_tty->print_cr("  Aborted: %d, due to", _aborted);
   gclog_or_tty->print_cr("    overflow: %d, global abort: %d, yield: %d",
                          _aborted_overflow, _aborted_cm_aborted, _aborted_yield);
   gclog_or_tty->print_cr("    time out: %d, SATB: %d, termination: %d",
                          _aborted_timed_out, _aborted_satb, _aborted_termination);

@@ -4322,13 +4329,17 @@
                                  _worker_id, p2i((void*) obj));
         }
 
         statsOnly( ++_steals );
 
+        if (is_stale_humongous_queue_entry(obj)) {
+          statsOnly( ++stale_humongous_queue_entries );
+        } else {
         assert(_nextMarkBitMap->isMarked((HeapWord*) obj),
                "any stolen object should be marked");
         scan_object(obj);
+        }
 
         // And since we're towards the end, let's totally drain the
         // local queue and global stack.
         drain_local_queue(false);
         drain_global_stack(false);
< prev index next >