]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/aging_collector.cpp
Put brackets around ipv6 addresses in `inet6 present`
[factor.git] / vm / aging_collector.cpp
index 335dbba7deb16514a1a26e91122b41a72bd8b188..c934984e01e304ba99941c0b801dd426c7b0f193 100644 (file)
@@ -41,7 +41,7 @@ void factor_vm::collect_aging() {
   // everything else to the aging semi-space, and reset the nursery pointer.
   {
     // Change the op so that if we fail here, an assertion will be raised.
-    current_gc->op = collect_to_tenured_op;
+    current_gc->op = COLLECT_TO_TENURED_OP;
 
     slot_visitor<from_tenured_refs_copier>
         visitor(this, from_tenured_refs_copier(data->tenured, &mark_stack));
@@ -51,20 +51,24 @@ void factor_vm::collect_aging() {
     if (event)
       event->reset_timer();
     visitor.visit_cards(data->tenured, card_points_to_aging, 0xff);
-    if (event)
-      event->ended_card_scan(visitor.cards_scanned, visitor.decks_scanned);
+    if (event) {
+      event->ended_phase(PHASE_CARD_SCAN);
+      event->cards_scanned += visitor.cards_scanned;
+      event->decks_scanned += visitor.decks_scanned;
+    }
 
     if (event)
       event->reset_timer();
     visitor.visit_code_heap_roots(&code->points_to_aging);
-    if (event)
-      event->ended_code_scan(code->points_to_aging.size());
-
+    if (event) {
+      event->ended_phase(PHASE_CODE_SCAN);
+      event->code_blocks_scanned += code->points_to_aging.size();
+    }
     visitor.visit_mark_stack(&mark_stack);
   }
   {
     // If collection fails here, do a to_tenured collection.
-    current_gc->op = collect_aging_op;
+    current_gc->op = COLLECT_AGING_OP;
 
     std::swap(data->aging, data->aging_semispace);
     data->reset_aging();