Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
changeset 147:98fc8f3761a2 DistributedMalloc2
Small changes to make SSR & SSR Sequential work
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Tue, 27 Sep 2011 14:37:59 +0200 |
| parents | e7cd1945c9b6 |
| children | c4d8060229ef |
| files | CoreLoop.c VMS.c VMS.h vmalloc.c vmalloc.h |
| diffstat | 5 files changed, 18 insertions(+), 17 deletions(-) [+] |
line diff
1.1 --- a/CoreLoop.c Wed Sep 21 16:36:22 2011 +0200 1.2 +++ b/CoreLoop.c Tue Sep 27 14:37:59 2011 +0200 1.3 @@ -48,11 +48,13 @@ 1.4 coreLoopThdParams = (ThdParams *)paramsIn; 1.5 thisCoresIdx = coreLoopThdParams->coreNum; 1.6 1.7 +#ifdef USE_WORK_STEALING 1.8 gate.gateClosed = FALSE; 1.9 gate.preGateProgress = 0; 1.10 gate.waitProgress = 0; 1.11 gate.exitProgress = 0; 1.12 _VMSMasterEnv->workStealingGates[ thisCoresIdx ] = (GateStruc*)&gate;//race @startup 1.13 +#endif 1.14 1.15 //wait until signalled that setup is complete 1.16 pthread_mutex_lock( &suspendLock ); 1.17 @@ -75,7 +77,7 @@ 1.18 errorCode = 1.19 pthread_setaffinity_np( selfThd, sizeof(coreMask), &coreMask); 1.20 1.21 - if(errorCode){ printf("\nset affinity failure\n"); exit(0); } 1.22 + if(errorCode){ printf("\nset affinity failure: %d\n", thisCoresIdx); exit(0);} 1.23 1.24 1.25 //Save the return address in the SwitchVP function
2.1 --- a/VMS.c Wed Sep 21 16:36:22 2011 +0200 2.2 +++ b/VMS.c Tue Sep 27 14:37:59 2011 +0200 2.3 @@ -10,6 +10,7 @@ 2.4 #include <malloc.h> 2.5 #include <inttypes.h> 2.6 #include <sys/time.h> 2.7 +#include <pthread.h> 2.8 2.9 #include "VMS.h" 2.10 #include "ProcrContext.h"
3.1 --- a/VMS.h Wed Sep 21 16:36:22 2011 +0200 3.2 +++ b/VMS.h Tue Sep 27 14:37:59 2011 +0200 3.3 @@ -413,10 +413,10 @@ 3.4 #ifdef SSR 3.5 3.6 //SSR 3.7 -#define SendFromToHistIdx 1 3.8 -#define SendOfTypeHistIdx 2 3.9 -#define ReceiveFromToHistIdx 3 3.10 -#define ReceiveOfTypeHistIdx 4 3.11 +#define SendFromToHistIdx 0 3.12 +#define SendOfTypeHistIdx 1 3.13 +#define ReceiveFromToHistIdx 2 3.14 +#define ReceiveOfTypeHistIdx 3 3.15 3.16 #define MakeTheMeasHists() \ 3.17 _VMSMasterEnv->measHistsInfo = \
4.1 --- a/vmalloc.c Wed Sep 21 16:36:22 2011 +0200 4.2 +++ b/vmalloc.c Tue Sep 27 14:37:59 2011 +0200 4.3 @@ -410,6 +410,7 @@ 4.4 4.5 MallocArrays* freeLists = _VMSMasterEnv->freeLists[procrID]; 4.6 MallocProlog *chunkToFree = (MallocProlog*)ptrToFree - 1; 4.7 + assert(chunkToFree->prevChunkInFreeList == NULL); 4.8 uint32 containerIdx; 4.9 _VMSMasterEnv->amtOfOutstandingMem += getChunkSize(chunkToFree) + sizeof(MallocProlog); 4.10
5.1 --- a/vmalloc.h Wed Sep 21 16:36:22 2011 +0200 5.2 +++ b/vmalloc.h Tue Sep 27 14:37:59 2011 +0200 5.3 @@ -32,8 +32,15 @@ 5.4 MallocProlog *nextLowerInMem; 5.5 }; 5.6 //MallocProlog 5.7 - 5.8 - typedef struct MallocArrays MallocArrays; 5.9 +typedef struct MallocArrays MallocArrays; 5.10 + 5.11 + typedef struct 5.12 +{ 5.13 + uintptr_t procrID; 5.14 + MallocProlog *prevChunkInFreeList; 5.15 + MallocProlog *nextHigherInMem; 5.16 + MallocProlog *nextLowerInMem; 5.17 + } MallocPrologAllocated; 5.18 5.19 struct MallocArrays 5.20 { 5.21 @@ -45,16 +52,6 @@ 5.22 }; 5.23 //MallocArray 5.24 5.25 - 5.26 - typedef struct 5.27 -{ 5.28 - uintptr_t procrID; 5.29 - MallocProlog *prevChunkInFreeList; 5.30 - MallocProlog *nextHigherInMem; 5.31 - MallocProlog *nextLowerInMem; 5.32 - } MallocPrologAllocated; 5.33 - 5.34 - 5.35 typedef struct 5.36 { 5.37 MallocProlog *firstChunkInFreeList;
