VMS/VMS_Implementations/Vthread_impls/Vthread_MC_shared_impl

view Vthread__Measurement.h @ 29:b94dc57e4455

refactored many files -- chgd names, moved code around -- doesn't compile
author Some Random Person <seanhalle@yahoo.com>
date Wed, 09 May 2012 13:24:19 -0700
parents
children
line source
1 /*
2 *
3 *
4 * Created on June 10, 2011, 12:20 PM
5 */
7 #ifndef VTHREAD_MEAS_H
8 #define VTHREAD_MEAS_H
10 #ifdef MEAS__TURN_ON_LANG_MEAS
12 #ifdef MEAS__Make_Meas_Hists_for_Language
13 #undef MEAS__Make_Meas_Hists_for_Language
14 #endif
16 //=================== Language-specific Measurement Stuff ===================
17 //
18 //
19 #define createHistIdx 1 //note: starts at 1
20 #define mutexLockHistIdx 2
21 #define mutexUnlockHistIdx 3
22 #define condWaitHistIdx 4
23 #define condSignalHistIdx 5
25 #define MEAS__Make_Meas_Hists_for_Language \
26 _VMSMasterEnv->measHistsInfo = \
27 makePrivDynArrayOfSize( (void***)&(_VMSMasterEnv->measHists), 200); \
28 makeAMeasHist( createHistIdx, "create", 250, 0, 100 ) \
29 makeAMeasHist( mutexLockHistIdx, "mutex_lock", 50, 0, 100 ) \
30 makeAMeasHist( mutexUnlockHistIdx, "mutex_unlock", 50, 0, 100 ) \
31 makeAMeasHist( condWaitHistIdx, "cond_wait", 50, 0, 100 ) \
32 makeAMeasHist( condSignalHistIdx, "cond_signal", 50, 0, 100 )
35 #define Meas_startCreate \
36 int32 startStamp, endStamp; \
37 saveLowTimeStampCountInto( startStamp );
39 #define Meas_endCreate \
40 saveLowTimeStampCountInto( endStamp ); \
41 addIntervalToHist( startStamp, endStamp, \
42 _VMSMasterEnv->measHists[ createHistIdx ] );
44 #define Meas_startMutexLock \
45 int32 startStamp, endStamp; \
46 saveLowTimeStampCountInto( startStamp );
48 #define Meas_endMutexLock \
49 saveLowTimeStampCountInto( endStamp ); \
50 addIntervalToHist( startStamp, endStamp, \
51 _VMSMasterEnv->measHists[ mutexLockHistIdx ] );
53 #define Meas_startMutexUnlock \
54 int32 startStamp, endStamp; \
55 saveLowTimeStampCountInto( startStamp );
57 #define Meas_endMutexUnlock \
58 saveLowTimeStampCountInto( endStamp ); \
59 addIntervalToHist( startStamp, endStamp, \
60 _VMSMasterEnv->measHists[ mutexUnlockHistIdx ] );
62 #define Meas_startCondWait \
63 int32 startStamp, endStamp; \
64 saveLowTimeStampCountInto( startStamp );
66 #define Meas_endCondWait \
67 saveLowTimeStampCountInto( endStamp ); \
68 addIntervalToHist( startStamp, endStamp, \
69 _VMSMasterEnv->measHists[ condWaitHistIdx ] );
71 #define Meas_startCondSignal \
72 int32 startStamp, endStamp; \
73 saveLowTimeStampCountInto( startStamp );
75 #define Meas_endCondSignal \
76 saveLowTimeStampCountInto( endStamp ); \
77 addIntervalToHist( startStamp, endStamp, \
78 _VMSMasterEnv->measHists[ condSignalHistIdx ] );
80 #else //===================== turned off ==========================
82 #define MEAS__Make_Meas_Hists_for_Language
83 #define Meas_startCreate
84 #define Meas_endCreate
85 #define Meas_startMutexLock
86 #define Meas_endMutexLock
87 #define Meas_startMutexUnlock
88 #define Meas_endMutexUnlock
89 #define Meas_startCondWait
90 #define Meas_endCondWait
91 #define Meas_startCondSignal
92 #define Meas_endCondSignal
94 #endif /* MEAS__TURN_ON_LANG_MEAS */
97 #endif /* VTHREAD_MEAS_H */