#include <sys/time.h>#include <stack/stack.h>#include "../constants.h"Include dependency graph for Instrumentation.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | _InstState_ |
| this is a state More... | |
| struct | _InstrumentationData |
| this holds the instrumentation data More... | |
Defines | |
| #define | TIMER_NUM_VOID_STATES 9 |
| WARNING: if you change the number of states above, change here also! | |
| #define | INST_DIR "instrumentation" |
Typedefs | |
| typedef _InstState_ | InstState |
| this is a state | |
| typedef _InstrumentationData | InstData |
| this holds the instrumentation data | |
Enumerations | |
| enum | TimerState { TIMER_INIT = 0, TIMER_PROC, TIMER_READ, TIMER_WRITE, TIMER_WRITE_BLOCKED, TIMER_LS, TIMER_FINALIZE, TIMER_VOID, TIMER_END } |
| The program can be in either of these states proc means processing read means entered a receive function write means entered a write function init means is initializing(initFilter) finalizing mean is in finalize(finalizeFilter) void means time void used for its own end is used to end timing results process is the sum of proc, read and write. More... | |
Functions | |
| InstData * | instCreate () |
| Starts the instrumentation data, zeroing everything. | |
| void | instDestroy (InstData **InstDataPointerAddress) |
| Destroys the Instrumentation data, NULLing the pointer. | |
| void | instSetDir (InstData *inst, char *dir) |
| Sets instrumentation directory, where we write instrumentation data. | |
| void | instEnterState (InstData *inst, InstState *state) |
| enter a state, which can be a void state or am user state. | |
| void | instSwitchState (InstData *inst, InstState *state) |
| switches the state, which means the current one is computed but not stacked, and current is set to the new one | |
| void | instLeaveState (InstData *inst) |
| leaves the current state, computing times for it. | |
| void | instSaveTimings (InstData *inst, char *filename, char *label) |
| Saves all instrumentation data to a file, appending time there. | |
| void | instSetUserStates (InstData *inst, char **userStatesArray, int numStates) |
| Adds user states to the instrumentation. | |
|
|
Definition at line 32 of file Instrumentation.h. |
|
|
WARNING: if you change the number of states above, change here also!
Definition at line 24 of file Instrumentation.h. Referenced by instCreate(), and instSaveTimings(). |
|
|
this holds the instrumentation data
|
|
|
this is a state
|
|
|
The program can be in either of these states proc means processing read means entered a receive function write means entered a write function init means is initializing(initFilter) finalizing mean is in finalize(finalizeFilter) void means time void used for its own end is used to end timing results process is the sum of proc, read and write.
Definition at line 18 of file Instrumentation.h. |
|
|
Starts the instrumentation data, zeroing everything.
Definition at line 9 of file Instrumentation.c. References _InstState_::isUserState, _InstState_::stateName, TIMER_NUM_VOID_STATES, _InstState_::timing, and _InstrumentationData::voidStates. Referenced by createFilterData(). |
|
|
Destroys the Instrumentation data, NULLing the pointer.
Definition at line 34 of file Instrumentation.c. References _InstrumentationData::numUserStates, _InstState_::stateName, and _InstrumentationData::userStates. |
|
||||||||||||
|
enter a state, which can be a void state or am user state. The current state timings are computed and is stacked, so we can return to it later
Definition at line 93 of file Instrumentation.c. References _InstrumentationData::currentState, _InstrumentationData::stackedStates, stPush(), _InstrumentationData::tv, and _InstrumentationData::tz. Referenced by dsInstEnterState(), dsMCast(), dsReadBuffer(), dsReadNonBlockingBuffer(), dsSend(), and dsWriteBuffer(). Here is the call graph for this function: ![]() |
|
|
leaves the current state, computing times for it. The current state is set to the Top of the stack, which is poped
Definition at line 107 of file Instrumentation.c. References _InstrumentationData::currentState, _InstrumentationData::stackedStates, stPop(), _InstrumentationData::tv, and _InstrumentationData::tz. Referenced by dsInstLeaveState(), dsReadBuffer(), dsReadNonBlockingBuffer(), dsSend(), and dsWriteBuffer(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Saves all instrumentation data to a file, appending time there.
Definition at line 135 of file Instrumentation.c. References _InstrumentationData::instDir, MAX_FNAME_LENGTH, MAX_IDIR_LENGTH, _InstState_::stateName, TIMER_NUM_VOID_STATES, _InstState_::timing, and _InstrumentationData::voidStates. |
|
||||||||||||
|
Sets instrumentation directory, where we write instrumentation data. Its usually instrumentation/#-#-#... where # is the number of instances each filter has in the pipeline
Definition at line 49 of file Instrumentation.c. References _InstrumentationData::instDir, and MAX_IDIR_LENGTH. |
|
||||||||||||||||
|
Adds user states to the instrumentation.
Definition at line 165 of file Instrumentation.c. References _InstState_::isUserState, _InstrumentationData::numUserStates, _InstState_::stateName, _InstState_::timing, and _InstrumentationData::userStates. Referenced by dsInstSetStates(). |
|
||||||||||||
|
switches the state, which means the current one is computed but not stacked, and current is set to the new one
Definition at line 126 of file Instrumentation.c. References _InstrumentationData::currentState, _InstrumentationData::tv, and _InstrumentationData::tz. Referenced by dsInstSwitchState(). |
1.4.6