Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
changeset 111:b1817e2451b1 perf_counters
add task # to counter stats
| author | Nina Engelhardt |
|---|---|
| date | Fri, 05 Aug 2011 18:03:07 +0200 |
| parents | 724c7a0b687f |
| children | fac1d896f6e9 |
| files | Counters/Counters.c Counters/Counters.h MasterLoop.c ProcrContext.c VMS.h |
| diffstat | 5 files changed, 10 insertions(+), 7 deletions(-) [+] |
line diff
1.1 --- a/Counters/Counters.c Wed Aug 03 17:05:18 2011 +0200 1.2 +++ b/Counters/Counters.c Fri Aug 05 18:03:07 2011 +0200 1.3 @@ -3,7 +3,7 @@ 1.4 1.5 1.6 void print_record_human_readable(CounterRecord* record){ 1.7 - printf("=== Loop Stats (VP %d suspended at %p): ===\n",record->vp_id,record->addr_of_libcall_for_req); 1.8 + printf("=== Loop Stats (VP %d # %d suspended at %p): ===\n",record->vp_id,record->task_position,record->addr_of_libcall_for_req); 1.9 printf("Constraints check done:\t%lu cycles, %lu instrs [Core %d]\n",record->sc_done_cycles,record->sc_done_instrs,record->req_core); 1.10 printf("Time in ready queue:\tblocked at %u, unblocked at %u\n",record->blocked_timestamp,record->unblocked_timestamp); 1.11 printf("Assigner started:\t%lu cycles, %lu instrs [Core %d]\n",record->start_assign_cycles,record->start_assign_instrs,record->assigning_core); 1.12 @@ -15,7 +15,7 @@ 1.13 1.14 void print_record_csv(CounterRecord* record) { 1.15 //Columns are VP,ret_addr, (core,cycles,instrs)* for each savepoint, blocked,unblocked 1.16 - printf("%d,%p,",record->vp_id,record->addr_of_libcall_for_req); 1.17 + printf("%d,%d,%p,",record->vp_id,record->task_position,record->addr_of_libcall_for_req); 1.18 printf("%d,%lu,%lu,",record->req_core,record->sc_done_cycles,record->sc_done_instrs); 1.19 printf("%d,%lu,%lu,",record->assigning_core,record->start_assign_cycles,record->start_assign_instrs); 1.20 printf("%d,%lu,%lu,",record->assigning_core,record->end_assign_cycles,record->end_assign_instrs); 1.21 @@ -27,7 +27,7 @@ 1.22 1.23 void print_record_csv_to_file(CounterRecord* record, FILE* file) { 1.24 //Columns are VP,ret_addr, (core,cycles,instrs)* for each savepoint, blocked,unblocked 1.25 - fprintf(file,"%d,%p,",record->vp_id,record->addr_of_libcall_for_req); 1.26 + fprintf(file,"%d,%d,%p,",record->vp_id,record->task_position,record->addr_of_libcall_for_req); 1.27 fprintf(file,"%d,%lu,%lu,",record->req_core,record->sc_done_cycles,record->sc_done_instrs); 1.28 fprintf(file,"%d,%lu,%lu,",record->assigning_core,record->start_assign_cycles,record->start_assign_instrs); 1.29 fprintf(file,"%d,%lu,%lu,",record->assigning_core,record->end_assign_cycles,record->end_assign_instrs);
2.1 --- a/Counters/Counters.h Wed Aug 03 17:05:18 2011 +0200 2.2 +++ b/Counters/Counters.h Fri Aug 05 18:03:07 2011 +0200 2.3 @@ -18,6 +18,7 @@ 2.4 int assigning_core; 2.5 int req_core; 2.6 int vp_id; 2.7 + int task_position; 2.8 uint32 blocked_timestamp; 2.9 uint32 unblocked_timestamp; 2.10 uint64 req_cycles;
3.1 --- a/MasterLoop.c Wed Aug 03 17:05:18 2011 +0200 3.2 +++ b/MasterLoop.c Fri Aug 05 18:03:07 2011 +0200 3.3 @@ -159,6 +159,7 @@ 3.4 CounterRecord* newRecord = VMS__malloc(sizeof(CounterRecord)); 3.5 newRecord->req_core = thisCoresIdx; 3.6 newRecord->vp_id = currSlot->procrAssignedToSlot->procrID; 3.7 + newRecord->task_position = lastRecord->task_position + 1; 3.8 getReturnAddressBeforeLibraryCall(currSlot->procrAssignedToSlot, &(newRecord->addr_of_libcall_for_req)); 3.9 addToDynArray( (void*) newRecord, currSlot->procrAssignedToSlot->counter_history_array_info); 3.10 lastRecord = newRecord;
4.1 --- a/ProcrContext.c Wed Aug 03 17:05:18 2011 +0200 4.2 +++ b/ProcrContext.c Fri Aug 05 18:03:07 2011 +0200 4.3 @@ -63,6 +63,7 @@ 4.4 newPr->counter_history = VMS__malloc(10*sizeof(void*)); 4.5 newPr->counter_history_array_info = makePrivDynArrayInfoFrom(&(newPr->counter_history),10); 4.6 CounterRecord* newRecord = VMS__malloc(sizeof(CounterRecord)); 4.7 + newRecord->task_position = 0; 4.8 addToDynArray( (void*) newRecord, newPr->counter_history_array_info); 4.9 #endif 4.10 //========================================================================
5.1 --- a/VMS.h Wed Aug 03 17:05:18 2011 +0200 5.2 +++ b/VMS.h Fri Aug 05 18:03:07 2011 +0200 5.3 @@ -434,13 +434,13 @@ 5.4 } \ 5.5 } while (0) 5.6 5.7 -#define getReturnAddressBeforeLibraryCall(vp_ptr, res_ptr) do{ \ 5.8 -void* frame_ptr0 = vp_ptr->framePtr; \ 5.9 +#define getReturnAddressBeforeLibraryCall(vp_ptr, res_ptr) do{ \ 5.10 +void* frame_ptr0 = vp_ptr->framePtr; \ 5.11 void* frame_ptr1 = *((void**)frame_ptr0); \ 5.12 void* frame_ptr2 = *((void**)frame_ptr1); \ 5.13 void* frame_ptr3 = *((void**)frame_ptr2); \ 5.14 -void* ret_addr = *((void**)frame_ptr3 + 1); \ 5.15 -*res_ptr = ret_addr; \ 5.16 +void* ret_addr = *((void**)frame_ptr3 + 1); \ 5.17 +*res_ptr = ret_addr; \ 5.18 } while (0) 5.19 5.20 #define MEAS__SUB_CREATE /*turn on/off subtraction of create from plugin*/
