2.1.1-beta (revision 4703)
|
This is the local snap reader, which reads snapshot events from one location. More...
#include <stdint.h>
#include <otf2/OTF2_ErrorCodes.h>
#include <otf2/OTF2_Events.h>
#include <otf2/OTF2_Definitions.h>
#include <otf2/OTF2_AttributeList.h>
#include <otf2/OTF2_SnapReaderCallbacks.h>
Go to the source code of this file.
Functions | |
OTF2_ErrorCode | OTF2_SnapReader_GetLocationID (const OTF2_SnapReader *reader, OTF2_LocationRef *location) |
Return the location ID of the reading related location. More... | |
OTF2_ErrorCode | OTF2_SnapReader_SetCallbacks (OTF2_SnapReader *reader, const OTF2_SnapReaderCallbacks *callbacks, void *userData) |
Sets the callback functions for the given reader object. Every time when OTF2 reads a record, a callback function is called and the records data is passed to this function. Therefore the programmer needs to set function pointers at the "callbacks" struct for the record type he wants to read. More... | |
OTF2_ErrorCode | OTF2_SnapReader_Seek (OTF2_SnapReader *reader, uint64_t req_time, bool *found) |
Seek jumps to start of latest snapshot that was made before a given time 'req_time'. More... | |
OTF2_ErrorCode | OTF2_SnapReader_ReadSnapshots (OTF2_SnapReader *reader, uint64_t recordsToRead, uint64_t *recordsRead) |
After callback registration, the local snapshot events could be read with the following function. Reads at most recordsToRead records. The reader indicates that it reached the end of the trace by just reading less records than requested. More... | |
This is the local snap reader, which reads snapshot events from one location.
OTF2_ErrorCode OTF2_SnapReader_GetLocationID | ( | const OTF2_SnapReader * | reader, |
OTF2_LocationRef * | location | ||
) |
Return the location ID of the reading related location.
reader | Reader object which reads the snapshot events from its buffer. | |
[out] | location | ID of the location. |
OTF2_ErrorCode OTF2_SnapReader_SetCallbacks | ( | OTF2_SnapReader * | reader, |
const OTF2_SnapReaderCallbacks * | callbacks, | ||
void * | userData | ||
) |
Sets the callback functions for the given reader object. Every time when OTF2 reads a record, a callback function is called and the records data is passed to this function. Therefore the programmer needs to set function pointers at the "callbacks" struct for the record type he wants to read.
These callbacks are ignored, if the snapshot events are read by an global snapshot event reader.
reader | Reader object which reads the snapshot events from its buffer. |
callbacks | Struct which holds a function pointer for each record type. OTF2_SnapReaderCallbacks_New. |
userData | Data passed as argument userData to the record callbacks. |
OTF2_ErrorCode OTF2_SnapReader_Seek | ( | OTF2_SnapReader * | reader, |
uint64_t | req_time, | ||
bool * | found | ||
) |
Seek jumps to start of latest snapshot that was made before a given time 'req_time'.
reader | Reader object which reads the snapshot events from its buffer. |
req_time | Requested time (see above) |
found | returns if a matching snapshot was found |
OTF2_ErrorCode OTF2_SnapReader_ReadSnapshots | ( | OTF2_SnapReader * | reader, |
uint64_t | recordsToRead, | ||
uint64_t * | recordsRead | ||
) |
After callback registration, the local snapshot events could be read with the following function. Reads at most recordsToRead records. The reader indicates that it reached the end of the trace by just reading less records than requested.
reader | Reader object which reads the snapshot events from its buffer. | |
recordsToRead | How many records can be read next. | |
[out] | recordsRead | Return how many records where really read. |