Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VOMP_impls > VOMP__MC_shared_impl
changeset 1:21cf36019f0d tip
Partially converted SSR to VOMP -- start of changes
| author | Some Random Person <seanhalle@yahoo.com> |
|---|---|
| date | Thu, 24 May 2012 08:57:24 -0700 |
| parents | b311282ec174 |
| children | |
| files | Measurement/VOMP_Counter_Recording.c Measurement/VOMP_Counter_Recording.h Measurement/VOMP_Measurement.h VOMP.c VOMP.h VOMP_PluginFns.c VOMP_Request_Handlers.c VOMP_Request_Handlers.h |
| diffstat | 8 files changed, 248 insertions(+), 263 deletions(-) [+] |
line diff
1.1 --- a/Measurement/VOMP_Counter_Recording.c Sun May 20 22:07:52 2012 -0700 1.2 +++ b/Measurement/VOMP_Counter_Recording.c Thu May 24 08:57:24 2012 -0700 1.3 @@ -3,14 +3,14 @@ 1.4 * author: Nina Engelhardt 1.5 */ 1.6 1.7 -#include "SSR_Counter_Recording.h" 1.8 +#include "VOMP_Counter_Recording.h" 1.9 #include "VMS_impl/VMS.h" 1.10 -#include "SSR.h" 1.11 +#include "VOMP.h" 1.12 1.13 #ifdef HOLISTIC__TURN_ON_PERF_COUNTERS 1.14 1.15 -void SSR__init_counter_data_structs(){ 1.16 - SSRSemEnv *semanticEnv = _VMSMasterEnv->semanticEnv; 1.17 +void VOMP__init_counter_data_structs(){ 1.18 + VOMPSemEnv *semanticEnv = _VMSMasterEnv->semanticEnv; 1.19 int i; 1.20 for(i=0;i<NUM_CORES;i++){ 1.21 semanticEnv->counterList[i] = makeListOfArrays(sizeof(CounterEvent), 128); 1.22 @@ -28,7 +28,7 @@ 1.23 list->next_free_index++; 1.24 } 1.25 1.26 -void SSR__counter_handler(int evt_type, int vpid, int task, SlaveVP* pr, uint64 cycles, uint64 instrs) 1.27 +void VOMP__counter_handler(int evt_type, int vpid, int task, SlaveVP* pr, uint64 cycles, uint64 instrs) 1.28 { 1.29 1.30 if (pr->typeOfVP == Master || pr->typeOfVP == Shutdown) 1.31 @@ -36,7 +36,7 @@ 1.32 return; 1.33 } 1.34 1.35 - SSRSemEnv *semanticEnv = _VMSMasterEnv->semanticEnv; 1.36 + VOMPSemEnv *semanticEnv = _VMSMasterEnv->semanticEnv; 1.37 1.38 CounterEvent e; 1.39 e.event_type = evt_type;
2.1 --- a/Measurement/VOMP_Counter_Recording.h Sun May 20 22:07:52 2012 -0700 2.2 +++ b/Measurement/VOMP_Counter_Recording.h Thu May 24 08:57:24 2012 -0700 2.3 @@ -1,12 +1,12 @@ 2.4 /* 2.5 - * File: SSR_Counter_Recording.h 2.6 + * File: VOMP_Counter_Recording.h 2.7 * Author: nengel 2.8 * 2.9 * Created on January 11, 2012, 3:03 PM 2.10 */ 2.11 2.12 -#ifndef SSR_COUNTER_RECORDING_H 2.13 -#define SSR_COUNTER_RECORDING_H 2.14 +#ifndef VOMP_COUNTER_RECORDING_H 2.15 +#define VOMP_COUNTER_RECORDING_H 2.16 2.17 #include "VMS_impl/VMS.h" 2.18 2.19 @@ -22,12 +22,12 @@ 2.20 2.21 FILE* counterfile; 2.22 2.23 -void SSR__init_counter_data_structs(); 2.24 +void VOMP__init_counter_data_structs(); 2.25 2.26 -void SSR__counter_handler(int evt_type, int vpid, int task, SlaveVP* pr, uint64 cycles, uint64 instrs); 2.27 +void VOMP__counter_handler(int evt_type, int vpid, int task, SlaveVP* pr, uint64 cycles, uint64 instrs); 2.28 2.29 void set_counter_file(FILE* f); 2.30 2.31 void print_counter_events_to_file(void* _e); 2.32 -#endif /* SSR_COUNTER_RECORDING_H */ 2.33 +#endif /* VOMP_COUNTER_RECORDING_H */ 2.34
3.1 --- a/Measurement/VOMP_Measurement.h Sun May 20 22:07:52 2012 -0700 3.2 +++ b/Measurement/VOMP_Measurement.h Thu May 24 08:57:24 2012 -0700 3.3 @@ -6,8 +6,8 @@ 3.4 * 3.5 */ 3.6 3.7 -#ifndef _SSR_MEAS_H 3.8 -#define _SSR_MEAS_H 3.9 +#ifndef _VOMP_MEAS_H 3.10 +#define _VOMP_MEAS_H 3.11 3.12 3.13 #ifdef MEAS__TURN_ON_LANG_MEAS
4.1 --- a/VOMP.c Sun May 20 22:07:52 2012 -0700 4.2 +++ b/VOMP.c Thu May 24 08:57:24 2012 -0700 4.3 @@ -11,34 +11,19 @@ 4.4 #include "Queue_impl/PrivateQueue.h" 4.5 #include "Hash_impl/PrivateHash.h" 4.6 4.7 -#include "SSR.h" 4.8 -#include "SSR_Counter_Recording.h" 4.9 +#include "VOMP.h" 4.10 +#include "VOMP_Counter_Recording.h" 4.11 4.12 //========================================================================== 4.13 4.14 void 4.15 -SSR__init(); 4.16 +VOMP__init(); 4.17 4.18 void 4.19 -SSR__init_Helper(); 4.20 +VOMP__init_Helper(); 4.21 //========================================================================== 4.22 4.23 4.24 -/*TODO: Q: dealing with library f()s and DKU vs WT vs FoR 4.25 - * (still want to do FoR, with time-lines as syntax, could be super cool) 4.26 - * A: thinking pin the coreCtlrs for all of BLIS -- let Master arbitrate 4.27 - * among library, DKU, WT, FoR -- all the patterns in terms of virtual 4.28 - * processors (or equivalently work-units), so Master picks which virt procr 4.29 - * from which portions of app (DKU, WT, FoR) onto which anim slots 4.30 - *Might even do hierarchy of masters -- group of anim slots for each core 4.31 - * has its own master, that keeps generated work local 4.32 - * single-reader-single-writer sync everywhere -- no atomic primitives 4.33 - * Might have the different assigners talk to each other, to negotiate 4.34 - * larger-grain sharing of resources, according to predicted critical 4.35 - * path, and expansion of work 4.36 - */ 4.37 - 4.38 - 4.39 4.40 //=========================================================================== 4.41 4.42 @@ -46,25 +31,25 @@ 4.43 /*These are the library functions *called in the application* 4.44 * 4.45 *There's a pattern for the outside sequential code to interact with the 4.46 - * VMS_HW code. 4.47 - *The VMS_HW system is inside a boundary.. every SSR system is in its 4.48 + * language code. 4.49 + *The language system is inside a boundary.. every VOMP application is in its 4.50 * own directory that contains the functions for each of the processor types. 4.51 * One of the processor types is the "seed" processor that starts the 4.52 * cascade of creating all the processors that do the work. 4.53 *So, in the directory is a file called "EntryPoint.c" that contains the 4.54 * function, named appropriately to the work performed, that the outside 4.55 * sequential code calls. This function follows a pattern: 4.56 - *1) it calls SSR__init() 4.57 + *1) it calls VOMP__init() 4.58 *2) it creates the initial data for the seed processor, which is passed 4.59 * in to the function 4.60 - *3) it creates the seed SSR processor, with the data to start it with. 4.61 - *4) it calls startSSRThenWaitUntilWorkDone 4.62 + *3) it creates the seed VOMP processor, with the data to start it with. 4.63 + *4) it calls startVOMPThenWaitUntilWorkDone 4.64 *5) it gets the returnValue from the transfer struc and returns that 4.65 * from the function 4.66 * 4.67 - *For now, a new SSR system has to be created via SSR__init every 4.68 + *For now, a new VOMP system has to be created via VOMP__init every 4.69 * time an entry point function is called -- later, might add letting the 4.70 - * SSR system be created once, and let all the entry points just reuse 4.71 + * VOMP system be created once, and let all the entry points just reuse 4.72 * it -- want to be as simple as possible now, and see by using what makes 4.73 * sense for later.. 4.74 */ 4.75 @@ -87,41 +72,41 @@ 4.76 * any of the data reachable from initData passed in to here 4.77 */ 4.78 void 4.79 -SSR__create_seed_procr_and_do_work( TopLevelFnPtr fnPtr, void *initData ) 4.80 - { SSRSemEnv *semEnv; 4.81 +VOMP__create_seed_procr_and_do_work( TopLevelFnPtr fnPtr, void *initData ) 4.82 + { VOMPSemEnv *semEnv; 4.83 SlaveVP *seedPr; 4.84 4.85 - SSR__init(); //normal multi-thd 4.86 + VOMP__init(); //normal multi-thd 4.87 4.88 semEnv = _VMSMasterEnv->semanticEnv; 4.89 4.90 - //SSR starts with one processor, which is put into initial environ, 4.91 + //VOMP starts with one processor, which is put into initial environ, 4.92 // and which then calls create() to create more, thereby expanding work 4.93 - seedPr = SSR__create_procr_helper( fnPtr, initData, 4.94 + seedPr = VOMP__create_procr_helper( fnPtr, initData, 4.95 semEnv, semEnv->nextCoreToGetNewPr++ ); 4.96 4.97 resume_slaveVP( seedPr, semEnv ); 4.98 4.99 VMS_SS__start_the_work_then_wait_until_done(); //normal multi-thd 4.100 4.101 - SSR__cleanup_after_shutdown(); 4.102 + VOMP__cleanup_after_shutdown(); 4.103 } 4.104 4.105 4.106 int32 4.107 -SSR__giveMinWorkUnitCycles( float32 percentOverhead ) 4.108 +VOMP__giveMinWorkUnitCycles( float32 percentOverhead ) 4.109 { 4.110 return MIN_WORK_UNIT_CYCLES; 4.111 } 4.112 4.113 int32 4.114 -SSR__giveIdealNumWorkUnits() 4.115 +VOMP__giveIdealNumWorkUnits() 4.116 { 4.117 return NUM_ANIM_SLOTS * NUM_CORES; 4.118 } 4.119 4.120 int32 4.121 -SSR__give_number_of_cores_to_schedule_onto() 4.122 +VOMP__give_number_of_cores_to_schedule_onto() 4.123 { 4.124 return NUM_CORES; 4.125 } 4.126 @@ -130,8 +115,8 @@ 4.127 * saves jump point, and second jumps back several times to get reliable time 4.128 */ 4.129 void 4.130 -SSR__start_primitive() 4.131 - { saveLowTimeStampCountInto( ((SSRSemEnv *)(_VMSMasterEnv->semanticEnv))-> 4.132 +VOMP__start_primitive() 4.133 + { saveLowTimeStampCountInto( ((VOMPSemEnv *)(_VMSMasterEnv->semanticEnv))-> 4.134 primitiveStartTime ); 4.135 } 4.136 4.137 @@ -141,17 +126,17 @@ 4.138 * also to throw out any "weird" values due to OS interrupt or TSC rollover 4.139 */ 4.140 int32 4.141 -SSR__end_primitive_and_give_cycles() 4.142 +VOMP__end_primitive_and_give_cycles() 4.143 { int32 endTime, startTime; 4.144 //TODO: fix by repeating time-measurement 4.145 saveLowTimeStampCountInto( endTime ); 4.146 - startTime =((SSRSemEnv*)(_VMSMasterEnv->semanticEnv))->primitiveStartTime; 4.147 + startTime =((VOMPSemEnv*)(_VMSMasterEnv->semanticEnv))->primitiveStartTime; 4.148 return (endTime - startTime); 4.149 } 4.150 4.151 //=========================================================================== 4.152 4.153 -/*Initializes all the data-structures for a SSR system -- but doesn't 4.154 +/*Initializes all the data-structures for a VOMP system -- but doesn't 4.155 * start it running yet! 4.156 * 4.157 *This runs in the main thread -- before VMS starts up 4.158 @@ -162,13 +147,13 @@ 4.159 * for creating the seed processor and then starting the work. 4.160 */ 4.161 void 4.162 -SSR__init() 4.163 +VOMP__init() 4.164 { 4.165 VMS_SS__init(); 4.166 //masterEnv, a global var, now is partially set up by init_VMS 4.167 // after this, have VMS_int__malloc and VMS_int__free available 4.168 4.169 - SSR__init_Helper(); 4.170 + VOMP__init_Helper(); 4.171 } 4.172 4.173 4.174 @@ -179,25 +164,25 @@ 4.175 } 4.176 4.177 void 4.178 -SSR__init_Helper() 4.179 - { SSRSemEnv *semanticEnv; 4.180 +VOMP__init_Helper() 4.181 + { VOMPSemEnv *semanticEnv; 4.182 PrivQueueStruc **readyVPQs; 4.183 int coreIdx, i, j; 4.184 4.185 //Hook up the semantic layer's plug-ins to the Master virt procr 4.186 - _VMSMasterEnv->requestHandler = &SSR__Request_Handler; 4.187 - _VMSMasterEnv->slaveAssigner = &SSR__assign_slaveVP_to_slot; 4.188 + _VMSMasterEnv->requestHandler = &VOMP__Request_Handler; 4.189 + _VMSMasterEnv->slaveAssigner = &VOMP__assign_slaveVP_to_slot; 4.190 #ifdef HOLISTIC__TURN_ON_PERF_COUNTERS 4.191 - _VMSMasterEnv->counterHandler = &SSR__counter_handler; 4.192 + _VMSMasterEnv->counterHandler = &VOMP__counter_handler; 4.193 #endif 4.194 4.195 //create the semantic layer's environment (all its data) and add to 4.196 // the master environment 4.197 - semanticEnv = VMS_int__malloc( sizeof( SSRSemEnv ) ); 4.198 + semanticEnv = VMS_int__malloc( sizeof( VOMPSemEnv ) ); 4.199 _VMSMasterEnv->semanticEnv = semanticEnv; 4.200 4.201 #ifdef HOLISTIC__TURN_ON_PERF_COUNTERS 4.202 - SSR__init_counter_data_structs(); 4.203 + VOMP__init_counter_data_structs(); 4.204 #endif 4.205 semanticEnv->shutdownInitiated = FALSE; 4.206 for(i=0;i<NUM_CORES;++i){ 4.207 @@ -250,11 +235,11 @@ 4.208 } 4.209 4.210 4.211 -/*Frees any memory allocated by SSR__init() then calls VMS_int__shutdown 4.212 +/*Frees any memory allocated by VOMP__init() then calls VMS_int__shutdown 4.213 */ 4.214 void 4.215 -SSR__cleanup_after_shutdown() 4.216 - { SSRSemEnv *semanticEnv; 4.217 +VOMP__cleanup_after_shutdown() 4.218 + { VOMPSemEnv *semanticEnv; 4.219 4.220 semanticEnv = _VMSMasterEnv->semanticEnv; 4.221 4.222 @@ -390,9 +375,9 @@ 4.223 /* 4.224 */ 4.225 SlaveVP * 4.226 -SSR__create_procr_with( TopLevelFnPtr fnPtr, void *initData, 4.227 +VOMP__create_procr_with( TopLevelFnPtr fnPtr, void *initData, 4.228 SlaveVP *creatingPr ) 4.229 - { SSRSemReq reqData; 4.230 + { VOMPSemReq reqData; 4.231 4.232 //the semantic request data is on the stack and disappears when this 4.233 // call returns -- it's guaranteed to remain in the VP's stack for as 4.234 @@ -409,9 +394,9 @@ 4.235 } 4.236 4.237 SlaveVP * 4.238 -SSR__create_procr_with_affinity( TopLevelFnPtr fnPtr, void *initData, 4.239 +VOMP__create_procr_with_affinity( TopLevelFnPtr fnPtr, void *initData, 4.240 SlaveVP *creatingPr, int32 coreToAssignOnto ) 4.241 - { SSRSemReq reqData; 4.242 + { VOMPSemReq reqData; 4.243 4.244 //the semantic request data is on the stack and disappears when this 4.245 // call returns -- it's guaranteed to remain in the VP's stack for as 4.246 @@ -429,7 +414,7 @@ 4.247 4.248 4.249 void 4.250 -SSR__dissipate_procr( SlaveVP *procrToDissipate ) 4.251 +VOMP__dissipate_procr( SlaveVP *procrToDissipate ) 4.252 { 4.253 VMS_WL__send_dissipate_req( procrToDissipate ); 4.254 } 4.255 @@ -438,8 +423,8 @@ 4.256 //=========================================================================== 4.257 4.258 void * 4.259 -SSR__malloc_to( int32 sizeToMalloc, SlaveVP *owningPr ) 4.260 - { SSRSemReq reqData; 4.261 +VOMP__malloc_to( int32 sizeToMalloc, SlaveVP *owningPr ) 4.262 + { VOMPSemReq reqData; 4.263 4.264 reqData.reqType = malloc_req; 4.265 reqData.sendPr = owningPr; 4.266 @@ -454,8 +439,8 @@ 4.267 /*Sends request to Master, which does the work of freeing 4.268 */ 4.269 void 4.270 -SSR__free( void *ptrToFree, SlaveVP *owningPr ) 4.271 - { SSRSemReq reqData; 4.272 +VOMP__free( void *ptrToFree, SlaveVP *owningPr ) 4.273 + { VOMPSemReq reqData; 4.274 4.275 reqData.reqType = free_req; 4.276 reqData.sendPr = owningPr; 4.277 @@ -466,7 +451,7 @@ 4.278 4.279 4.280 void 4.281 -SSR__transfer_ownership_of_from_to( void *data, SlaveVP *oldOwnerSlv, 4.282 +VOMP__transfer_ownership_of_from_to( void *data, SlaveVP *oldOwnerSlv, 4.283 SlaveVP *newOwnerPr ) 4.284 { 4.285 //TODO: put in the ownership system that automatically frees when no 4.286 @@ -476,21 +461,21 @@ 4.287 4.288 4.289 void 4.290 -SSR__add_ownership_by_to( SlaveVP *newOwnerSlv, void *data ) 4.291 +VOMP__add_ownership_by_to( SlaveVP *newOwnerSlv, void *data ) 4.292 { 4.293 4.294 } 4.295 4.296 4.297 void 4.298 -SSR__remove_ownership_by_from( SlaveVP *loserSlv, void *dataLosing ) 4.299 +VOMP__remove_ownership_by_from( SlaveVP *loserSlv, void *dataLosing ) 4.300 { 4.301 4.302 } 4.303 4.304 4.305 -/*Causes the SSR system to remove internal ownership, so data won't be 4.306 - * freed when SSR shuts down, and will persist in the external program. 4.307 +/*Causes the VOMP system to remove internal ownership, so data won't be 4.308 + * freed when VOMP shuts down, and will persist in the external program. 4.309 * 4.310 *Must be called from the processor that currently owns the data. 4.311 * 4.312 @@ -506,7 +491,7 @@ 4.313 * this function as no longer owner, and return -- done. 4.314 */ 4.315 void 4.316 -SSR__transfer_ownership_to_outside( void *data ) 4.317 +VOMP__transfer_ownership_to_outside( void *data ) 4.318 { 4.319 //TODO: removeAllOwnersFrom( data ); 4.320 } 4.321 @@ -515,9 +500,9 @@ 4.322 //=========================================================================== 4.323 4.324 void 4.325 -SSR__send_of_type_to( SlaveVP *sendPr, void *msg, const int type, 4.326 +VOMP__send_of_type_to( SlaveVP *sendPr, void *msg, const int type, 4.327 SlaveVP *receivePr) 4.328 - { SSRSemReq reqData; 4.329 + { VOMPSemReq reqData; 4.330 4.331 reqData.receivePr = receivePr; 4.332 reqData.sendPr = sendPr; 4.333 @@ -537,8 +522,8 @@ 4.334 } 4.335 4.336 void 4.337 -SSR__send_from_to( void *msg, SlaveVP *sendPr, SlaveVP *receivePr ) 4.338 - { SSRSemReq reqData; 4.339 +VOMP__send_from_to( void *msg, SlaveVP *sendPr, SlaveVP *receivePr ) 4.340 + { VOMPSemReq reqData; 4.341 4.342 //hash on the receiver, 'cause always know it, but sometimes want to 4.343 // receive from anonymous sender 4.344 @@ -556,15 +541,15 @@ 4.345 //=========================================================================== 4.346 4.347 void * 4.348 -SSR__receive_any_to( SlaveVP *receivePr ) 4.349 +VOMP__receive_any_to( SlaveVP *receivePr ) 4.350 { 4.351 4.352 } 4.353 4.354 void * 4.355 -SSR__receive_type_to( const int type, SlaveVP *receivePr ) 4.356 +VOMP__receive_type_to( const int type, SlaveVP *receivePr ) 4.357 { DEBUG__printf1(dbgRqstHdlr,"WL: receive type to: %d", receivePr->slaveID); 4.358 - SSRSemReq reqData; 4.359 + VOMPSemReq reqData; 4.360 4.361 reqData.receivePr = receivePr; 4.362 reqData.reqType = receive_type; 4.363 @@ -585,9 +570,9 @@ 4.364 * loc structure can only be modified by itself. 4.365 */ 4.366 void * 4.367 -SSR__receive_from_to( SlaveVP *sendPr, SlaveVP *receivePr ) 4.368 +VOMP__receive_from_to( SlaveVP *sendPr, SlaveVP *receivePr ) 4.369 { DEBUG__printf2(dbgRqstHdlr,"WL: receive from %d to: %d", sendPr->slaveID, receivePr->slaveID); 4.370 - SSRSemReq reqData; 4.371 + VOMPSemReq reqData; 4.372 4.373 //hash on the receiver, 'cause always know it, but sometimes want to 4.374 // receive from anonymous sender 4.375 @@ -616,16 +601,16 @@ 4.376 */ 4.377 4.378 /*asm function declarations*/ 4.379 -void asm_save_ret_to_singleton(SSRSingleton *singletonPtrAddr); 4.380 -void asm_write_ret_from_singleton(SSRSingleton *singletonPtrAddr); 4.381 +void asm_save_ret_to_singleton(VOMPSingleton *singletonPtrAddr); 4.382 +void asm_write_ret_from_singleton(VOMPSingleton *singletonPtrAddr); 4.383 4.384 /*Fn singleton uses ID as index into array of singleton structs held in the 4.385 * semantic environment. 4.386 */ 4.387 void 4.388 -SSR__start_fn_singleton( int32 singletonID, SlaveVP *animPr ) 4.389 +VOMP__start_fn_singleton( int32 singletonID, SlaveVP *animPr ) 4.390 { 4.391 - SSRSemReq reqData; 4.392 + VOMPSemReq reqData; 4.393 4.394 // 4.395 reqData.reqType = singleton_fn_start; 4.396 @@ -634,7 +619,7 @@ 4.397 VMS_WL__send_sem_request( &reqData, animPr ); 4.398 if( animPr->dataRetFromReq ) //will be 0 or addr of label in end singleton 4.399 { 4.400 - SSRSemEnv *semEnv = VMS_int__give_sem_env_for( animPr ); 4.401 + VOMPSemEnv *semEnv = VMS_int__give_sem_env_for( animPr ); 4.402 asm_write_ret_from_singleton(&(semEnv->fnSingletons[ singletonID])); 4.403 } 4.404 } 4.405 @@ -644,9 +629,9 @@ 4.406 * location. 4.407 */ 4.408 void 4.409 -SSR__start_data_singleton( SSRSingleton **singletonAddr, SlaveVP *animPr ) 4.410 +VOMP__start_data_singleton( VOMPSingleton **singletonAddr, SlaveVP *animPr ) 4.411 { 4.412 - SSRSemReq reqData; 4.413 + VOMPSemReq reqData; 4.414 4.415 if( *singletonAddr && (*singletonAddr)->hasFinished ) 4.416 goto JmpToEndSingleton; 4.417 @@ -673,13 +658,13 @@ 4.418 * inside is shared by all invocations of a given singleton ID. 4.419 */ 4.420 void 4.421 -SSR__end_fn_singleton( int32 singletonID, SlaveVP *animPr ) 4.422 +VOMP__end_fn_singleton( int32 singletonID, SlaveVP *animPr ) 4.423 { 4.424 - SSRSemReq reqData; 4.425 + VOMPSemReq reqData; 4.426 4.427 //don't need this addr until after at least one singleton has reached 4.428 // this function 4.429 - SSRSemEnv *semEnv = VMS_int__give_sem_env_for( animPr ); 4.430 + VOMPSemEnv *semEnv = VMS_int__give_sem_env_for( animPr ); 4.431 asm_write_ret_from_singleton(&(semEnv->fnSingletons[ singletonID])); 4.432 4.433 reqData.reqType = singleton_fn_end; 4.434 @@ -692,9 +677,9 @@ 4.435 } 4.436 4.437 void 4.438 -SSR__end_data_singleton( SSRSingleton **singletonPtrAddr, SlaveVP *animPr ) 4.439 +VOMP__end_data_singleton( VOMPSingleton **singletonPtrAddr, SlaveVP *animPr ) 4.440 { 4.441 - SSRSemReq reqData; 4.442 + VOMPSemReq reqData; 4.443 4.444 //don't need this addr until after singleton struct has reached 4.445 // this function for first time 4.446 @@ -724,10 +709,10 @@ 4.447 * between as work-code. 4.448 */ 4.449 void 4.450 -SSR__animate_short_fn_in_isolation( PtrToAtomicFn ptrToFnToExecInMaster, 4.451 +VOMP__animate_short_fn_in_isolation( PtrToAtomicFn ptrToFnToExecInMaster, 4.452 void *data, SlaveVP *animPr ) 4.453 { 4.454 - SSRSemReq reqData; 4.455 + VOMPSemReq reqData; 4.456 4.457 // 4.458 reqData.reqType = atomic; 4.459 @@ -752,9 +737,9 @@ 4.460 *If NULL, then write requesting into the field and resume. 4.461 */ 4.462 void 4.463 -SSR__start_transaction( int32 transactionID, SlaveVP *animPr ) 4.464 +VOMP__start_transaction( int32 transactionID, SlaveVP *animPr ) 4.465 { 4.466 - SSRSemReq reqData; 4.467 + VOMPSemReq reqData; 4.468 4.469 // 4.470 reqData.sendPr = animPr; 4.471 @@ -774,9 +759,9 @@ 4.472 * resumes both. 4.473 */ 4.474 void 4.475 -SSR__end_transaction( int32 transactionID, SlaveVP *animPr ) 4.476 +VOMP__end_transaction( int32 transactionID, SlaveVP *animPr ) 4.477 { 4.478 - SSRSemReq reqData; 4.479 + VOMPSemReq reqData; 4.480 4.481 // 4.482 reqData.sendPr = animPr;
5.1 --- a/VOMP.h Sun May 20 22:07:52 2012 -0700 5.2 +++ b/VOMP.h Thu May 24 08:57:24 2012 -0700 5.3 @@ -6,8 +6,8 @@ 5.4 * 5.5 */ 5.6 5.7 -#ifndef _SSR_H 5.8 -#define _SSR_H 5.9 +#ifndef _VOMP_H 5.10 +#define _VOMP_H 5.11 5.12 #include "Queue_impl/PrivateQueue.h" 5.13 #include "Hash_impl/PrivateHash.h" 5.14 @@ -21,14 +21,14 @@ 5.15 //This is hardware dependent -- it's the number of cycles of scheduling 5.16 // overhead -- if a work unit is fewer than this, it is better being 5.17 // combined sequentially with other work 5.18 - //This value depends on both VMS overhead and SSR's plugin. At some point 5.19 - // it will be derived by perf-counter measurements during init of SSR 5.20 + //This value depends on both VMS overhead and VOMP's plugin. At some point 5.21 + // it will be derived by perf-counter measurements during init of VOMP 5.22 #define MIN_WORK_UNIT_CYCLES 20000 5.23 5.24 //=========================================================================== 5.25 -/*This header defines everything specific to the SSR semantic plug-in 5.26 +/*This header defines everything specific to the VOMP semantic plug-in 5.27 */ 5.28 -typedef struct _SSRSemReq SSRSemReq; 5.29 +typedef struct _VOMPSemReq VOMPSemReq; 5.30 typedef void (*PtrToAtomicFn ) ( void * ); //executed atomically in master 5.31 //=========================================================================== 5.32 5.33 @@ -41,7 +41,7 @@ 5.34 SlaveVP *VPCurrentlyExecuting; 5.35 PrivQueueStruc *waitingVPQ; 5.36 } 5.37 -SSRTrans; 5.38 +VOMPTrans; 5.39 5.40 /*WARNING: assembly hard-codes position of endInstrAddr as first field 5.41 */ 5.42 @@ -52,9 +52,9 @@ 5.43 int32 hasFinished; 5.44 PrivQueueStruc *waitQ; 5.45 } 5.46 -SSRSingleton; 5.47 +VOMPSingleton; 5.48 5.49 -enum SSRReqType 5.50 +enum VOMPReqType 5.51 { 5.52 send_type = 1, 5.53 send_from_to, 5.54 @@ -74,13 +74,13 @@ 5.55 trans_end 5.56 }; 5.57 5.58 -struct _SSRSemReq 5.59 - { enum SSRReqType reqType; 5.60 +struct _VOMPSemReq 5.61 + { enum VOMPReqType reqType; 5.62 SlaveVP *sendPr; 5.63 SlaveVP *receivePr; 5.64 int32 msgType; 5.65 void *msg; 5.66 - SSRSemReq *nextReqInHashEntry; 5.67 + VOMPSemReq *nextReqInHashEntry; 5.68 5.69 void *initData; 5.70 TopLevelFnPtr fnPtr; 5.71 @@ -90,14 +90,14 @@ 5.72 void *ptrToFree; 5.73 5.74 int32 singletonID; 5.75 - SSRSingleton **singletonPtrAddr; 5.76 + VOMPSingleton **singletonPtrAddr; 5.77 5.78 PtrToAtomicFn fnToExecInMaster; 5.79 void *dataForFn; 5.80 5.81 int32 transID; 5.82 } 5.83 -/* SSRSemReq */; 5.84 +/* VOMPSemReq */; 5.85 5.86 5.87 typedef struct 5.88 @@ -109,8 +109,8 @@ 5.89 int32 primitiveStartTime; 5.90 5.91 //fix limit on num with dynArray 5.92 - SSRSingleton fnSingletons[NUM_STRUCS_IN_SEM_ENV]; 5.93 - SSRTrans transactionStrucs[NUM_STRUCS_IN_SEM_ENV]; 5.94 + VOMPSingleton fnSingletons[NUM_STRUCS_IN_SEM_ENV]; 5.95 + VOMPTrans transactionStrucs[NUM_STRUCS_IN_SEM_ENV]; 5.96 5.97 #ifdef HOLISTIC__TURN_ON_OBSERVE_UCC 5.98 ListOfArrays* unitList; 5.99 @@ -129,7 +129,7 @@ 5.100 SlaveVP* idlePr[NUM_CORES][NUM_ANIM_SLOTS]; 5.101 int shutdownInitiated; 5.102 } 5.103 -SSRSemEnv; 5.104 +VOMPSemEnv; 5.105 5.106 5.107 typedef struct _TransListElem TransListElem; 5.108 @@ -145,124 +145,124 @@ 5.109 int32 highestTransEntered; 5.110 TransListElem *lastTransEntered; 5.111 } 5.112 -SSRSemData; 5.113 +VOMPSemData; 5.114 5.115 //=========================================================================== 5.116 5.117 void 5.118 -SSR__create_seed_procr_and_do_work( TopLevelFnPtr fn, void *initData ); 5.119 +VOMP__create_seed_procr_and_do_work( TopLevelFnPtr fn, void *initData ); 5.120 5.121 int32 5.122 -SSR__giveMinWorkUnitCycles( float32 percentOverhead ); 5.123 +VOMP__giveMinWorkUnitCycles( float32 percentOverhead ); 5.124 5.125 void 5.126 -SSR__start_primitive(); 5.127 +VOMP__start_primitive(); 5.128 5.129 int32 5.130 -SSR__end_primitive_and_give_cycles(); 5.131 +VOMP__end_primitive_and_give_cycles(); 5.132 5.133 int32 5.134 -SSR__giveIdealNumWorkUnits(); 5.135 +VOMP__giveIdealNumWorkUnits(); 5.136 5.137 int32 5.138 -SSR__give_number_of_cores_to_schedule_onto(); 5.139 +VOMP__give_number_of_cores_to_schedule_onto(); 5.140 5.141 //======================= 5.142 5.143 void 5.144 -SSR__init(); 5.145 +VOMP__init(); 5.146 5.147 void 5.148 -SSR__cleanup_after_shutdown(); 5.149 +VOMP__cleanup_after_shutdown(); 5.150 5.151 //======================= 5.152 5.153 SlaveVP * 5.154 -SSR__create_procr_with( TopLevelFnPtr fnPtr, void *initData, 5.155 +VOMP__create_procr_with( TopLevelFnPtr fnPtr, void *initData, 5.156 SlaveVP *creatingSlv ); 5.157 5.158 SlaveVP * 5.159 -SSR__create_procr_with_affinity( TopLevelFnPtr fnPtr, void *initData, 5.160 +VOMP__create_procr_with_affinity( TopLevelFnPtr fnPtr, void *initData, 5.161 SlaveVP *creatingPr, int32 coreToAssignOnto); 5.162 5.163 void 5.164 -SSR__dissipate_procr( SlaveVP *procrToDissipate ); 5.165 +VOMP__dissipate_procr( SlaveVP *procrToDissipate ); 5.166 5.167 //======================= 5.168 void * 5.169 -SSR__malloc_to( int numBytes, SlaveVP *ownerSlv ); 5.170 +VOMP__malloc_to( int numBytes, SlaveVP *ownerSlv ); 5.171 5.172 void 5.173 -SSR__free( void *ptrToFree, SlaveVP *owningSlv ); 5.174 +VOMP__free( void *ptrToFree, SlaveVP *owningSlv ); 5.175 5.176 void 5.177 -SSR__transfer_ownership_of_from_to( void *data, SlaveVP *oldOwnerPr, 5.178 +VOMP__transfer_ownership_of_from_to( void *data, SlaveVP *oldOwnerPr, 5.179 SlaveVP *newOwnerSlv ); 5.180 5.181 void 5.182 -SSR__add_ownership_by_to( SlaveVP *newOwnerPr, void *data ); 5.183 +VOMP__add_ownership_by_to( SlaveVP *newOwnerPr, void *data ); 5.184 5.185 void 5.186 -SSR__remove_ownership_by_from( SlaveVP *loserPr, void *dataLosing ); 5.187 +VOMP__remove_ownership_by_from( SlaveVP *loserPr, void *dataLosing ); 5.188 5.189 void 5.190 -SSR__transfer_ownership_to_outside( void *dataToTransferOwnershipOf ); 5.191 +VOMP__transfer_ownership_to_outside( void *dataToTransferOwnershipOf ); 5.192 5.193 5.194 5.195 //======================= 5.196 void 5.197 -SSR__send_of_type_to( SlaveVP *sendPr, void *msg, const int type, 5.198 +VOMP__send_of_type_to( SlaveVP *sendPr, void *msg, const int type, 5.199 SlaveVP *receivePr); 5.200 5.201 void 5.202 -SSR__send_from_to( void *msg, SlaveVP *sendPr, SlaveVP *receivePr); 5.203 +VOMP__send_from_to( void *msg, SlaveVP *sendPr, SlaveVP *receivePr); 5.204 5.205 void * 5.206 -SSR__receive_type_to( const int type, SlaveVP *receiveSlv ); 5.207 +VOMP__receive_type_to( const int type, SlaveVP *receiveSlv ); 5.208 5.209 void * 5.210 -SSR__receive_from_to( SlaveVP *sendPr, SlaveVP *receiveSlv ); 5.211 +VOMP__receive_from_to( SlaveVP *sendPr, SlaveVP *receiveSlv ); 5.212 5.213 5.214 //======================= Concurrency Stuff ====================== 5.215 void 5.216 -SSR__start_fn_singleton( int32 singletonID, SlaveVP *animSlv ); 5.217 +VOMP__start_fn_singleton( int32 singletonID, SlaveVP *animSlv ); 5.218 5.219 void 5.220 -SSR__end_fn_singleton( int32 singletonID, SlaveVP *animSlv ); 5.221 +VOMP__end_fn_singleton( int32 singletonID, SlaveVP *animSlv ); 5.222 5.223 void 5.224 -SSR__start_data_singleton( SSRSingleton **singeltonAddr, SlaveVP *animSlv ); 5.225 +VOMP__start_data_singleton( VOMPSingleton **singeltonAddr, SlaveVP *animSlv ); 5.226 5.227 void 5.228 -SSR__end_data_singleton( SSRSingleton **singletonAddr, SlaveVP *animSlv ); 5.229 +VOMP__end_data_singleton( VOMPSingleton **singletonAddr, SlaveVP *animSlv ); 5.230 5.231 void 5.232 -SSR__animate_short_fn_in_isolation( PtrToAtomicFn ptrToFnToExecInMaster, 5.233 +VOMP__animate_short_fn_in_isolation( PtrToAtomicFn ptrToFnToExecInMaster, 5.234 void *data, SlaveVP *animSlv ); 5.235 5.236 void 5.237 -SSR__start_transaction( int32 transactionID, SlaveVP *animSlv ); 5.238 +VOMP__start_transaction( int32 transactionID, SlaveVP *animSlv ); 5.239 5.240 void 5.241 -SSR__end_transaction( int32 transactionID, SlaveVP *animSlv ); 5.242 +VOMP__end_transaction( int32 transactionID, SlaveVP *animSlv ); 5.243 5.244 5.245 //========================= Internal use only ============================= 5.246 void 5.247 -SSR__Request_Handler( SlaveVP *requestingPr, void *_semEnv ); 5.248 +VOMP__Request_Handler( SlaveVP *requestingPr, void *_semEnv ); 5.249 5.250 SlaveVP * 5.251 -SSR__assign_slaveVP_to_slot( void *_semEnv, AnimSlot *slot ); 5.252 +VOMP__assign_slaveVP_to_slot( void *_semEnv, AnimSlot *slot ); 5.253 5.254 SlaveVP* 5.255 -SSR__create_procr_helper( TopLevelFnPtr fnPtr, void *initData, 5.256 - SSRSemEnv *semEnv, int32 coreToAssignOnto ); 5.257 +VOMP__create_procr_helper( TopLevelFnPtr fnPtr, void *initData, 5.258 + VOMPSemEnv *semEnv, int32 coreToAssignOnto ); 5.259 5.260 //===================== Measurement of Lang Overheads ===================== 5.261 -#include "SSR_Measurement.h" 5.262 +#include "VOMP_Measurement.h" 5.263 5.264 //=========================================================================== 5.265 -#endif /* _SSR_H */ 5.266 +#endif /* _VOMP_H */ 5.267
6.1 --- a/VOMP_PluginFns.c Sun May 20 22:07:52 2012 -0700 6.2 +++ b/VOMP_PluginFns.c Thu May 24 08:57:24 2012 -0700 6.3 @@ -8,41 +8,41 @@ 6.4 #include <stdlib.h> 6.5 6.6 #include "Queue_impl/PrivateQueue.h" 6.7 -#include "SSR.h" 6.8 -#include "SSR_Request_Handlers.h" 6.9 +#include "VOMP.h" 6.10 +#include "VOMP_Request_Handlers.h" 6.11 6.12 //=========================== Local Fn Prototypes =========================== 6.13 void 6.14 -resume_slaveVP( SlaveVP *procr, SSRSemEnv *semEnv ); 6.15 +resume_slaveVP( SlaveVP *procr, VOMPSemEnv *semEnv ); 6.16 6.17 void 6.18 -handleSemReq( VMSReqst *req, SlaveVP *requestingPr, SSRSemEnv *semEnv ); 6.19 +handleSemReq( VMSReqst *req, SlaveVP *requestingPr, VOMPSemEnv *semEnv ); 6.20 6.21 void 6.22 -handleDissipate( SlaveVP *requestingPr, SSRSemEnv *semEnv ); 6.23 +handleDissipate( SlaveVP *requestingPr, VOMPSemEnv *semEnv ); 6.24 6.25 void 6.26 -handleCreate( VMSReqst *req, SlaveVP *requestingPr, SSRSemEnv *semEnv ); 6.27 +handleCreate( VMSReqst *req, SlaveVP *requestingPr, VOMPSemEnv *semEnv ); 6.28 6.29 6.30 //============================== Assigner ================================== 6.31 // 6.32 -/*For SSR, assigning a slave simply takes the next work-unit off the 6.33 +/*For VOMP, assigning a slave simply takes the next work-unit off the 6.34 * ready-to-go work-unit queue and assigns it to the offered slot. 6.35 *If the ready-to-go work-unit queue is empty, then nothing to assign 6.36 * to the animation slot -- return FALSE to let Master loop know assigning 6.37 * that slot failed. 6.38 */ 6.39 SlaveVP * 6.40 -SSR__assign_slaveVP_to_slot( void *_semEnv, AnimSlot *slot ) 6.41 +VOMP__assign_slaveVP_to_slot( void *_semEnv, AnimSlot *slot ) 6.42 { SlaveVP *assignPr; 6.43 - SSRSemEnv *semEnv; 6.44 + VOMPSemEnv *semEnv; 6.45 int32 coreNum, slotNum; 6.46 6.47 coreNum = slot->coreSlotIsOn; 6.48 slotNum = slot->slotIdx; 6.49 6.50 - semEnv = (SSRSemEnv *)_semEnv; 6.51 + semEnv = (VOMPSemEnv *)_semEnv; 6.52 6.53 assignPr = readPrivQ( semEnv->readyVPQs[coreNum] ); 6.54 //Note, using a non-blocking queue -- it returns NULL if queue empty 6.55 @@ -104,11 +104,11 @@ 6.56 * Processor, and initial data. 6.57 */ 6.58 void 6.59 -SSR__Request_Handler( SlaveVP *requestingPr, void *_semEnv ) 6.60 - { SSRSemEnv *semEnv; 6.61 +VOMP__Request_Handler( SlaveVP *requestingPr, void *_semEnv ) 6.62 + { VOMPSemEnv *semEnv; 6.63 VMSReqst *req; 6.64 6.65 - semEnv = (SSRSemEnv *)_semEnv; 6.66 + semEnv = (VOMPSemEnv *)_semEnv; 6.67 6.68 req = VMS_PI__take_next_request_out_of( requestingPr ); 6.69 6.70 @@ -135,8 +135,8 @@ 6.71 6.72 6.73 void 6.74 -handleSemReq( VMSReqst *req, SlaveVP *reqPr, SSRSemEnv *semEnv ) 6.75 - { SSRSemReq *semReq; 6.76 +handleSemReq( VMSReqst *req, SlaveVP *reqPr, VOMPSemEnv *semEnv ) 6.77 + { VOMPSemReq *semReq; 6.78 6.79 semReq = VMS_PI__take_sem_reqst_from(req); 6.80 if( semReq == NULL ) return; 6.81 @@ -180,7 +180,7 @@ 6.82 //=========================== VMS Request Handlers ============================== 6.83 // 6.84 void 6.85 -handleDissipate( SlaveVP *requestingPr, SSRSemEnv *semEnv ) 6.86 +handleDissipate( SlaveVP *requestingPr, VOMPSemEnv *semEnv ) 6.87 { 6.88 DEBUG__printf1(dbgRqstHdlr,"Dissipate request from processor %d",requestingPr->slaveID) 6.89 //free any semantic data allocated to the virt procr 6.90 @@ -200,17 +200,17 @@ 6.91 /*Re-use this in the entry-point fn 6.92 */ 6.93 SlaveVP * 6.94 -SSR__create_procr_helper( TopLevelFnPtr fnPtr, void *initData, 6.95 - SSRSemEnv *semEnv, int32 coreToAssignOnto ) 6.96 +VOMP__create_procr_helper( TopLevelFnPtr fnPtr, void *initData, 6.97 + VOMPSemEnv *semEnv, int32 coreToAssignOnto ) 6.98 { SlaveVP *newPr; 6.99 - SSRSemData *semData; 6.100 + VOMPSemData *semData; 6.101 6.102 //This is running in master, so use internal version 6.103 newPr = VMS_PI__create_slaveVP( fnPtr, initData ); 6.104 6.105 semEnv->numSlaveVP += 1; 6.106 6.107 - semData = VMS_PI__malloc( sizeof(SSRSemData) ); 6.108 + semData = VMS_PI__malloc( sizeof(VOMPSemData) ); 6.109 semData->highestTransEntered = -1; 6.110 semData->lastTransEntered = NULL; 6.111 6.112 @@ -241,14 +241,14 @@ 6.113 } 6.114 6.115 void 6.116 -handleCreate( VMSReqst *req, SlaveVP *requestingPr, SSRSemEnv *semEnv ) 6.117 - { SSRSemReq *semReq; 6.118 +handleCreate( VMSReqst *req, SlaveVP *requestingPr, VOMPSemEnv *semEnv ) 6.119 + { VOMPSemReq *semReq; 6.120 SlaveVP *newPr; 6.121 6.122 6.123 semReq = VMS_PI__take_sem_reqst_from( req ); 6.124 6.125 - newPr = SSR__create_procr_helper( semReq->fnPtr, semReq->initData, semEnv, 6.126 + newPr = VOMP__create_procr_helper( semReq->fnPtr, semReq->initData, semEnv, 6.127 semReq->coreToAssignOnto ); 6.128 6.129 DEBUG__printf2(dbgRqstHdlr,"Create from: %d, new VP: %d", requestingPr->slaveID, newPr->slaveID) 6.130 @@ -263,7 +263,7 @@ 6.131 addToListOfArrays(Dependency,newd,semEnv->commDependenciesList); 6.132 #endif 6.133 6.134 - //For SSR, caller needs ptr to created processor returned to it 6.135 + //For VOMP, caller needs ptr to created processor returned to it 6.136 requestingPr->dataRetFromReq = newPr; 6.137 6.138 resume_slaveVP( newPr, semEnv ); 6.139 @@ -273,7 +273,7 @@ 6.140 6.141 //=========================== Helper ============================== 6.142 void 6.143 -resume_slaveVP( SlaveVP *procr, SSRSemEnv *semEnv ) 6.144 +resume_slaveVP( SlaveVP *procr, VOMPSemEnv *semEnv ) 6.145 { 6.146 #ifdef HOLISTIC__TURN_ON_PERF_COUNTERS 6.147 /*
7.1 --- a/VOMP_Request_Handlers.c Sun May 20 22:07:52 2012 -0700 7.2 +++ b/VOMP_Request_Handlers.c Thu May 24 08:57:24 2012 -0700 7.3 @@ -10,13 +10,13 @@ 7.4 #include "VMS_impl/VMS.h" 7.5 #include "Queue_impl/PrivateQueue.h" 7.6 #include "Hash_impl/PrivateHash.h" 7.7 -#include "SSR.h" 7.8 +#include "VOMP.h" 7.9 7.10 7.11 7.12 //=========================== Local Fn Prototypes =========================== 7.13 void 7.14 -resume_slaveVP( SlaveVP *procr, SSRSemEnv *semEnv ); 7.15 +resume_slaveVP( SlaveVP *procr, VOMPSemEnv *semEnv ); 7.16 7.17 7.18 7.19 @@ -25,11 +25,11 @@ 7.20 7.21 /*Only clone the elements of req used in these reqst handlers 7.22 */ 7.23 - SSRSemReq * 7.24 -cloneReq( SSRSemReq *semReq ) 7.25 - { SSRSemReq *clonedReq; 7.26 + VOMPSemReq * 7.27 +cloneReq( VOMPSemReq *semReq ) 7.28 + { VOMPSemReq *clonedReq; 7.29 7.30 - clonedReq = VMS_PI__malloc( sizeof(SSRSemReq) ); 7.31 + clonedReq = VMS_PI__malloc( sizeof(VOMPSemReq) ); 7.32 clonedReq->reqType = semReq->reqType; 7.33 clonedReq->sendPr = semReq->sendPr; 7.34 clonedReq->msg = semReq->msg; 7.35 @@ -39,10 +39,10 @@ 7.36 } 7.37 7.38 HashEntry * 7.39 -giveEntryElseInsertReqst( char *key, SSRSemReq *semReq, 7.40 +giveEntryElseInsertReqst( char *key, VOMPSemReq *semReq, 7.41 HashTable *commHashTbl ) 7.42 { HashEntry *entry; 7.43 - SSRSemReq *waitingReq; 7.44 + VOMPSemReq *waitingReq; 7.45 7.46 entry = getEntryFromTable( (char *)key, commHashTbl ); 7.47 if( entry == NULL ) 7.48 @@ -51,7 +51,7 @@ 7.49 addValueIntoTable( key, cloneReq( semReq ), commHashTbl ); 7.50 return NULL; 7.51 } 7.52 - waitingReq = (SSRSemReq *)entry->content; 7.53 + waitingReq = (VOMPSemReq *)entry->content; 7.54 if( waitingReq == NULL ) //might happen when last waiting gets paired 7.55 { //no waiting sends or receives, so add this request and exit 7.56 entry->content = semReq; 7.57 @@ -82,10 +82,10 @@ 7.58 * receive processor, so they will stack up. 7.59 */ 7.60 void 7.61 -handleSendType( SSRSemReq *semReq, SSRSemEnv *semEnv ) 7.62 +handleSendType( VOMPSemReq *semReq, VOMPSemEnv *semEnv ) 7.63 { SlaveVP *sendPr, *receivePr; 7.64 int key[] = {0,0,0}; 7.65 - SSRSemReq *waitingReq; 7.66 + VOMPSemReq *waitingReq; 7.67 HashEntry *entry; 7.68 HashTable *commHashTbl = semEnv->commHashTbl; 7.69 7.70 @@ -108,7 +108,7 @@ 7.71 entry = giveEntryElseInsertReqst( (char *)key, semReq, commHashTbl); 7.72 if( entry == NULL ) return; //was just inserted 7.73 7.74 - waitingReq = (SSRSemReq *)entry->content; 7.75 + waitingReq = (VOMPSemReq *)entry->content; 7.76 7.77 //At this point, know have waiting request(s) -- either sends or recv 7.78 //Note, can only have max of one receive waiting, and cannot have both 7.79 @@ -117,7 +117,7 @@ 7.80 if( waitingReq->reqType == send_type ) 7.81 { //waiting request is another send, so stack this up on list 7.82 // but first clone the sending request so it persists. 7.83 - SSRSemReq *clonedReq = cloneReq( semReq ); 7.84 + VOMPSemReq *clonedReq = cloneReq( semReq ); 7.85 clonedReq-> nextReqInHashEntry = waitingReq->nextReqInHashEntry; 7.86 waitingReq->nextReqInHashEntry = clonedReq; 7.87 DEBUG__printf2( dbgRqstHdlr, "linked requests: %p, %p ", clonedReq,\ 7.88 @@ -178,10 +178,10 @@ 7.89 */ 7.90 //TODO: combine both send handlers into single handler 7.91 void 7.92 -handleSendFromTo( SSRSemReq *semReq, SSRSemEnv *semEnv) 7.93 +handleSendFromTo( VOMPSemReq *semReq, VOMPSemEnv *semEnv) 7.94 { SlaveVP *sendPr, *receivePr; 7.95 int key[] = {0,0,0}; 7.96 - SSRSemReq *waitingReq; 7.97 + VOMPSemReq *waitingReq; 7.98 HashEntry *entry; 7.99 HashTable *commHashTbl = semEnv->commHashTbl; 7.100 7.101 @@ -198,7 +198,7 @@ 7.102 entry = giveEntryElseInsertReqst( (char *)key, semReq, commHashTbl); 7.103 if( entry == NULL ) return; //was just inserted 7.104 7.105 - waitingReq = (SSRSemReq *)entry->content; 7.106 + waitingReq = (VOMPSemReq *)entry->content; 7.107 7.108 //At this point, know have waiting request(s) -- either sends or recv 7.109 if( waitingReq->reqType == send_from_to ) 7.110 @@ -269,17 +269,17 @@ 7.111 * less costly. 7.112 */ 7.113 void 7.114 -handleReceiveAny( SSRSemReq *semReq, SSRSemEnv *semEnv) 7.115 +handleReceiveAny( VOMPSemReq *semReq, VOMPSemEnv *semEnv) 7.116 { 7.117 7.118 } 7.119 7.120 7.121 void 7.122 -handleReceiveType( SSRSemReq *semReq, SSRSemEnv *semEnv) 7.123 +handleReceiveType( VOMPSemReq *semReq, VOMPSemEnv *semEnv) 7.124 { SlaveVP *sendPr, *receivePr; 7.125 int key[] = {0,0,0}; 7.126 - SSRSemReq *waitingReq; 7.127 + VOMPSemReq *waitingReq; 7.128 HashEntry *entry; 7.129 HashTable *commHashTbl = semEnv->commHashTbl; 7.130 7.131 @@ -295,7 +295,7 @@ 7.132 entry = giveEntryElseInsertReqst((char*)key, semReq, commHashTbl);//clones 7.133 if( entry == NULL ) return; //was just inserted 7.134 7.135 - waitingReq = (SSRSemReq *)entry->content; //previously cloned by insert 7.136 + waitingReq = (VOMPSemReq *)entry->content; //previously cloned by insert 7.137 7.138 //At this point, know have waiting request(s) -- should be send(s) 7.139 if( waitingReq->reqType == send_type ) 7.140 @@ -351,10 +351,10 @@ 7.141 /* 7.142 */ 7.143 void 7.144 -handleReceiveFromTo( SSRSemReq *semReq, SSRSemEnv *semEnv) 7.145 +handleReceiveFromTo( VOMPSemReq *semReq, VOMPSemEnv *semEnv) 7.146 { SlaveVP *sendPr, *receivePr; 7.147 int key[] = {0,0,0}; 7.148 - SSRSemReq *waitingReq; 7.149 + VOMPSemReq *waitingReq; 7.150 HashEntry *entry; 7.151 HashTable *commHashTbl = semEnv->commHashTbl; 7.152 7.153 @@ -370,7 +370,7 @@ 7.154 entry = giveEntryElseInsertReqst( (char *)key, semReq, commHashTbl); 7.155 if( entry == NULL ) return; //was just inserted 7.156 7.157 - waitingReq = (SSRSemReq *)entry->content; 7.158 + waitingReq = (VOMPSemReq *)entry->content; 7.159 7.160 //At this point, know have waiting request(s) -- should be send(s) 7.161 if( waitingReq->reqType == send_from_to ) 7.162 @@ -409,13 +409,13 @@ 7.163 7.164 //=============================================== 7.165 void 7.166 -handleTransferTo( SSRSemReq *semReq, SSRSemEnv *semEnv) 7.167 +handleTransferTo( VOMPSemReq *semReq, VOMPSemEnv *semEnv) 7.168 { 7.169 7.170 } 7.171 7.172 void 7.173 -handleTransferOut( SSRSemReq *semReq, SSRSemEnv *semEnv) 7.174 +handleTransferOut( VOMPSemReq *semReq, VOMPSemEnv *semEnv) 7.175 { 7.176 7.177 } 7.178 @@ -424,7 +424,7 @@ 7.179 /* 7.180 */ 7.181 void 7.182 -handleMalloc( SSRSemReq *semReq, SlaveVP *requestingPr, SSRSemEnv *semEnv ) 7.183 +handleMalloc( VOMPSemReq *semReq, SlaveVP *requestingPr, VOMPSemEnv *semEnv ) 7.184 { void *ptr; 7.185 7.186 DEBUG__printf1(dbgRqstHdlr,"Malloc request from processor %d",requestingPr->slaveID) 7.187 @@ -437,7 +437,7 @@ 7.188 /* 7.189 */ 7.190 void 7.191 -handleFree( SSRSemReq *semReq, SlaveVP *requestingPr, SSRSemEnv *semEnv ) 7.192 +handleFree( VOMPSemReq *semReq, SlaveVP *requestingPr, VOMPSemEnv *semEnv ) 7.193 { 7.194 DEBUG__printf1(dbgRqstHdlr,"Free request from processor %d",requestingPr->slaveID) 7.195 VMS_PI__free( semReq->ptrToFree ); 7.196 @@ -451,8 +451,8 @@ 7.197 * end-label. Else, sets flag and resumes normally. 7.198 */ 7.199 void inline 7.200 -handleStartSingleton_helper( SSRSingleton *singleton, SlaveVP *reqstingPr, 7.201 - SSRSemEnv *semEnv ) 7.202 +handleStartSingleton_helper( VOMPSingleton *singleton, SlaveVP *reqstingPr, 7.203 + VOMPSemEnv *semEnv ) 7.204 { 7.205 if( singleton->hasFinished ) 7.206 { //the code that sets the flag to true first sets the end instr addr 7.207 @@ -474,22 +474,22 @@ 7.208 } 7.209 } 7.210 void inline 7.211 -handleStartFnSingleton( SSRSemReq *semReq, SlaveVP *requestingPr, 7.212 - SSRSemEnv *semEnv ) 7.213 - { SSRSingleton *singleton; 7.214 +handleStartFnSingleton( VOMPSemReq *semReq, SlaveVP *requestingPr, 7.215 + VOMPSemEnv *semEnv ) 7.216 + { VOMPSingleton *singleton; 7.217 DEBUG__printf1(dbgRqstHdlr,"StartFnSingleton request from processor %d",requestingPr->slaveID) 7.218 7.219 singleton = &(semEnv->fnSingletons[ semReq->singletonID ]); 7.220 handleStartSingleton_helper( singleton, requestingPr, semEnv ); 7.221 } 7.222 void inline 7.223 -handleStartDataSingleton( SSRSemReq *semReq, SlaveVP *requestingPr, 7.224 - SSRSemEnv *semEnv ) 7.225 - { SSRSingleton *singleton; 7.226 +handleStartDataSingleton( VOMPSemReq *semReq, SlaveVP *requestingPr, 7.227 + VOMPSemEnv *semEnv ) 7.228 + { VOMPSingleton *singleton; 7.229 7.230 DEBUG__printf1(dbgRqstHdlr,"StartDataSingleton request from processor %d",requestingPr->slaveID) 7.231 if( *(semReq->singletonPtrAddr) == NULL ) 7.232 - { singleton = VMS_PI__malloc( sizeof(SSRSingleton) ); 7.233 + { singleton = VMS_PI__malloc( sizeof(VOMPSingleton) ); 7.234 singleton->waitQ = makeVMSQ(); 7.235 singleton->endInstrAddr = 0x0; 7.236 singleton->hasBeenStarted = FALSE; 7.237 @@ -503,8 +503,8 @@ 7.238 7.239 7.240 void inline 7.241 -handleEndSingleton_helper( SSRSingleton *singleton, SlaveVP *requestingPr, 7.242 - SSRSemEnv *semEnv ) 7.243 +handleEndSingleton_helper( VOMPSingleton *singleton, SlaveVP *requestingPr, 7.244 + VOMPSemEnv *semEnv ) 7.245 { PrivQueueStruc *waitQ; 7.246 int32 numWaiting, i; 7.247 SlaveVP *resumingPr; 7.248 @@ -529,10 +529,10 @@ 7.249 7.250 } 7.251 void inline 7.252 -handleEndFnSingleton( SSRSemReq *semReq, SlaveVP *requestingPr, 7.253 - SSRSemEnv *semEnv ) 7.254 +handleEndFnSingleton( VOMPSemReq *semReq, SlaveVP *requestingPr, 7.255 + VOMPSemEnv *semEnv ) 7.256 { 7.257 - SSRSingleton *singleton; 7.258 + VOMPSingleton *singleton; 7.259 7.260 DEBUG__printf1(dbgRqstHdlr,"EndFnSingleton request from processor %d",requestingPr->slaveID) 7.261 7.262 @@ -540,10 +540,10 @@ 7.263 handleEndSingleton_helper( singleton, requestingPr, semEnv ); 7.264 } 7.265 void inline 7.266 -handleEndDataSingleton( SSRSemReq *semReq, SlaveVP *requestingPr, 7.267 - SSRSemEnv *semEnv ) 7.268 +handleEndDataSingleton( VOMPSemReq *semReq, SlaveVP *requestingPr, 7.269 + VOMPSemEnv *semEnv ) 7.270 { 7.271 - SSRSingleton *singleton; 7.272 + VOMPSingleton *singleton; 7.273 7.274 DEBUG__printf1(dbgRqstHdlr,"EndDataSingleton request from processor %d",requestingPr->slaveID) 7.275 7.276 @@ -556,7 +556,7 @@ 7.277 * pointer out of the request and call it, then resume the VP. 7.278 */ 7.279 void 7.280 -handleAtomic( SSRSemReq *semReq, SlaveVP *requestingPr, SSRSemEnv *semEnv ) 7.281 +handleAtomic( VOMPSemReq *semReq, SlaveVP *requestingPr, VOMPSemEnv *semEnv ) 7.282 { 7.283 DEBUG__printf1(dbgRqstHdlr,"Atomic request from processor %d",requestingPr->slaveID) 7.284 semReq->fnToExecInMaster( semReq->dataForFn ); 7.285 @@ -578,9 +578,9 @@ 7.286 *If NULL, then write requesting into the field and resume. 7.287 */ 7.288 void 7.289 -handleTransStart( SSRSemReq *semReq, SlaveVP *requestingPr, 7.290 - SSRSemEnv *semEnv ) 7.291 - { SSRSemData *semData; 7.292 +handleTransStart( VOMPSemReq *semReq, SlaveVP *requestingPr, 7.293 + VOMPSemEnv *semEnv ) 7.294 + { VOMPSemData *semData; 7.295 TransListElem *nextTransElem; 7.296 7.297 DEBUG__printf1(dbgRqstHdlr,"TransStart request from processor %d",requestingPr->slaveID) 7.298 @@ -600,7 +600,7 @@ 7.299 semData->lastTransEntered = nextTransElem; 7.300 7.301 //get the structure for this transaction ID 7.302 - SSRTrans * 7.303 + VOMPTrans * 7.304 transStruc = &(semEnv->transactionStrucs[ semReq->transID ]); 7.305 7.306 if( transStruc->VPCurrentlyExecuting == NULL ) 7.307 @@ -631,10 +631,10 @@ 7.308 * resume both. 7.309 */ 7.310 void 7.311 -handleTransEnd(SSRSemReq *semReq, SlaveVP *requestingPr, SSRSemEnv *semEnv) 7.312 - { SSRSemData *semData; 7.313 +handleTransEnd(VOMPSemReq *semReq, SlaveVP *requestingPr, VOMPSemEnv *semEnv) 7.314 + { VOMPSemData *semData; 7.315 SlaveVP *waitingPr; 7.316 - SSRTrans *transStruc; 7.317 + VOMPTrans *transStruc; 7.318 TransListElem *lastTrans; 7.319 7.320 DEBUG__printf1(dbgRqstHdlr,"TransEnd request from processor %d",requestingPr->slaveID)
8.1 --- a/VOMP_Request_Handlers.h Sun May 20 22:07:52 2012 -0700 8.2 +++ b/VOMP_Request_Handlers.h Thu May 24 08:57:24 2012 -0700 8.3 @@ -6,51 +6,51 @@ 8.4 * 8.5 */ 8.6 8.7 -#ifndef _SSR_REQ_H 8.8 -#define _SSR_REQ_H 8.9 +#ifndef _VOMP_REQ_H 8.10 +#define _VOMP_REQ_H 8.11 8.12 -#include "SSR.h" 8.13 +#include "VOMP.h" 8.14 8.15 -/*This header defines everything specific to the SSR semantic plug-in 8.16 +/*This header defines everything specific to the VOMP semantic plug-in 8.17 */ 8.18 8.19 inline void 8.20 -handleSendType( SSRSemReq *semReq, SSRSemEnv *semEnv); 8.21 +handleSendType( VOMPSemReq *semReq, VOMPSemEnv *semEnv); 8.22 inline void 8.23 -handleSendFromTo( SSRSemReq *semReq, SSRSemEnv *semEnv); 8.24 +handleSendFromTo( VOMPSemReq *semReq, VOMPSemEnv *semEnv); 8.25 inline void 8.26 -handleReceiveAny( SSRSemReq *semReq, SSRSemEnv *semEnv); 8.27 +handleReceiveAny( VOMPSemReq *semReq, VOMPSemEnv *semEnv); 8.28 inline void 8.29 -handleReceiveType( SSRSemReq *semReq, SSRSemEnv *semEnv); 8.30 +handleReceiveType( VOMPSemReq *semReq, VOMPSemEnv *semEnv); 8.31 inline void 8.32 -handleReceiveFromTo( SSRSemReq *semReq, SSRSemEnv *semEnv); 8.33 +handleReceiveFromTo( VOMPSemReq *semReq, VOMPSemEnv *semEnv); 8.34 inline void 8.35 -handleTransferTo( SSRSemReq *semReq, SSRSemEnv *semEnv); 8.36 +handleTransferTo( VOMPSemReq *semReq, VOMPSemEnv *semEnv); 8.37 inline void 8.38 -handleTransferOut( SSRSemReq *semReq, SSRSemEnv *semEnv); 8.39 +handleTransferOut( VOMPSemReq *semReq, VOMPSemEnv *semEnv); 8.40 inline void 8.41 -handleMalloc( SSRSemReq *semReq, SlaveVP *requestingSlv, SSRSemEnv *semEnv); 8.42 +handleMalloc( VOMPSemReq *semReq, SlaveVP *requestingSlv, VOMPSemEnv *semEnv); 8.43 inline void 8.44 -handleFree( SSRSemReq *semReq, SlaveVP *requestingSlv, SSRSemEnv *semEnv ); 8.45 +handleFree( VOMPSemReq *semReq, SlaveVP *requestingSlv, VOMPSemEnv *semEnv ); 8.46 inline void 8.47 -handleTransEnd(SSRSemReq *semReq, SlaveVP *requestingSlv, SSRSemEnv*semEnv); 8.48 +handleTransEnd(VOMPSemReq *semReq, SlaveVP *requestingSlv, VOMPSemEnv*semEnv); 8.49 inline void 8.50 -handleTransStart( SSRSemReq *semReq, SlaveVP *requestingSlv, 8.51 - SSRSemEnv *semEnv ); 8.52 +handleTransStart( VOMPSemReq *semReq, SlaveVP *requestingSlv, 8.53 + VOMPSemEnv *semEnv ); 8.54 inline void 8.55 -handleAtomic( SSRSemReq *semReq, SlaveVP *requestingSlv, SSRSemEnv *semEnv); 8.56 +handleAtomic( VOMPSemReq *semReq, SlaveVP *requestingSlv, VOMPSemEnv *semEnv); 8.57 inline void 8.58 -handleStartFnSingleton( SSRSemReq *semReq, SlaveVP *reqstingSlv, 8.59 - SSRSemEnv *semEnv ); 8.60 +handleStartFnSingleton( VOMPSemReq *semReq, SlaveVP *reqstingSlv, 8.61 + VOMPSemEnv *semEnv ); 8.62 inline void 8.63 -handleEndFnSingleton( SSRSemReq *semReq, SlaveVP *requestingSlv, 8.64 - SSRSemEnv *semEnv ); 8.65 +handleEndFnSingleton( VOMPSemReq *semReq, SlaveVP *requestingSlv, 8.66 + VOMPSemEnv *semEnv ); 8.67 inline void 8.68 -handleStartDataSingleton( SSRSemReq *semReq, SlaveVP *reqstingSlv, 8.69 - SSRSemEnv *semEnv ); 8.70 +handleStartDataSingleton( VOMPSemReq *semReq, SlaveVP *reqstingSlv, 8.71 + VOMPSemEnv *semEnv ); 8.72 inline void 8.73 -handleEndDataSingleton( SSRSemReq *semReq, SlaveVP *requestingSlv, 8.74 - SSRSemEnv *semEnv ); 8.75 +handleEndDataSingleton( VOMPSemReq *semReq, SlaveVP *requestingSlv, 8.76 + VOMPSemEnv *semEnv ); 8.77 8.78 -#endif /* _SSR_REQ_H */ 8.79 +#endif /* _VOMP_REQ_H */ 8.80
