CACHEADAPT_GC(true);
//tprintf("Check core status \n");
GC_CHECK_ALL_CORE_STATUS();
- GCPROFILE_ITEM_MASTER();
unsigned long long tmpt = BAMBOO_GET_EXE_TIME();
CACHEADAPT_OUTPUT_CACHE_SAMPLING();
gc_output_cache_policy_time += (BAMBOO_GET_EXE_TIME()-tmpt);
//tprintf("start mark phase\n");
// do mark phase
+ GCPROFILE_ITEM_MASTER();
master_mark(stackptr);
GCPROFILE_ITEM_MASTER();
//tprintf("finish mark phase\n");
}
void pregcprocessing() {
-#if defined(GC_CACHE_ADAPT)&&defined(GC_CACHE_SAMPLING)&&defined(GC_CACHE_ADAPT_POLICY4)
+#if defined(GC_CACHE_ADAPT)&&defined(GC_CACHE_SAMPLING)&&(defined(GC_CACHE_ADAPT_POLICY4)||defined(GC_CACHE_ADAPT_POLICY3))
// disable the timer interrupt
bamboo_mask_timer_intr();
// get the sampling data
}
void postgcprocessing() {
-#if defined(GC_CACHE_ADAPT)&&defined(GC_CACHE_SAMPLING)&&defined(GC_CACHE_ADAPT_POLICY4)
+#if defined(GC_CACHE_ADAPT)&&defined(GC_CACHE_SAMPLING)&&(defined(GC_CACHE_ADAPT_POLICY4)||defined(GC_CACHE_ADAPT_POLICY3))
// enable the timer interrupt
bamboo_tile_timer_set_next_event(GC_TILE_TIMER_EVENT_SETTING);
bamboo_unmask_timer_intr();
// core coordinator routine
if(0 == BAMBOO_NUM_OF_CORE) {
+ GC_PRINTF("start gc! \n");
+ GCPROFILE_START_MASTER();
+
GC_PRINTF("Check if we can do gc or not\n");
gccorestatus[BAMBOO_NUM_OF_CORE] = 0;
pregcprocessing();
;
//pregccheck();
- GCPROFILE_START_MASTER();
- GC_PRINTF("start gc! \n");
gc_master(stackptr);
} else if(BAMBOO_NUM_OF_CORE < NUMCORES4GC) {
GC_PRINTF("Core reporting for gc.\n");