diff MasterLoop.c @ 177:3bd35fc83c61

move loopgraph recording to plugin (\! changed scheduler fn prototype \!)
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Wed, 04 Jan 2012 16:40:10 +0100
parents 981acd1db6af
children 7523ee70d66c
line diff
     1.1 --- a/MasterLoop.c	Mon Dec 05 18:59:48 2011 +0100
     1.2 +++ b/MasterLoop.c	Wed Jan 04 16:40:10 2012 +0100
     1.3 @@ -132,12 +132,7 @@
     1.4     semanticEnv      = masterEnv->semanticEnv;
     1.5  
     1.6     #ifdef DETECT_LOOP_GRAPH
     1.7 -   if(numSlotsFilled > 0){
     1.8 -   b = new_bulb();
     1.9 -   addToDynArray((void*)b,masterEnv->loop_graph_array_info);
    1.10 -   set_bulb_core(b,thisCoresIdx);
    1.11 -   set_bulb_id(b,masterEnv->loop_counter[thisCoresIdx]++);
    1.12 -   }
    1.13 +
    1.14     #endif
    1.15  
    1.16        //Poll each slot's Done flag
    1.17 @@ -209,14 +204,14 @@
    1.18                 saveCyclesAndInstrs(thisCoresIdx,tmp_cycles,tmp_instrs);
    1.19                 #endif
    1.20           schedVirtPr =
    1.21 -          (*slaveScheduler)( semanticEnv, thisCoresIdx );
    1.22 +          (*slaveScheduler)( semanticEnv, thisCoresIdx, slotIdx );
    1.23  
    1.24           if( schedVirtPr != NULL )
    1.25            { currSlot->procrAssignedToSlot = schedVirtPr;
    1.26              schedVirtPr->schedSlot        = currSlot;
    1.27              currSlot->needsProcrAssigned  = FALSE;
    1.28              numSlotsFilled               += 1;
    1.29 -            schedVirtPr->numTimesScheduled++;
    1.30 +
    1.31                 #ifdef MEAS__PERF_COUNTERS
    1.32                 //end assigner
    1.33                 int lastRecordIdx = currSlot->procrAssignedToSlot->counter_history_array_info->numInArray -1;
    1.34 @@ -226,16 +221,13 @@
    1.35                 lastRecord->start_assign_instrs = tmp_instrs;
    1.36                 saveCyclesAndInstrs(thisCoresIdx,lastRecord->end_assign_cycles,lastRecord->end_assign_instrs);
    1.37                 #endif
    1.38 +               #ifdef DETECT_LOOP_GRAPH
    1.39 +
    1.40 +               #endif
    1.41              writeVMSQ( schedVirtPr, readyToAnimateQ );
    1.42            }
    1.43         }
    1.44 -               #ifdef DETECT_LOOP_GRAPH
    1.45 -               if(!currSlot->needsProcrAssigned) {
    1.46 -                   int lastRecordIdx = currSlot->procrAssignedToSlot->counter_history_array_info->numInArray -1;
    1.47 -                   CounterRecord* lastRecord = currSlot->procrAssignedToSlot->counter_history[lastRecordIdx];
    1.48 -                   set_bulb_member(b,slotIdx,currSlot->procrAssignedToSlot->procrID,lastRecord->task_position);
    1.49 -               }
    1.50 -               #endif
    1.51 +
    1.52      }
    1.53  
    1.54