comparison MasterLoop.c @ 131:395f58384a5c

dot output
author Nina Engelhardt
date Thu, 15 Sep 2011 17:31:33 +0200
parents 5475f90c248a
children aefd87f9d12f
comparison
equal deleted inserted replaced
36:6fb9470ac53d 37:75ff680b09b8
149 #endif 149 #endif
150 #ifdef MEAS__PERF_COUNTERS 150 #ifdef MEAS__PERF_COUNTERS
151 int lastRecordIdx = currSlot->procrAssignedToSlot->counter_history_array_info->numInArray -1; 151 int lastRecordIdx = currSlot->procrAssignedToSlot->counter_history_array_info->numInArray -1;
152 CounterRecord* lastRecord = currSlot->procrAssignedToSlot->counter_history[lastRecordIdx]; 152 CounterRecord* lastRecord = currSlot->procrAssignedToSlot->counter_history[lastRecordIdx];
153 lastRecord->req_core = thisCoresIdx; 153 lastRecord->req_core = thisCoresIdx;
154 saveCyclesAndInstrs(thisCoresIdx,lastRecord->req_cycles,lastRecord->req_instrs); 154 saveCyclesAndInstrs(thisCoresIdx,lastRecord->next_task_req_cycles,lastRecord->next_task_req_instrs);
155 //End of task, start of next task 155 //End of task, start of next task
156 //print counters from last run 156 //print counters from last run
157 addToDynArray((void*)lastRecord,masterEnv->counter_history_array_info);
157 print_record_csv_to_file(lastRecord,_VMSMasterEnv->counteroutput); 158 print_record_csv_to_file(lastRecord,_VMSMasterEnv->counteroutput);
158 159
159 Dependency* newd = new_dependency(currSlot->procrAssignedToSlot->procrID,lastRecord->task_position,currSlot->procrAssignedToSlot->procrID,lastRecord->task_position + 1); 160 Dependency* newd = new_dependency(currSlot->procrAssignedToSlot->procrID,lastRecord->task_position,currSlot->procrAssignedToSlot->procrID,lastRecord->task_position + 1);
160 addToDynArray((void*) newd ,masterEnv->dependenciesInfo); 161 addToDynArray((void*) newd ,masterEnv->dependenciesInfo);
161 162
163 //create new entry in record array 164 //create new entry in record array
164 CounterRecord* newRecord = VMS__malloc(sizeof(CounterRecord)); 165 CounterRecord* newRecord = VMS__malloc(sizeof(CounterRecord));
165 newRecord->req_core = thisCoresIdx; 166 newRecord->req_core = thisCoresIdx;
166 newRecord->vp_id = currSlot->procrAssignedToSlot->procrID; 167 newRecord->vp_id = currSlot->procrAssignedToSlot->procrID;
167 newRecord->task_position = lastRecord->task_position + 1; 168 newRecord->task_position = lastRecord->task_position + 1;
169 newRecord->req_cycles = lastRecord->next_task_req_cycles;
170 newRecord->req_instrs = lastRecord->next_task_req_instrs;
168 getReturnAddressBeforeLibraryCall(currSlot->procrAssignedToSlot, &(newRecord->addr_of_libcall_for_req)); 171 getReturnAddressBeforeLibraryCall(currSlot->procrAssignedToSlot, &(newRecord->addr_of_libcall_for_req));
169 addToDynArray( (void*) newRecord, currSlot->procrAssignedToSlot->counter_history_array_info); 172 addToDynArray( (void*) newRecord, currSlot->procrAssignedToSlot->counter_history_array_info);
170 lastRecord = newRecord; 173 lastRecord = newRecord;
171 #endif 174 #endif
172 //============================================================ 175 //============================================================