From e70ac30031558cf2ea9c78773e5ff30f173abed4 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Sat, 25 Jun 2011 00:16:36 +0000 Subject: [PATCH] turn off debugging messages....another bug fix --- Robust/src/Runtime/bamboo/multicoregarbage.c | 16 +++++++--------- Robust/src/Runtime/bamboo/multicoregarbage.h | 8 ++++---- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Robust/src/Runtime/bamboo/multicoregarbage.c b/Robust/src/Runtime/bamboo/multicoregarbage.c index dd0788f5..d85eb299 100644 --- a/Robust/src/Runtime/bamboo/multicoregarbage.c +++ b/Robust/src/Runtime/bamboo/multicoregarbage.c @@ -508,15 +508,13 @@ bool gc(struct garbagelist * stackptr) { if(0 == BAMBOO_NUM_OF_CORE) { GC_PRINTF("Check if we can do gc or not\n"); gccorestatus[BAMBOO_NUM_OF_CORE] = 0; - if(!gc_checkCoreStatus()) { - // some of the cores are still executing the mutator and did not reach - // some gc safe point, therefore it is not ready to do gc - gcflag = true; - return false; - } else { - GCPROFILE_START(); - pregccheck(); - } + + //wait for other cores to catch up + while(!gc_checkCoreStatus()) + ; + + GCPROFILE_START(); + pregccheck(); GC_PRINTF("start gc! \n"); pregcprocessing(); gc_master(stackptr); diff --git a/Robust/src/Runtime/bamboo/multicoregarbage.h b/Robust/src/Runtime/bamboo/multicoregarbage.h index cd426c7a..6c0dd8c0 100644 --- a/Robust/src/Runtime/bamboo/multicoregarbage.h +++ b/Robust/src/Runtime/bamboo/multicoregarbage.h @@ -7,11 +7,11 @@ #include "structdefs.h" #include "multicoregcprofile.h" -//#ifdef GC_DEBUG +#ifdef GC_DEBUG #define GC_PRINTF tprintf -//#else -//#define GC_PRINTF if(0) tprintf -//#endif +#else +#define GC_PRINTF if(0) tprintf +#endif #define TR() tprintf("%u\n",__LINE__) -- 2.34.1