2.1.1-beta (revision 4703)
|
This is the global snapshot event reader. More...
#include <stdint.h>
#include <otf2/OTF2_ErrorCodes.h>
#include <otf2/OTF2_SnapReader.h>
#include <otf2/OTF2_GlobalSnapReaderCallbacks.h>
Go to the source code of this file.
Functions | |
OTF2_ErrorCode | OTF2_GlobalSnapReader_SetCallbacks (OTF2_GlobalSnapReader *reader, const OTF2_GlobalSnapReaderCallbacks *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_GlobalSnapReader_ReadSnapshots (OTF2_GlobalSnapReader *reader, uint64_t recordsToRead, uint64_t *recordsRead) |
Reads the given number of records from the global snap event reader. More... | |
This is the global snapshot event reader.
Used to read from multiple local snap event readers, and provide them in a timely ordered sequence.
OTF2_ErrorCode OTF2_GlobalSnapReader_SetCallbacks | ( | OTF2_GlobalSnapReader * | reader, |
const OTF2_GlobalSnapReaderCallbacks * | 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.
reader | Reader object which reads the snap events from its buffer. |
callbacks | Struct which holds a function pointer for each record type. OTF2_GlobalSnapReaderCallbacks_New. |
userData | Data passed as argument userData to the record callbacks. |
OTF2_ErrorCode OTF2_GlobalSnapReader_ReadSnapshots | ( | OTF2_GlobalSnapReader * | reader, |
uint64_t | recordsToRead, | ||
uint64_t * | recordsRead | ||
) |
Reads the given number of records from the global snap event reader.
reader | The records of this reader will be read when the function is issued. | |
recordsToRead | This variable tells the reader how much records it has to read. | |
[out] | recordsRead | This is a pointer to variable where the amount of actually read records is returned. This may differ to the given recordsToRead if there are no more records left in the trace. In this case the programmer can easily check that the reader has finished his job by checking recordsRead < recordsToRead. |