void ObjectMemory::collect_mature_finish(STATE, GCData* data) { immix_->collect_finish(data); code_manager_.sweep(); data->global_cache()->prune_unmarked(mark()); prune_handles(data->handles(), data->cached_handles(), NULL); // Have to do this after all things that check for mark bits is // done, as it free()s objects, invalidating mark bits. mark_sweep_->after_marked(); inflated_headers_->deallocate_headers(mark()); #ifdef RBX_GC_DEBUG immix_->verify(data); #endif immix_->sweep(); rotate_mark(); gc_stats.full_collection_count++; if(FinalizerHandler* hdl = state->shared().finalizer_handler()) { hdl->finish_collection(state); } RUBINIUS_GC_END(1); young_autotune(); young_gc_while_marking_ = 0; }
void ObjectMemory::collect_mature(GCData& data) { #ifdef RBX_GC_STATS stats::GCStats::get()->objects_seen.start(); stats::GCStats::get()->collect_mature.start(); #endif // validate_handles(data.handles()); // validate_handles(data.cached_handles()); timer::Running<size_t, 1000000> timer(full_collection_time); collect_mature_now = false; code_manager_.clear_marks(); immix_->reset_stats(); immix_->collect(data); immix_->clean_weakrefs(); code_manager_.sweep(); data.global_cache()->prune_unmarked(mark()); prune_handles(data.handles(), false); prune_handles(data.cached_handles(), false); // Have to do this after all things that check for mark bits is // done, as it free()s objects, invalidating mark bits. mark_sweep_->after_marked(); inflated_headers_->deallocate_headers(mark()); // We no longer need to unmark all, we use the rotating mark instead. // This means that the mark we just set on all reachable objects will // be ignored next time anyway. // // immix_->unmark_all(data); rotate_mark(); full_collections++; #ifdef RBX_GC_STATS stats::GCStats::get()->collect_mature.stop(); stats::GCStats::get()->objects_seen.stop(); #endif }
void ObjectMemory::collect_mature_finish(STATE, GCData* data) { immix_->collect_finish(data); code_manager_.sweep(); data->global_cache()->prune_unmarked(mark()); prune_handles(data->handles(), data->cached_handles(), NULL); // Have to do this after all things that check for mark bits is // done, as it free()s objects, invalidating mark bits. mark_sweep_->after_marked(); inflated_headers_->deallocate_headers(mark()); #ifdef RBX_GC_DEBUG immix_->verify(data); #endif immix_->sweep(); rotate_mark(); metrics::MetricsData& metrics = state->vm()->metrics(); metrics.m.ruby_metrics.gc_immix_count++; metrics.m.ruby_metrics.gc_large_count++; metrics.m.ruby_metrics.memory_immix_bytes = immix_->bytes_allocated(); metrics.m.ruby_metrics.memory_large_bytes = mark_sweep_->allocated_bytes; metrics.m.ruby_metrics.memory_symbols_bytes = shared_.symbols.bytes_used(); metrics.m.ruby_metrics.memory_code_bytes = code_manager_.size(); metrics.m.ruby_metrics.memory_jit_bytes = data->jit_bytes_allocated(); if(FinalizerThread* hdl = state->shared().finalizer_handler()) { hdl->finish_collection(state); } RUBINIUS_GC_END(1); young_autotune(); young_gc_while_marking_ = 0; }
void ObjectMemory::collect_mature(GCData& data) { timer::Running<1000000> timer(gc_stats.total_full_collection_time, gc_stats.last_full_collection_time); collect_mature_now = false; code_manager_.clear_marks(); immix_->reset_stats(); immix_->collect(data); immix_->clean_weakrefs(); code_manager_.sweep(); data.global_cache()->prune_unmarked(mark()); prune_handles(data.handles(), data.cached_handles(), NULL); // Have to do this after all things that check for mark bits is // done, as it free()s objects, invalidating mark bits. mark_sweep_->after_marked(); inflated_headers_->deallocate_headers(mark()); // We no longer need to unmark all, we use the rotating mark instead. // This means that the mark we just set on all reachable objects will // be ignored next time anyway. // // immix_->unmark_all(data); rotate_mark(); gc_stats.full_collection_count++; }