From: bdemsky Date: Sun, 10 Jul 2011 11:34:24 +0000 (+0000) Subject: add profiling.... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=07636a1c5231602542c7896aed8d223b6e9614c3;p=IRC.git add profiling.... hack memmove loop to speed it up... --- diff --git a/Robust/src/Runtime/bamboo/multicoregarbage.c b/Robust/src/Runtime/bamboo/multicoregarbage.c index 05bb2d8c..2853466c 100644 --- a/Robust/src/Runtime/bamboo/multicoregarbage.c +++ b/Robust/src/Runtime/bamboo/multicoregarbage.c @@ -9,6 +9,9 @@ #include "gcqueue.h" #include "multicoremem_helper.h" #include "bambooalign.h" +#ifdef PERFCOUNT +#include "bme_perf_counter.h" +#endif volatile bool gcflag; gc_status_t gc_status_info; @@ -529,6 +532,9 @@ bool gc(struct garbagelist * stackptr) { gc_status_info.gcprocessing = false; return false; } +#ifdef PERFCOUNT + profile_start(GC_REGION); +#endif // core coordinator routine if(0 == BAMBOO_NUM_OF_CORE) { @@ -553,6 +559,9 @@ bool gc(struct garbagelist * stackptr) { gc_nocollect(stackptr); } postgcprocessing(); +#ifdef PERFCOUNT + profile_start(APP_REGION); +#endif return true; } diff --git a/Robust/src/Runtime/bamboo/multicoregcflush.c b/Robust/src/Runtime/bamboo/multicoregcflush.c index 66b863c3..198b03f8 100644 --- a/Robust/src/Runtime/bamboo/multicoregcflush.c +++ b/Robust/src/Runtime/bamboo/multicoregcflush.c @@ -244,7 +244,63 @@ void * updateblocks(struct moveHelper * orig, struct moveHelper * to) { /* Move the object */ if(origptr < endtoptr&&dstptr < origptr+length) { - memmove(dstptr, origptr, length); + unsigned int *sptr=origptr; + unsigned int *dptr=dstptr; + unsigned int len=length; + //we will never have an object of size 0.... + + do { + //#1 + unsigned int tmpptr0=*sptr; + sptr++; + *dptr=tmpptr0; + dptr++; + + //#2 + tmpptr0=*sptr; + sptr++; + *dptr=tmpptr0; + dptr++; + + //#3 + tmpptr0=*sptr; + sptr++; + *dptr=tmpptr0; + dptr++; + + //#4 + tmpptr0=*sptr; + sptr++; + *dptr=tmpptr0; + dptr++; + + //#5 + tmpptr0=*sptr; + sptr++; + *dptr=tmpptr0; + dptr++; + + //#6 + tmpptr0=*sptr; + sptr++; + *dptr=tmpptr0; + dptr++; + + //#7 + tmpptr0=*sptr; + sptr++; + *dptr=tmpptr0; + dptr++; + + //#8 + tmpptr0=*sptr; + sptr++; + *dptr=tmpptr0; + dptr++; + + len=len-32; + } while(len); + //memmove(dstptr, origptr, length); } else if (origptr!=dstptr) { //no need to copy if the source & dest are equal.... memcpy(dstptr, origptr, length);