Esempio n. 1
0
/* 
    gc start sweeping phase
*/
void gc_prepare_sweeping(GC *gc) {
  INFO2("gc.con.info", "Concurrent collection, current collection = " << gc->num_collections );
  /*FIXME: enable finref*/
  if(!IGNORE_FINREF ){ 
    gc_set_obj_with_fin(gc);
    Collector* collector = gc->collectors[0];
    collector_identify_finref(collector);
  #ifndef BUILD_IN_REFERENT
  } else {
    conclctor_set_weakref_sets(gc);
    gc_update_weakref_ignore_finref(gc);
  #endif
  }
  gc_identify_dead_weak_roots(gc);
}
Esempio n. 2
0
void wspace_mostly_con_final_mark( GC *gc ) {

    /*init the root set pool*/
    pool_iterator_init(gc->metadata->gc_rootset_pool);
    /*prepare dirty object*/
    gc_prepare_dirty_set(gc);
    /*new asssign thread may reuse the one just finished in the same phase*/ 
    conclctor_set_weakref_sets(gc);

    /*start final mostly concurrent mark */
   gc_ms_start_mostly_con_final_mark((GC_MS*)gc, mostly_con_final_marker_num);

   mostly_con_mark_terminate_reset();
   gc_mostly_con_update_stat_after_final_marking(gc);
   
   gc_reset_dirty_set(gc);
   gc_clear_rootset(gc);
   gc_prepare_sweeping(gc);
   state_transformation( gc, GC_CON_TRACE_DONE, GC_CON_BEFORE_SWEEP );
}