コード例 #1
0
ファイル: object_memory.cpp プロジェクト: azazeal/rubinius
  void ObjectMemory::collect_mature(STATE, GCData* data) {
    timer::StopWatch<timer::milliseconds> timerx(
        state->vm()->metrics().m.ruby_metrics.gc_immix_conc_last_ms,
        state->vm()->metrics().m.ruby_metrics.gc_immix_conc_total_ms);

#ifndef RBX_GC_STRESS_MATURE
    collect_mature_now = false;
#endif

    // If we're already collecting, ignore this request
    if(mature_gc_in_progress_) return;
    young_gc_while_marking_ = 0;

    code_manager_.clear_marks();
    clear_fiber_marks(data->threads());

    immix_->reset_stats();

    if(mature_mark_concurrent_) {
      immix_->start_marker(state);
      immix_->collect_start(data);
      mature_gc_in_progress_ = true;
    } else {
      immix_->collect(data);
    }
  }
コード例 #2
0
  void ObjectMemory::collect_mature(STATE, GCData* data) {
    timer::Running<1000000> timer(gc_stats.total_full_stop_collection_time,
                                  gc_stats.last_full_stop_collection_time);
#ifndef RBX_GC_STRESS_MATURE
    collect_mature_now = false;
#endif

    // If we're already collecting, ignore this request
    if(mature_gc_in_progress_) return;
    young_gc_while_marking_ = 0;

    code_manager_.clear_marks();
    clear_fiber_marks(data->threads());

    immix_->reset_stats();

    if(mature_mark_concurrent_) {
      immix_->start_marker(state);
      immix_->collect_start(data);
      mature_gc_in_progress_ = true;
    } else {
      immix_->collect(data);
    }
  }