comparison VMS.h @ 185:28cc465f7eb7

new counter interface works now
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Fri, 13 Jan 2012 18:34:31 +0100
parents 50b29548d4f0
children 69eb54ce9c4b
comparison
equal deleted inserted replaced
84:2ff374d48178 85:0078ced26a6f
14 #include "Queue_impl/PrivateQueue.h" 14 #include "Queue_impl/PrivateQueue.h"
15 #include "Histogram/Histogram.h" 15 #include "Histogram/Histogram.h"
16 #include "DynArray/DynArray.h" 16 #include "DynArray/DynArray.h"
17 #include "Hash_impl/PrivateHash.h" 17 #include "Hash_impl/PrivateHash.h"
18 #include "vmalloc.h" 18 #include "vmalloc.h"
19 #include "Counters/Counters.h"
20 #include "loop.h" 19 #include "loop.h"
21 #include "ListOfArrays/ListOfArrays.h" 20 #include "ListOfArrays/ListOfArrays.h"
22 21
23 #include <pthread.h> 22 #include <pthread.h>
24 #include <sys/time.h> 23 #include <sys/time.h>
128 typedef VirtProcr * (*SlaveScheduler) ( void *, int, int ); //semEnv, coreIdx 127 typedef VirtProcr * (*SlaveScheduler) ( void *, int, int ); //semEnv, coreIdx
129 typedef void (*RequestHandler) ( VirtProcr *, void * ); //prWReqst, semEnv 128 typedef void (*RequestHandler) ( VirtProcr *, void * ); //prWReqst, semEnv
130 typedef void (*VirtProcrFnPtr) ( void *, VirtProcr * ); //initData, animPr 129 typedef void (*VirtProcrFnPtr) ( void *, VirtProcr * ); //initData, animPr
131 typedef void VirtProcrFn ( void *, VirtProcr * ); //initData, animPr 130 typedef void VirtProcrFn ( void *, VirtProcr * ); //initData, animPr
132 typedef void (*ResumePrFnPtr) ( VirtProcr *, void * ); 131 typedef void (*ResumePrFnPtr) ( VirtProcr *, void * );
133 typedef void (*CounterHandler) (int,int,int,VirtProcr*,uint64,uint64); 132 typedef void (*CounterHandler) (int,VirtProcr*,uint64,uint64);
134 133
135 //============= Requests =========== 134 //============= Requests ===========
136 // 135 //
137 136
138 enum VMSReqstType //avoid starting enums at 0, for debug reasons 137 enum VMSReqstType //avoid starting enums at 0, for debug reasons
271 Histogram *masterLockHighTimeHist; 270 Histogram *masterLockHighTimeHist;
272 #endif 271 #endif
273 #ifdef MEAS__PERF_COUNTERS 272 #ifdef MEAS__PERF_COUNTERS
274 int cycles_counter_fd[NUM_CORES]; 273 int cycles_counter_fd[NUM_CORES];
275 int instrs_counter_fd[NUM_CORES]; 274 int instrs_counter_fd[NUM_CORES];
276 FILE* counteroutput; 275 //FILE* counteroutput;
277 #endif
278 #ifdef MEAS__PERF_COUNTERS //
279 //CounterRecord** counter_history; 276 //CounterRecord** counter_history;
280 //PrivDynArrayInfo* counter_history_array_info; 277 //PrivDynArrayInfo* counter_history_array_info;
281 CounterHandler counterHandler; 278 CounterHandler counterHandler;
282 #endif 279 #endif
283 } 280 }
447 444
448 enum eventType { 445 enum eventType {
449 MasterLoop_beforeReqHdlr = 1, 446 MasterLoop_beforeReqHdlr = 1,
450 MasterLoop_afterReqHdlr, 447 MasterLoop_afterReqHdlr,
451 MasterLoop_beforeAssign, 448 MasterLoop_beforeAssign,
452 MasterLoop_afterAssign 449 MasterLoop_afterAssign,
450 CoreLoop_afterWork,
451 CoreLoop_beforeWork
453 }; 452 };
454 453
455 #define getReturnAddressBeforeLibraryCall(vp_ptr, res_ptr) do{ \ 454 #define getReturnAddressBeforeLibraryCall(vp_ptr, res_ptr) do{ \
456 void* frame_ptr0 = vp_ptr->framePtr; \ 455 void* frame_ptr0 = vp_ptr->framePtr; \
457 void* frame_ptr1 = *((void**)frame_ptr0); \ 456 void* frame_ptr1 = *((void**)frame_ptr0); \