# HG changeset patch # User Me # Date 1287101188 25200 # Node ID 6c6d7fbd7e2559c981c5ef1015427ec5e395c477 # Parent 6eb80110976c13970b2d1e1e5952ba36e3833631 added ideal num work units plus PRINT_DEBUG as macro diff -r 6eb80110976c -r 6c6d7fbd7e25 SSR.h --- a/SSR.h Sun Oct 10 09:42:24 2010 -0700 +++ b/SSR.h Thu Oct 14 17:06:28 2010 -0700 @@ -67,6 +67,8 @@ int32 inline SSR__end_primitive_and_give_cycles(); +int32 +SSR__giveIdealNumWorkUnits(); //======================= diff -r 6eb80110976c -r 6c6d7fbd7e25 SSR_Request_Handlers.c --- a/SSR_Request_Handlers.c Sun Oct 10 09:42:24 2010 -0700 +++ b/SSR_Request_Handlers.c Thu Oct 14 17:06:28 2010 -0700 @@ -95,8 +95,8 @@ { //waiting request is another send, so stack this up on list semReq-> nextReqInHashEntry = waitingReq->nextReqInHashEntry; waitingReq->nextReqInHashEntry = semReq; - //printf("linked requests: %d, %d | ", semReq, waitingReq ); - //printf("type: %d, %d\n", semReq->reqType, waitingReq->reqType ); + PRINT2_DEBUG("linked requests: %d, %d | ", semReq, waitingReq ) + PRINT2_DEBUG("type: %d, %d\n", semReq->reqType, waitingReq->reqType) return; } else diff -r 6eb80110976c -r 6c6d7fbd7e25 SSR_lib.c --- a/SSR_lib.c Sun Oct 10 09:42:24 2010 -0700 +++ b/SSR_lib.c Thu Oct 14 17:06:28 2010 -0700 @@ -120,12 +120,17 @@ } -int32 +int32 inline SSR__giveMinWorkUnitCycles( float32 percentOverhead ) { - return 5000; + return MIN_WORK_UNIT_CYCLES; } +int32 +SSR__giveIdealNumWorkUnits() + { + return NUM_SCHED_SLOTS * NUM_CORES; + } /*For now, use TSC -- later, make these two macros with assembly that first * saves jump point, and second jumps back several times to get reliable time @@ -134,7 +139,7 @@ SSR__start_primitive() { int32 *saveAddr; saveAddr = &(((SSRSemEnv *)(_VMSMasterEnv->semanticEnv))->primitiveStartTime); - saveLowTimeStampCountInto( saveAddr ); + saveLowTimeStampCountInto( (((SSRSemEnv *)(_VMSMasterEnv->semanticEnv))->primitiveStartTime) ); } /*Just quick and dirty for now -- make reliable later