# HG changeset patch # User Merten Sach # Date 1317127079 -7200 # Node ID 98fc8f3761a26a5045f1f9a1c61a2f57cd8f8ece # Parent e7cd1945c9b636127b83394642fee363bc9888a6 Small changes to make SSR & SSR Sequential work diff -r e7cd1945c9b6 -r 98fc8f3761a2 CoreLoop.c --- a/CoreLoop.c Wed Sep 21 16:36:22 2011 +0200 +++ b/CoreLoop.c Tue Sep 27 14:37:59 2011 +0200 @@ -48,11 +48,13 @@ coreLoopThdParams = (ThdParams *)paramsIn; thisCoresIdx = coreLoopThdParams->coreNum; +#ifdef USE_WORK_STEALING gate.gateClosed = FALSE; gate.preGateProgress = 0; gate.waitProgress = 0; gate.exitProgress = 0; _VMSMasterEnv->workStealingGates[ thisCoresIdx ] = (GateStruc*)&gate;//race @startup +#endif //wait until signalled that setup is complete pthread_mutex_lock( &suspendLock ); @@ -75,7 +77,7 @@ errorCode = pthread_setaffinity_np( selfThd, sizeof(coreMask), &coreMask); - if(errorCode){ printf("\nset affinity failure\n"); exit(0); } + if(errorCode){ printf("\nset affinity failure: %d\n", thisCoresIdx); exit(0);} //Save the return address in the SwitchVP function diff -r e7cd1945c9b6 -r 98fc8f3761a2 VMS.c --- a/VMS.c Wed Sep 21 16:36:22 2011 +0200 +++ b/VMS.c Tue Sep 27 14:37:59 2011 +0200 @@ -10,6 +10,7 @@ #include #include #include +#include #include "VMS.h" #include "ProcrContext.h" diff -r e7cd1945c9b6 -r 98fc8f3761a2 VMS.h --- a/VMS.h Wed Sep 21 16:36:22 2011 +0200 +++ b/VMS.h Tue Sep 27 14:37:59 2011 +0200 @@ -413,10 +413,10 @@ #ifdef SSR //SSR -#define SendFromToHistIdx 1 -#define SendOfTypeHistIdx 2 -#define ReceiveFromToHistIdx 3 -#define ReceiveOfTypeHistIdx 4 +#define SendFromToHistIdx 0 +#define SendOfTypeHistIdx 1 +#define ReceiveFromToHistIdx 2 +#define ReceiveOfTypeHistIdx 3 #define MakeTheMeasHists() \ _VMSMasterEnv->measHistsInfo = \ diff -r e7cd1945c9b6 -r 98fc8f3761a2 vmalloc.c --- a/vmalloc.c Wed Sep 21 16:36:22 2011 +0200 +++ b/vmalloc.c Tue Sep 27 14:37:59 2011 +0200 @@ -410,6 +410,7 @@ MallocArrays* freeLists = _VMSMasterEnv->freeLists[procrID]; MallocProlog *chunkToFree = (MallocProlog*)ptrToFree - 1; + assert(chunkToFree->prevChunkInFreeList == NULL); uint32 containerIdx; _VMSMasterEnv->amtOfOutstandingMem += getChunkSize(chunkToFree) + sizeof(MallocProlog); diff -r e7cd1945c9b6 -r 98fc8f3761a2 vmalloc.h --- a/vmalloc.h Wed Sep 21 16:36:22 2011 +0200 +++ b/vmalloc.h Tue Sep 27 14:37:59 2011 +0200 @@ -32,8 +32,15 @@ MallocProlog *nextLowerInMem; }; //MallocProlog - - typedef struct MallocArrays MallocArrays; +typedef struct MallocArrays MallocArrays; + + typedef struct +{ + uintptr_t procrID; + MallocProlog *prevChunkInFreeList; + MallocProlog *nextHigherInMem; + MallocProlog *nextLowerInMem; + } MallocPrologAllocated; struct MallocArrays { @@ -45,16 +52,6 @@ }; //MallocArray - - typedef struct -{ - uintptr_t procrID; - MallocProlog *prevChunkInFreeList; - MallocProlog *nextHigherInMem; - MallocProlog *nextLowerInMem; - } MallocPrologAllocated; - - typedef struct { MallocProlog *firstChunkInFreeList;