From 17f37689ab6f4de3dbab161972ab5912289769b5 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Tue, 28 Jun 2011 09:16:54 +0000 Subject: [PATCH] bug fixes --- Robust/src/Runtime/bamboo/multicoregcmark.c | 33 +++++++++++++-------- Robust/src/Runtime/bamboo/multicoremsg.c | 1 - 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/Robust/src/Runtime/bamboo/multicoregcmark.c b/Robust/src/Runtime/bamboo/multicoregcmark.c index 0c9aa791..b2afaaad 100644 --- a/Robust/src/Runtime/bamboo/multicoregcmark.c +++ b/Robust/src/Runtime/bamboo/multicoregcmark.c @@ -267,21 +267,28 @@ void mark(struct garbagelist * stackptr) { // scan the pointers in object scanPtrsInObj(ptr, type); } - gc_status_info.gcbusystatus = false; - // send mark finish msg to core coordinator - if(STARTUPCORE == BAMBOO_NUM_OF_CORE) { - int entry_index = waitconfirm ? (gcnumsrobjs_index==0) : gcnumsrobjs_index; - gccorestatus[BAMBOO_NUM_OF_CORE] = 0; - gcnumsendobjs[entry_index][BAMBOO_NUM_OF_CORE]=gcself_numsendobjs; - gcnumreceiveobjs[entry_index][BAMBOO_NUM_OF_CORE]=gcself_numreceiveobjs; - } else { - if(!sendStall) { - send_msg_4(STARTUPCORE,GCFINISHMARK,BAMBOO_NUM_OF_CORE,gcself_numsendobjs,gcself_numreceiveobjs); - sendStall = true; + + BAMBOO_ENTER_RUNTIME_MODE_FROM_CLIENT(); + //make sure the queue is still empty...now we have interrupts off, things can't change on us... + + if (!gc_moreItems_I()) { + gc_status_info.gcbusystatus = false; + // send mark finish msg to core coordinator + if(STARTUPCORE == BAMBOO_NUM_OF_CORE) { + int entry_index = waitconfirm ? (gcnumsrobjs_index==0) : gcnumsrobjs_index; + gccorestatus[BAMBOO_NUM_OF_CORE] = 0; + gcnumsendobjs[entry_index][BAMBOO_NUM_OF_CORE]=gcself_numsendobjs; + gcnumreceiveobjs[entry_index][BAMBOO_NUM_OF_CORE]=gcself_numreceiveobjs; + BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME(); + checkMarkStatus(); + } else { + if(!sendStall) { + send_msg_4(STARTUPCORE,GCFINISHMARK,BAMBOO_NUM_OF_CORE,gcself_numsendobjs,gcself_numreceiveobjs); + sendStall = true; + } + BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME(); } } - if(BAMBOO_NUM_OF_CORE == STARTUPCORE) - checkMarkStatus(); } } diff --git a/Robust/src/Runtime/bamboo/multicoremsg.c b/Robust/src/Runtime/bamboo/multicoremsg.c index a8464edb..b17828c6 100644 --- a/Robust/src/Runtime/bamboo/multicoremsg.c +++ b/Robust/src/Runtime/bamboo/multicoremsg.c @@ -578,7 +578,6 @@ INLINE void processmsg_gcfinish_I() { INLINE void processmsg_gcmarkconfirm_I() { BAMBOO_ASSERT(((BAMBOO_NUM_OF_CORE!=STARTUPCORE)&&(BAMBOO_NUM_OF_CORE<=NUMCORESACTIVE-1))); - gc_status_info.gcbusystatus = gc_moreItems_I(); // send response msg, cahce the msg first if(BAMBOO_CHECK_SEND_MODE()) { cache_msg_5_I(STARTUPCORE,GCMARKREPORT,BAMBOO_NUM_OF_CORE,gc_status_info.gcbusystatus,gcself_numsendobjs,gcself_numreceiveobjs); -- 2.34.1