OpenMPI
0.1.1
|
The reader provides high level read access to traces disregarding the presence of streams. More...
Files | |
file | OTF_Reader.h |
Transparently reads OTF traces which consist of multiple streams. | |
Typedefs | |
typedef struct struct_OTF_Reader | OTF_Reader |
reader object | |
Functions | |
OTF_Reader * | OTF_Reader_open (const char *namestub, OTF_FileManager *manager) |
Open a MasterControl file and return a OTF_Reader. More... | |
int | OTF_Reader_setBufferSizes (OTF_Reader *reader, uint32_t size) |
Set the default buffer size for all buffers managed by this Reader. More... | |
uint32_t | OTF_Reader_getBufferSizes (OTF_Reader *reader) |
Get the default buffer size. More... | |
void | OTF_Reader_setZBufferSizes (OTF_Reader *reader, uint32_t size) |
Set the default zbuffer size for all buffers managed by this Reader. More... | |
uint32_t | OTF_Reader_getZBufferSizes (OTF_Reader *reader) |
Get the default zbuffer size. More... | |
OTF_MasterControl * | OTF_Reader_getMasterControl (OTF_Reader *reader) |
Get a pointer to the mastercontrol of the reader. More... | |
int | OTF_Reader_close (OTF_Reader *reader) |
Close an OTF_Reader instance and all its related files. More... | |
uint64_t | OTF_Reader_readDefinitions (OTF_Reader *reader, OTF_HandlerArray *handlers) |
This function reads all definitions from trace. More... | |
uint64_t | OTF_Reader_readEvents (OTF_Reader *reader, OTF_HandlerArray *handlers) |
This function reads all events from trace and calls the appropriate handler sorted by time. More... | |
uint64_t | OTF_Reader_readEventsUnsorted (OTF_Reader *reader, OTF_HandlerArray *handlers) |
This function reads all events from trace and calls the appropriate handler NOT sorted by time. More... | |
uint64_t | OTF_Reader_readSnapshots (OTF_Reader *reader, OTF_HandlerArray *handlers) |
This function reads all snapshots from trace. More... | |
uint64_t | OTF_Reader_readSnapshotsUnsorted (OTF_Reader *reader, OTF_HandlerArray *handlers) |
This function reads all snapshots from trace and calls the appropriate handler NOT sorted by time. More... | |
uint64_t | OTF_Reader_readStatistics (OTF_Reader *reader, OTF_HandlerArray *handlers) |
This function reads all statistic records from trace. More... | |
uint64_t | OTF_Reader_readStatisticsUnsorted (OTF_Reader *reader, OTF_HandlerArray *handlers) |
This function reads all statistics from trace and calls the appropriate handler NOT sorted by time. More... | |
uint64_t | OTF_Reader_readMarkers (OTF_Reader *reader, OTF_HandlerArray *handlers) |
This function reads all markers from trace. More... | |
OTF_RStream * | OTF_Reader_getStream (OTF_Reader *reader, uint32_t id) |
Searchs a reader stream and returns it. More... | |
int | OTF_Reader_disableProcess (OTF_Reader *reader, uint32_t processId) |
disable given process. More... | |
int | OTF_Reader_enableProcess (OTF_Reader *reader, uint32_t processId) |
enable given process. More... | |
uint8_t | OTF_Reader_getProcessStatus (OTF_Reader *reader, uint32_t processId) |
Returns the current process status. More... | |
int | OTF_Reader_setProcessStatus (OTF_Reader *reader, uint32_t processId, uint8_t status) |
Sets the current status of the process. More... | |
int | OTF_Reader_setProcessStatusAll (OTF_Reader *reader, uint8_t status) |
Sets the status for all processes with a single call. More... | |
void | OTF_Reader_setTimeInterval (OTF_Reader *reader, uint64_t minTime, uint64_t maxTime) |
Set the minimum time and the maximum time of the reader. More... | |
uint64_t | OTF_Reader_getTimeIntervalMin (OTF_Reader *reader) |
Returns the begin of current time interval. More... | |
uint64_t | OTF_Reader_getTimeIntervalMax (OTF_Reader *reader) |
Returns end of current time interval. More... | |
void | OTF_Reader_setRecordLimit (OTF_Reader *reader, uint64_t limit) |
Set the maximum number of records delivered by a single call to OTF_Reader_readXYZ(). More... | |
uint64_t | OTF_Reader_getRecordLimit (OTF_Reader *reader) |
Returns the current record limit. More... | |
void | OTF_Reader_reset (OTF_Reader *reader) |
Resets all filters for timelimit, process selection and record count limit. More... | |
int | OTF_Reader_closeAllStreams (OTF_Reader *reader) |
Closes all streams that are open in the reader. More... | |
uint8_t | OTF_Reader_eventTimeProgress (OTF_Reader *reader, uint64_t *minimum, uint64_t *current, uint64_t *maximum) |
Delivers a progress report for reading events. More... | |
uint8_t | OTF_Reader_snapshotTimeProgress (OTF_Reader *reader, uint64_t *minimum, uint64_t *current, uint64_t *maximum) |
Delivers a progress report for reading snapshots. More... | |
uint8_t | OTF_Reader_statisticTimeProgress (OTF_Reader *reader, uint64_t *minimum, uint64_t *current, uint64_t *maximum) |
Delivers a progress report for reading statistics. More... | |
uint8_t | OTF_Reader_eventBytesProgress (OTF_Reader *reader, uint64_t *minimum, uint64_t *current, uint64_t *maximum) |
Delivers a progress report for reading events. More... | |
uint8_t | OTF_Reader_snapshotBytesProgress (OTF_Reader *reader, uint64_t *minimum, uint64_t *current, uint64_t *maximum) |
Delivers a progress report for reading snapshots. More... | |
uint8_t | OTF_Reader_statisticBytesProgress (OTF_Reader *reader, uint64_t *minimum, uint64_t *current, uint64_t *maximum) |
Delivers a progress report for reading statistics. More... | |
The reader provides high level read access to traces disregarding the presence of streams.
Define handlers/callbacks for the records you want to read.
Declare a file manager, a reader, and a handler array.
Initialize the file manager. Do not open more than 100 files.
Initialize the handler array.
Initialize the reader.
Register your callback functions to the handler array.
Do the actual reading.
Clean everything up before exiting the program.
Compile and link this using $ gcc -o test test.c otfconfig --libs
.
Same as before
Create a structure, which holds information needed in every handler. We will register this structure to the handlers, so that the userData pointer in every handler will point to it. In this example we just want to count the occurences.
Define four handlers. In every handler we will increase HandlerArgument::count.
Same as before
We need some additional variables for the read progress
Register handlers for define process records, define function records, enter records and leave records
Register the first handler argument ha to the handler where it should be passed into.
Read definitions ( .def files). Inside this function the defProcess and defFunction handler will be called.
Set the record limit to zero and read the events once. This initializes internal datastructures needed for getting the reading progress.
To leave OTF_Reader_readEvents() once in a while, in order to update the progress, set the record limit to an appropriate number. 100000 in this case.
Read the trace until no records are left.
If an error occurs, leave the program.
Update the progress.
Print out the gathered count of occurences of the four record types.
Finish everything
Compile and link this using $ gcc -o test test.c otfconfig --libs
.
When executing this test the output will be something like this:
* 4194304b / 73530754b * [..] * 73530754b / 73530754b * count: 4582694
int OTF_Reader_close | ( | OTF_Reader * | reader | ) |
Close an OTF_Reader instance and all its related files.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
int OTF_Reader_closeAllStreams | ( | OTF_Reader * | reader | ) |
Closes all streams that are open in the reader.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
References struct_OTF_Reader::n, OTF_RStream_close(), and struct_OTF_Reader::stream.
int OTF_Reader_disableProcess | ( | OTF_Reader * | reader, |
uint32_t | processId | ||
) |
disable given process.
deprecated, use 'OTF_Reader_setProcessStatus()' instead.
This funktion will destroy a pending read operation, i.e. a read operation currently interrupted cannot be continued!
int OTF_Reader_enableProcess | ( | OTF_Reader * | reader, |
uint32_t | processId | ||
) |
enable given process.
deprecated, use 'OTF_Reader_setProcessStatus()' instead.
This funktion will destroy a pending read operation, i.e. a read operation currently interrupted cannot be continued!
uint8_t OTF_Reader_eventBytesProgress | ( | OTF_Reader * | reader, |
uint64_t * | minimum, | ||
uint64_t * | current, | ||
uint64_t * | maximum | ||
) |
Delivers a progress report for reading events.
Progress is given in terms of bytes. The percentage can be computed as ( current - minimum ) / ( maximum - minimum ).
ATTENTION: This is only a rough estimate of the progress, because it is computed based on the block I/O from files but not based on the actual bytes processed. This may result in constant values for small traces. See also OTF_Reader_eventTimeProgress():
This computation takes the read bytes of every active stream into account. The progress report is only valid after one or several calls to OTF_Reader_readEvents(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' > 'maximum' the values are invalid.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
minimum | Return value for the minium bytes read ( is 0 everytime ). |
current | Return value for the current bytes read. |
maximum | Return value for the filesize. |
References struct_OTF_Heap::buffers, struct_OTF_Heap::n, and OTF_RBuffer_getFilePos().
uint8_t OTF_Reader_eventTimeProgress | ( | OTF_Reader * | reader, |
uint64_t * | minimum, | ||
uint64_t * | current, | ||
uint64_t * | maximum | ||
) |
Delivers a progress report for reading events.
It is given in terms of time stamps. A percentage can be computed as ( current - minimum ) / ( maximum - minimum ). This computation takes restricted time intervals into account which is not possible with OTF_Reader_eventBytesProgress().
The progress report is only valid after one or several calls to OTF_Reader_readEvents(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' > 'maximum' the values are invalid.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
minimum | Return value for the minium time. |
current | Return value for the current time. |
maximum | Return value for the maximum time. |
References struct_OTF_Heap::progressMin.
Referenced by OTF_Reader_eventProgress().
uint32_t OTF_Reader_getBufferSizes | ( | OTF_Reader * | reader | ) |
Get the default buffer size.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
References struct_OTF_Reader::buffersizes.
OTF_MasterControl* OTF_Reader_getMasterControl | ( | OTF_Reader * | reader | ) |
Get a pointer to the mastercontrol of the reader.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
References struct_OTF_Reader::mc.
uint8_t OTF_Reader_getProcessStatus | ( | OTF_Reader * | reader, |
uint32_t | processId | ||
) |
Returns the current process status.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
processId | Identifier of the process to get the status from |
Returns the current process status.
uint64_t OTF_Reader_getRecordLimit | ( | OTF_Reader * | reader | ) |
Returns the current record limit.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
References struct_OTF_Reader::recordLimit.
OTF_RStream* OTF_Reader_getStream | ( | OTF_Reader * | reader, |
uint32_t | id | ||
) |
Searchs a reader stream and returns it.
If the stream does not exist it will be created.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
id | Identifier of the stream searched. |
References struct_OTF_Reader::buffersizes, struct_OTF_RStream::id, struct_OTF_Reader::manager, struct_OTF_Reader::n, struct_OTF_Reader::namestub, OTF_RStream_open(), OTF_RStream_setBufferSizes(), OTF_RStream_setZBufferSizes(), and struct_OTF_Reader::stream.
uint64_t OTF_Reader_getTimeIntervalMax | ( | OTF_Reader * | reader | ) |
Returns end of current time interval.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
References struct_OTF_Reader::maxTime.
uint64_t OTF_Reader_getTimeIntervalMin | ( | OTF_Reader * | reader | ) |
Returns the begin of current time interval.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
References struct_OTF_Reader::minTime.
uint32_t OTF_Reader_getZBufferSizes | ( | OTF_Reader * | reader | ) |
Get the default zbuffer size.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
OTF_Reader* OTF_Reader_open | ( | const char * | namestub, |
OTF_FileManager * | manager | ||
) |
Open a MasterControl file and return a OTF_Reader.
namestub | File name prefix which is going to be used by all sub-files which belong to the trace. |
fileManager | File handle manager. |
References struct_OTF_Reader::manager, struct_OTF_Reader::mc, struct_OTF_Reader::namestub, OTF_MasterControl_new(), OTF_MasterControl_read(), OTF_stripFilename(), struct_OTF_ProcessList::processes, and struct_OTF_ProcessList::status.
uint64_t OTF_Reader_readDefinitions | ( | OTF_Reader * | reader, |
OTF_HandlerArray * | handlers | ||
) |
This function reads all definitions from trace.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
handlers | Pointer to the handler array. |
References struct_OTF_MapEntry::argument, struct_OTF_RBuffer::buffer, struct_OTF_Heap::buffers, struct_OTF_RBuffer::end, struct_OTF_Reader::mc, struct_OTF_Heap::n, OTF_KeyValueList_reset(), OTF_MasterControl_getEntryByIndex(), OTF_RBuffer_getRecord(), OTF_Reader_parseDefRecord(), struct_OTF_RBuffer::pos, and struct_OTF_Reader::recordLimit.
uint64_t OTF_Reader_readEvents | ( | OTF_Reader * | reader, |
OTF_HandlerArray * | handlers | ||
) |
This function reads all events from trace and calls the appropriate handler sorted by time.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
handlers | Pointer to the handler array. |
References struct_OTF_RBuffer::buffer, struct_OTF_Heap::buffers, struct_OTF_RBuffer::end, struct_OTF_RBuffer::firstTime, struct_OTF_RBuffer::lastTime, struct_OTF_Reader::maxTime, struct_OTF_Reader::minTime, struct_OTF_Heap::n, OTF_KeyValueList_reset(), OTF_RBuffer_getFilePos(), OTF_RBuffer_getFileProperties(), OTF_RBuffer_getFileSize(), OTF_RBuffer_getRecord(), OTF_RBuffer_readNewline(), OTF_RBuffer_searchTime(), OTF_Reader_parseEventRecord(), struct_OTF_RBuffer::pos, struct_OTF_RBuffer::process, struct_OTF_Heap::progressMin, struct_OTF_Reader::recordLimit, and struct_OTF_RBuffer::time.
uint64_t OTF_Reader_readEventsUnsorted | ( | OTF_Reader * | reader, |
OTF_HandlerArray * | handlers | ||
) |
This function reads all events from trace and calls the appropriate handler NOT sorted by time.
It calls every handler in ONE stream sorted by time. And walks through the streams one by one. ( So the handlers of one process will be called, sorted by time, too )
This function is faster than OTF_Reader_readEvents(), especially for a bigger number of streams
References struct_OTF_RBuffer::buffer, struct_OTF_Heap::buffers, struct_OTF_RBuffer::end, struct_OTF_RBuffer::firstTime, struct_OTF_RBuffer::lastTime, struct_OTF_Reader::maxTime, struct_OTF_Reader::minTime, struct_OTF_Heap::n, OTF_KeyValueList_reset(), OTF_RBuffer_getFilePos(), OTF_RBuffer_getFileProperties(), OTF_RBuffer_getFileSize(), OTF_RBuffer_getRecord(), OTF_RBuffer_readNewline(), OTF_RBuffer_searchTime(), OTF_Reader_parseEventRecord(), struct_OTF_RBuffer::pos, struct_OTF_RBuffer::process, struct_OTF_Heap::progressMin, struct_OTF_Heap::s, and struct_OTF_RBuffer::time.
uint64_t OTF_Reader_readMarkers | ( | OTF_Reader * | reader, |
OTF_HandlerArray * | handlers | ||
) |
This function reads all markers from trace.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
handlers | Pointer to the handler array. |
References struct_OTF_MapEntry::argument, struct_OTF_RBuffer::buffer, struct_OTF_Heap::buffers, struct_OTF_RBuffer::end, struct_OTF_Reader::mc, struct_OTF_Heap::n, OTF_KeyValueList_reset(), OTF_MasterControl_getEntryByIndex(), OTF_RBuffer_getRecord(), OTF_Reader_parseMarkerRecord(), struct_OTF_RBuffer::pos, and struct_OTF_Reader::recordLimit.
uint64_t OTF_Reader_readSnapshots | ( | OTF_Reader * | reader, |
OTF_HandlerArray * | handlers | ||
) |
This function reads all snapshots from trace.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
handlers | Pointer to the handler array. |
References struct_OTF_RBuffer::buffer, struct_OTF_Heap::buffers, struct_OTF_RBuffer::end, struct_OTF_RBuffer::firstTime, struct_OTF_RBuffer::lastTime, struct_OTF_Reader::maxTime, struct_OTF_Reader::minTime, struct_OTF_Heap::n, OTF_KeyValueList_reset(), OTF_RBuffer_getFilePos(), OTF_RBuffer_getFileProperties(), OTF_RBuffer_getFileSize(), OTF_RBuffer_getRecord(), OTF_RBuffer_readNewline(), OTF_RBuffer_searchTime(), OTF_Reader_parseSnapshotsRecord(), struct_OTF_RBuffer::pos, struct_OTF_RBuffer::process, struct_OTF_Heap::progressMin, struct_OTF_Reader::recordLimit, and struct_OTF_RBuffer::time.
uint64_t OTF_Reader_readSnapshotsUnsorted | ( | OTF_Reader * | reader, |
OTF_HandlerArray * | handlers | ||
) |
This function reads all snapshots from trace and calls the appropriate handler NOT sorted by time.
It calls every handler in ONE stream sorted by time. And it walks through the streams one by one. ( So the handlers of one process will be called, sorted by time, too )
This function is faster than OTF_Reader_readSnapshots(), especially for a bigger number of streams
References struct_OTF_RBuffer::buffer, struct_OTF_Heap::buffers, struct_OTF_RBuffer::end, struct_OTF_RBuffer::firstTime, struct_OTF_RBuffer::lastTime, struct_OTF_Reader::maxTime, struct_OTF_Reader::minTime, struct_OTF_Heap::n, OTF_KeyValueList_reset(), OTF_RBuffer_getFilePos(), OTF_RBuffer_getFileProperties(), OTF_RBuffer_getFileSize(), OTF_RBuffer_getRecord(), OTF_RBuffer_readNewline(), OTF_RBuffer_searchTime(), OTF_Reader_parseSnapshotsRecord(), struct_OTF_RBuffer::pos, struct_OTF_RBuffer::process, struct_OTF_Heap::progressMin, struct_OTF_Heap::s, and struct_OTF_RBuffer::time.
uint64_t OTF_Reader_readStatistics | ( | OTF_Reader * | reader, |
OTF_HandlerArray * | handlers | ||
) |
This function reads all statistic records from trace.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
handlers | Pointer to the handler array. |
References struct_OTF_RBuffer::buffer, struct_OTF_Heap::buffers, struct_OTF_RBuffer::end, struct_OTF_RBuffer::firstTime, struct_OTF_RBuffer::lastTime, struct_OTF_Reader::maxTime, struct_OTF_Reader::minTime, struct_OTF_Heap::n, OTF_KeyValueList_reset(), OTF_RBuffer_getFilePos(), OTF_RBuffer_getFileProperties(), OTF_RBuffer_getFileSize(), OTF_RBuffer_getRecord(), OTF_RBuffer_readNewline(), OTF_RBuffer_searchTime(), OTF_Reader_parseStatisticsRecord(), struct_OTF_RBuffer::pos, struct_OTF_RBuffer::process, struct_OTF_Heap::progressMin, struct_OTF_Reader::recordLimit, and struct_OTF_RBuffer::time.
uint64_t OTF_Reader_readStatisticsUnsorted | ( | OTF_Reader * | reader, |
OTF_HandlerArray * | handlers | ||
) |
This function reads all statistics from trace and calls the appropriate handler NOT sorted by time.
It calls every handler in ONE stream sorted by time. And it walks through the streams one by one. ( So the handlers of one process will be called, sorted by time, too )
This function is faster than OTF_Reader_readStatistics(), especially for a bigger number of streams
References struct_OTF_RBuffer::buffer, struct_OTF_Heap::buffers, struct_OTF_RBuffer::end, struct_OTF_RBuffer::firstTime, struct_OTF_RBuffer::lastTime, struct_OTF_Reader::maxTime, struct_OTF_Reader::minTime, struct_OTF_Heap::n, OTF_KeyValueList_reset(), OTF_RBuffer_getFilePos(), OTF_RBuffer_getFileProperties(), OTF_RBuffer_getFileSize(), OTF_RBuffer_getRecord(), OTF_RBuffer_readNewline(), OTF_RBuffer_searchTime(), OTF_Reader_parseStatisticsRecord(), struct_OTF_RBuffer::pos, struct_OTF_RBuffer::process, struct_OTF_Heap::progressMin, struct_OTF_Heap::s, and struct_OTF_RBuffer::time.
void OTF_Reader_reset | ( | OTF_Reader * | reader | ) |
Resets all filters for timelimit, process selection and record count limit.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
References OTF_Reader_setProcessStatusAll(), OTF_Reader_setRecordLimit(), and OTF_Reader_setTimeInterval().
int OTF_Reader_setBufferSizes | ( | OTF_Reader * | reader, |
uint32_t | size | ||
) |
Set the default buffer size for all buffers managed by this Reader.
This is only effective for future buffers and will not change already allocated buffers. Those can be changed with the buffers directly.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
size | Intended buffer size. |
References struct_OTF_Reader::buffersizes.
int OTF_Reader_setProcessStatus | ( | OTF_Reader * | reader, |
uint32_t | processId, | ||
uint8_t | status | ||
) |
Sets the current status of the process.
This function will destroy a pending read operation, i.e. a read operation currently interrupted cannot be continued!
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
processId | Identifier of the process. |
status | new status of the process. '1' for enabled, '0' for disabled or unknown. |
Sets the current status of the process.
status is '0' for disabled and '1' for enabled
int OTF_Reader_setProcessStatusAll | ( | OTF_Reader * | reader, |
uint8_t | status | ||
) |
Sets the status for all processes with a single call.
This function will destroy a pending read operation, i.e. a read operation currently interrupted cannot be continued!
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
status | new status of the process. |
Referenced by OTF_Reader_reset().
void OTF_Reader_setRecordLimit | ( | OTF_Reader * | reader, |
uint64_t | limit | ||
) |
Set the maximum number of records delivered by a single call to OTF_Reader_readXYZ().
Defaults to OTF_READ_MAXRECORDS == . 'OTF_Reader_readXYZ()' returns with the number of records processed. Successive calls to 'OTF_Reader_readXYZ()' will deliver the remaining records. This funktion will NOT destroy a pending read operation, i.e. a read operation currently interrupted CAN be continued!
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
limit | record limit. has to be smaller than or equal to OTF_READ_MAXRECORDS |
References struct_OTF_Reader::recordLimit.
Referenced by OTF_Reader_reset().
void OTF_Reader_setTimeInterval | ( | OTF_Reader * | reader, |
uint64_t | minTime, | ||
uint64_t | maxTime | ||
) |
Set the minimum time and the maximum time of the reader.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
minTime | time where reading starts (including this timestamp) |
maxTime | time where reading ends (excluding this timestamp) |
References struct_OTF_Reader::maxTime, and struct_OTF_Reader::minTime.
Referenced by OTF_Reader_reset().
void OTF_Reader_setZBufferSizes | ( | OTF_Reader * | reader, |
uint32_t | size | ||
) |
Set the default zbuffer size for all buffers managed by this Reader.
This is only effective for future files and will not change already allocated zbuffers. Those can be changed with the files directly.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
size | Intended zbuffer size. |
uint8_t OTF_Reader_snapshotBytesProgress | ( | OTF_Reader * | reader, |
uint64_t * | minimum, | ||
uint64_t * | current, | ||
uint64_t * | maximum | ||
) |
Delivers a progress report for reading snapshots.
Progress is given in terms of bytes. The percentage can be computed as ( current - minimum ) / ( maximum - minimum ).
ATTENTION: This is only a rough estimate of the progress, because it is computed based on the block I/O from files but not based on the actual bytes processed. This may result in constant values for small traces. See also OTF_Reader_snapshotTimeProgress():
This computation takes the read bytes of every active stream into account. The progress report is only valid after one or several calls to OTF_Reader_readSnapshots(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' > 'maximum' the values are invalid.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
minimum | Return value for the minium bytes read ( is 0 everytime ). |
current | Return value for the current bytes read. |
maximum | Return value for the filesize. |
References struct_OTF_Heap::buffers, struct_OTF_Heap::n, and OTF_RBuffer_getFilePos().
uint8_t OTF_Reader_snapshotTimeProgress | ( | OTF_Reader * | reader, |
uint64_t * | minimum, | ||
uint64_t * | current, | ||
uint64_t * | maximum | ||
) |
Delivers a progress report for reading snapshots.
It is given in terms of time stamps. A percentage can be computed as ( current - minimum ) / ( maximum - minimum ). This computation takes restricted time intervals into account which is not possible with OTF_Reader_snapshotBytesProgress().
The progress report is only valid after one or several calls to OTF_Reader_readSnapshots(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' > 'maximum' the values are invalid.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
minimum | Return value for the minium time. |
current | Return value for the current time. |
maximum | Return value for the maximum time. |
References struct_OTF_Heap::progressMin.
Referenced by OTF_Reader_snapshotProgress().
uint8_t OTF_Reader_statisticBytesProgress | ( | OTF_Reader * | reader, |
uint64_t * | minimum, | ||
uint64_t * | current, | ||
uint64_t * | maximum | ||
) |
Delivers a progress report for reading statistics.
Progress is given in terms of bytes. The percentage can be computed as ( current - minimum ) / ( maximum - minimum ).
ATTENTION: This is only a rough estimate of the progress, because it is computed based on the block I/O from files but not based on the actual bytes processed. This may result in constant values for small traces. See also OTF_Reader_statisticTimeProgress():
This computation takes the read bytes of every active stream into account. The progress report is only valid after one or several calls to OTF_Reader_readStatistics(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' > 'maximum' the values are invalid.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
minimum | Return value for the minium bytes read ( is 0 everytime ). |
current | Return value for the current bytes read. |
maximum | Return value for the filesize. |
References struct_OTF_Heap::buffers, struct_OTF_Heap::n, and OTF_RBuffer_getFilePos().
uint8_t OTF_Reader_statisticTimeProgress | ( | OTF_Reader * | reader, |
uint64_t * | minimum, | ||
uint64_t * | current, | ||
uint64_t * | maximum | ||
) |
Delivers a progress report for reading statistics.
It is given in terms of time stamps. A percentage can be computed as ( current - minimum ) / ( maximum - minimum ). This computation takes restricted time intervals into account which is not possible with OTF_Reader_statisticBytesProgress().
The progress report is only valid after one or several calls to OTF_Reader_readStatistics(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are undefined! If 'minimum' > 'maximum' the values are invalid.
reader | Pointer to an initialized OTF_Reader object. See also OTF_Reader_open(). |
minimum | Return value for the minium time. |
current | Return value for the current time. |
maximum | Return value for the maximum time. |
References struct_OTF_Heap::progressMin.
Referenced by OTF_Reader_statisticProgress().