comparison VMS.h @ 110:724c7a0b687f

save counters to file in csv
author Nina Engelhardt
date Wed, 03 Aug 2011 17:05:18 +0200
parents 659299627e70
children b1817e2451b1
comparison
equal deleted inserted replaced
49:f39703e744f0 50:91619545c0a0
31 31
32 //#define USE_WORK_STEALING 32 //#define USE_WORK_STEALING
33 33
34 //turns on the probe-instrumentation in the application -- when not 34 //turns on the probe-instrumentation in the application -- when not
35 // defined, the calls to the probe functions turn into comments 35 // defined, the calls to the probe functions turn into comments
36 #define STATS__ENABLE_PROBES 36 //#define STATS__ENABLE_PROBES
37 //#define TURN_ON_DEBUG_PROBES 37 //#define TURN_ON_DEBUG_PROBES
38 38
39 //These defines turn types of bug messages on and off 39 //These defines turn types of bug messages on and off
40 // be sure debug messages are un-commented (next block of defines) 40 // be sure debug messages are un-commented (next block of defines)
41 #define dbgAppFlow TRUE /* Top level flow of application code -- general*/ 41 #define dbgAppFlow TRUE /* Top level flow of application code -- general*/
265 Histogram *masterLockHighTimeHist; 265 Histogram *masterLockHighTimeHist;
266 #endif 266 #endif
267 #ifdef MEAS__PERF_COUNTERS 267 #ifdef MEAS__PERF_COUNTERS
268 int cycles_counter_fd[NUM_CORES]; 268 int cycles_counter_fd[NUM_CORES];
269 int instrs_counter_fd[NUM_CORES]; 269 int instrs_counter_fd[NUM_CORES];
270 FILE* counteroutput;
270 #endif 271 #endif
271 } 272 }
272 MasterEnv; 273 MasterEnv;
273 274
274 //========================= Extra Stuff Data Strucs ======================= 275 //========================= Extra Stuff Data Strucs =======================
364 VMS__suspend_procr( VirtProcr *callingPr ); 365 VMS__suspend_procr( VirtProcr *callingPr );
365 366
366 inline void 367 inline void
367 VMS__add_sem_request_in_mallocd_VMSReqst( void *semReqData, VirtProcr *callingPr ); 368 VMS__add_sem_request_in_mallocd_VMSReqst( void *semReqData, VirtProcr *callingPr );
368 369
369 inline void 370 /*inline*/ __attribute__ ((noinline)) void
370 VMS__send_sem_request( void *semReqData, VirtProcr *callingPr ); 371 VMS__send_sem_request( void *semReqData, VirtProcr *callingPr );
371 372
372 void 373 void
373 VMS__send_create_procr_req( void *semReqData, VirtProcr *reqstingPr ); 374 VMS__send_create_procr_req( void *semReqData, VirtProcr *reqstingPr );
374 375
375 void inline 376 void /*inline**/ __attribute__ ((noinline))
376 VMS__send_dissipate_req( VirtProcr *prToDissipate ); 377 VMS__send_dissipate_req( VirtProcr *prToDissipate );
377 378
378 inline void 379 /*inline**/ __attribute__ ((noinline)) void
379 VMS__send_VMSSem_request( void *semReqData, VirtProcr *callingPr ); 380 VMS__send_VMSSem_request( void *semReqData, VirtProcr *callingPr );
380 381
381 VMSReqst * 382 VMSReqst *
382 VMS__take_next_request_out_of( VirtProcr *procrWithReq ); 383 VMS__take_next_request_out_of( VirtProcr *procrWithReq );
383 384
431 perror("Error reading cycles counter"); \ 432 perror("Error reading cycles counter"); \
432 instrs = 0; \ 433 instrs = 0; \
433 } \ 434 } \
434 } while (0) 435 } while (0)
435 436
437 #define getReturnAddressBeforeLibraryCall(vp_ptr, res_ptr) do{ \
438 void* frame_ptr0 = vp_ptr->framePtr; \
439 void* frame_ptr1 = *((void**)frame_ptr0); \
440 void* frame_ptr2 = *((void**)frame_ptr1); \
441 void* frame_ptr3 = *((void**)frame_ptr2); \
442 void* ret_addr = *((void**)frame_ptr3 + 1); \
443 *res_ptr = ret_addr; \
444 } while (0)
436 445
437 #define MEAS__SUB_CREATE /*turn on/off subtraction of create from plugin*/ 446 #define MEAS__SUB_CREATE /*turn on/off subtraction of create from plugin*/
438 447
439 #ifdef VPTHREAD 448 #ifdef VPTHREAD
440 449