![]() |
1.2 (revision 3183)
|
Writing interface for OTF2 archives. More...
#include <stdint.h>
#include <otf2/OTF2_ErrorCodes.h>
#include <otf2/OTF2_Callbacks.h>
#include <otf2/OTF2_DefWriter.h>
#include <otf2/OTF2_DefReader.h>
#include <otf2/OTF2_EvtWriter.h>
#include <otf2/OTF2_EvtReader.h>
#include <otf2/OTF2_SnapWriter.h>
#include <otf2/OTF2_SnapReader.h>
#include <otf2/OTF2_GlobalDefWriter.h>
#include <otf2/OTF2_GlobalDefReader.h>
#include <otf2/OTF2_GlobalEvtReader.h>
#include <otf2/OTF2_GlobalSnapReader.h>
#include <otf2/OTF2_Thumbnail.h>
#include <otf2/OTF2_MarkerWriter.h>
#include <otf2/OTF2_MarkerReader.h>
Go to the source code of this file.
Defines | |
#define | OTF2_CHUNK_SIZE_DEFINITIONS_DEFAULT ( 4 * 1024 * 1024 ) |
Default size for OTF2's internal event chunk memory handling. | |
#define | OTF2_CHUNK_SIZE_EVENTS_DEFAULT ( 1024 * 1024 ) |
Default size for OTF2's internal event chunk memory handling. | |
Typedefs | |
typedef struct OTF2_Archive_struct | OTF2_Archive |
Keeps all meta-data for an OTF2 archive. | |
typedef uint8_t | OTF2_MasterSlaveMode |
Defines whether a location is master or slave. | |
Enumerations | |
enum | OTF2_MasterSlaveMode_enum { OTF2_SLAVE = 0, OTF2_MASTER = 1 } |
Defines whether a location is master or slave. More... | |
Functions | |
OTF2_ErrorCode | OTF2_Archive_Close (OTF2_Archive *archive) |
Close an opened archive. | |
OTF2_ErrorCode | OTF2_Archive_CloseDefReader (OTF2_Archive *archive, OTF2_DefReader *reader) |
Close an opened local definition reader. | |
OTF2_ErrorCode | OTF2_Archive_CloseDefWriter (OTF2_Archive *archive, OTF2_DefWriter *writer) |
Close an opened local definition writer. | |
OTF2_ErrorCode | OTF2_Archive_CloseEvtReader (OTF2_Archive *archive, OTF2_EvtReader *reader) |
Close an opened local event reader. | |
OTF2_ErrorCode | OTF2_Archive_CloseEvtWriter (OTF2_Archive *archive, OTF2_EvtWriter *writer) |
Close an opened local event writer. | |
OTF2_ErrorCode | OTF2_Archive_CloseGlobalDefReader (OTF2_Archive *archive, OTF2_GlobalDefReader *globalDefReader) |
Closes the global definition reader. | |
OTF2_ErrorCode | OTF2_Archive_CloseGlobalEvtReader (OTF2_Archive *archive, OTF2_GlobalEvtReader *globalEvtReader) |
Closes the global event reader. | |
OTF2_ErrorCode | OTF2_Archive_CloseGlobalSnapReader (OTF2_Archive *archive, OTF2_GlobalSnapReader *globalSnapReader) |
Close the opened global snapshot reader. | |
OTF2_ErrorCode | OTF2_Archive_CloseMarkerReader (OTF2_Archive *archive, OTF2_MarkerReader *markerReader) |
Closes the marker reader. | |
OTF2_ErrorCode | OTF2_Archive_CloseMarkerWriter (OTF2_Archive *archive, OTF2_MarkerWriter *writer) |
Close an opened marker writer. | |
OTF2_ErrorCode | OTF2_Archive_CloseSnapReader (OTF2_Archive *archive, OTF2_SnapReader *reader) |
Close an opened local snap reader. | |
OTF2_ErrorCode | OTF2_Archive_CloseSnapWriter (OTF2_Archive *archive, OTF2_SnapWriter *writer) |
Close an opened local snap writer. | |
OTF2_ErrorCode | OTF2_Archive_CloseThumbReader (OTF2_Archive *archive, OTF2_ThumbReader *reader) |
Close an opened thumbnail reader. | |
OTF2_ErrorCode | OTF2_Archive_GetChunkSize (OTF2_Archive *archive, uint64_t *chunkSizeEvents, uint64_t *chunkSizeDefs) |
Get the chunksize. | |
OTF2_ErrorCode | OTF2_Archive_GetCompression (OTF2_Archive *archive, OTF2_Compression *compression) |
Get compression mode (none or zlib) | |
OTF2_ErrorCode | OTF2_Archive_GetCreator (OTF2_Archive *archive, char **creator) |
Get creator information. | |
OTF2_DefReader * | OTF2_Archive_GetDefReader (OTF2_Archive *archive, OTF2_LocationRef location) |
Get a local definition reader. | |
OTF2_DefWriter * | OTF2_Archive_GetDefWriter (OTF2_Archive *archive, OTF2_LocationRef location) |
Get a local definition writer. | |
OTF2_ErrorCode | OTF2_Archive_GetDescription (OTF2_Archive *archive, char **description) |
Get description. | |
OTF2_EvtReader * | OTF2_Archive_GetEvtReader (OTF2_Archive *archive, OTF2_LocationRef location) |
Get a local event reader. | |
OTF2_EvtWriter * | OTF2_Archive_GetEvtWriter (OTF2_Archive *archive, OTF2_LocationRef location) |
Get a local event writer. | |
OTF2_ErrorCode | OTF2_Archive_GetFileSubstrate (OTF2_Archive *archive, OTF2_FileSubstrate *substrate) |
Get the file substrate (posix, sion, none) | |
OTF2_GlobalDefReader * | OTF2_Archive_GetGlobalDefReader (OTF2_Archive *archive) |
Get a global definition reader. | |
OTF2_GlobalDefWriter * | OTF2_Archive_GetGlobalDefWriter (OTF2_Archive *archive) |
Get a global definition writer. | |
OTF2_GlobalEvtReader * | OTF2_Archive_GetGlobalEvtReader (OTF2_Archive *archive) |
Get a global event reader. | |
OTF2_GlobalSnapReader * | OTF2_Archive_GetGlobalSnapReader (OTF2_Archive *archive) |
Get a global snap reader. | |
OTF2_ErrorCode | OTF2_Archive_GetMachineName (OTF2_Archive *archive, char **machineName) |
Get machine name. | |
OTF2_MarkerReader * | OTF2_Archive_GetMarkerReader (OTF2_Archive *archive) |
Get a marker reader. | |
OTF2_MarkerWriter * | OTF2_Archive_GetMarkerWriter (OTF2_Archive *archive) |
Get a marker writer. | |
OTF2_ErrorCode | OTF2_Archive_GetMasterSlaveMode (OTF2_Archive *archive, OTF2_MasterSlaveMode *masterOrSlave) |
Get master slave mode. | |
OTF2_ErrorCode | OTF2_Archive_GetNumberOfGlobalDefinitions (OTF2_Archive *archive, uint64_t *numberOfDefinitions) |
Get the number of global definitions. | |
OTF2_ErrorCode | OTF2_Archive_GetNumberOfLocations (OTF2_Archive *archive, uint64_t *numberOfLocations) |
Get the number of locations. | |
OTF2_ErrorCode | OTF2_Archive_GetNumberOfSnapshots (OTF2_Archive *archive, uint32_t *number) |
Get the number of snapshots. | |
OTF2_ErrorCode | OTF2_Archive_GetNumberOfThumbnails (OTF2_Archive *archive, uint32_t *number) |
Get the number of thumbnails. | |
OTF2_ErrorCode | OTF2_Archive_GetProperty (OTF2_Archive *archive, const char *name, char **value) |
Get the value of the named trace file property. | |
OTF2_ErrorCode | OTF2_Archive_GetPropertyNames (OTF2_Archive *archive, uint32_t *numberOfProperties, char ***names) |
Get the names of all trace file properties. | |
OTF2_SnapReader * | OTF2_Archive_GetSnapReader (OTF2_Archive *archive, OTF2_LocationRef location) |
Get a local snap reader. | |
OTF2_SnapWriter * | OTF2_Archive_GetSnapWriter (OTF2_Archive *archive, OTF2_LocationRef location) |
Get a local snap writer. | |
OTF2_ThumbReader * | OTF2_Archive_GetThumbReader (OTF2_Archive *archive, uint32_t number) |
Get a thumb reader. | |
OTF2_ThumbWriter * | OTF2_Archive_GetThumbWriter (OTF2_Archive *archive, const char *name, const char *description, OTF2_ThumbnailType type, uint32_t numberOfSamples, uint32_t numberOfMetrics, const uint64_t *refsToDefs) |
Get a thumb writer. | |
OTF2_ErrorCode | OTF2_Archive_GetTraceId (OTF2_Archive *archive, uint64_t *id) |
Get the identifier of the trace file. | |
OTF2_ErrorCode | OTF2_Archive_GetVersion (OTF2_Archive *archive, uint8_t *major, uint8_t *minor, uint8_t *bugfix) |
Get format version. | |
OTF2_Archive * | OTF2_Archive_Open (const char *archivePath, const char *archiveName, const OTF2_FileMode fileMode, const uint64_t chunkSizeEvents, const uint64_t chunkSizeDefs, const OTF2_FileSubstrate fileSubstrate, const OTF2_Compression compression) |
Create a new archive. | |
OTF2_ErrorCode | OTF2_Archive_SetBoolProperty (OTF2_Archive *archive, const char *name, bool value, bool overwrite) |
Add or remove a boolean trace file property to this archive. | |
OTF2_ErrorCode | OTF2_Archive_SetCreator (OTF2_Archive *archive, const char *creator) |
Set creator. | |
OTF2_ErrorCode | OTF2_Archive_SetDescription (OTF2_Archive *archive, const char *description) |
Set a description. | |
OTF2_ErrorCode | OTF2_Archive_SetFileSionCallbacks (OTF2_Archive *archive, const OTF2_FileSionCallbacks *fileSionCallbacks, void *fileSionData) |
Set the SION callbacks for the archive. | |
OTF2_ErrorCode | OTF2_Archive_SetFlushCallbacks (OTF2_Archive *archive, const OTF2_FlushCallbacks *flushCallbacks, void *flushData) |
Set the flush callbacks for the archive. | |
OTF2_ErrorCode | OTF2_Archive_SetMachineName (OTF2_Archive *archive, const char *machineName) |
Set machine name. | |
OTF2_ErrorCode | OTF2_Archive_SetMasterSlaveMode (OTF2_Archive *archive, OTF2_MasterSlaveMode masterOrSlave) |
Set master slave mode. | |
OTF2_ErrorCode | OTF2_Archive_SetMemoryCallbacks (OTF2_Archive *archive, const OTF2_MemoryCallbacks *memoryCallbacks, void *memoryData) |
Set the memory callbacks for the archive. | |
OTF2_ErrorCode | OTF2_Archive_SetNumberOfSnapshots (OTF2_Archive *archive, uint32_t number) |
Set the number of snapshots. | |
OTF2_ErrorCode | OTF2_Archive_SetProperty (OTF2_Archive *archive, const char *name, const char *value, bool overwrite) |
Add or remove a trace file property to this archive. | |
OTF2_ErrorCode | OTF2_Archive_SwitchFileMode (OTF2_Archive *archive, OTF2_FileMode newFileMode) |
Switch file mode of the archive. |
Writing interface for OTF2 archives.
#define OTF2_CHUNK_SIZE_DEFINITIONS_DEFAULT ( 4 * 1024 * 1024 ) |
Default size for OTF2's internal event chunk memory handling.
If you are not sure which chunk size is the best to use, use this default value.
#define OTF2_CHUNK_SIZE_EVENTS_DEFAULT ( 1024 * 1024 ) |
Default size for OTF2's internal event chunk memory handling.
If you are not sure which chunk size is the best to use, use this default value.
typedef struct OTF2_Archive_struct OTF2_Archive |
Keeps all meta-data for an OTF2 archive.
An OTF2 archive handle keeps all runtime information about an OTF2 archive. It is the central handle to get and set information about the archive and to request event and definition writer handles.
typedef uint8_t OTF2_MasterSlaveMode |
Defines whether a location is master or slave.
The master of creates the directory layout and writes the anchor file. Therefore, only one archive handle can be the master, e.g. the MPI rank 0. All other archive handles must be defined as slaves.
Please see OTF2_MasterSlaveMode_enum for a description of available values.
OTF2_ErrorCode OTF2_Archive_Close | ( | OTF2_Archive * | archive | ) |
Close an opened archive.
Closes an opened archive and releases the associated resources. Closes also all opened writer and reader handles. Does nothing if NULL is passed.
archive | Archive handle. |
OTF2_ErrorCode OTF2_Archive_CloseDefReader | ( | OTF2_Archive * | archive, |
OTF2_DefReader * | reader | ||
) |
Close an opened local definition reader.
archive | Archive handle. |
reader | Reader handle to be closed. |
OTF2_ErrorCode OTF2_Archive_CloseDefWriter | ( | OTF2_Archive * | archive, |
OTF2_DefWriter * | writer | ||
) |
Close an opened local definition writer.
archive | Archive handle. |
writer | Writer handle to be closed. |
OTF2_ErrorCode OTF2_Archive_CloseEvtReader | ( | OTF2_Archive * | archive, |
OTF2_EvtReader * | reader | ||
) |
Close an opened local event reader.
archive | Archive handle. |
reader | Reader handle to be closed. |
OTF2_ErrorCode OTF2_Archive_CloseEvtWriter | ( | OTF2_Archive * | archive, |
OTF2_EvtWriter * | writer | ||
) |
Close an opened local event writer.
archive | Archive handle. |
writer | Writer handle to be closed. |
OTF2_ErrorCode OTF2_Archive_CloseGlobalDefReader | ( | OTF2_Archive * | archive, |
OTF2_GlobalDefReader * | globalDefReader | ||
) |
Closes the global definition reader.
archive | Archive handle. |
globalDefReader | The global definition reader. |
OTF2_ErrorCode OTF2_Archive_CloseGlobalEvtReader | ( | OTF2_Archive * | archive, |
OTF2_GlobalEvtReader * | globalEvtReader | ||
) |
Closes the global event reader.
This closes also all local event readers.
archive | Archive handle. |
globalEvtReader | The global event reader. |
OTF2_ErrorCode OTF2_Archive_CloseGlobalSnapReader | ( | OTF2_Archive * | archive, |
OTF2_GlobalSnapReader * | globalSnapReader | ||
) |
Close the opened global snapshot reader.
archive | Archive handle. |
reader | Reader handle to be closed. |
OTF2_ErrorCode OTF2_Archive_CloseMarkerReader | ( | OTF2_Archive * | archive, |
OTF2_MarkerReader * | markerReader | ||
) |
Closes the marker reader.
archive | Archive handle. |
markerReader | The marker reader. |
OTF2_ErrorCode OTF2_Archive_CloseMarkerWriter | ( | OTF2_Archive * | archive, |
OTF2_MarkerWriter * | writer | ||
) |
Close an opened marker writer.
archive | Archive handle. |
writer | Writer handle to be closed. |
OTF2_ErrorCode OTF2_Archive_CloseSnapReader | ( | OTF2_Archive * | archive, |
OTF2_SnapReader * | reader | ||
) |
Close an opened local snap reader.
archive | Archive handle. |
reader | Reader handle to be closed. |
OTF2_ErrorCode OTF2_Archive_CloseSnapWriter | ( | OTF2_Archive * | archive, |
OTF2_SnapWriter * | writer | ||
) |
Close an opened local snap writer.
archive | Archive handle. |
writer | Writer handle to be closed. |
OTF2_ErrorCode OTF2_Archive_CloseThumbReader | ( | OTF2_Archive * | archive, |
OTF2_ThumbReader * | reader | ||
) |
Close an opened thumbnail reader.
archive | Archive handle. |
reader | Reader handle to be closed. |
OTF2_ErrorCode OTF2_Archive_GetChunkSize | ( | OTF2_Archive * | archive, |
uint64_t * | chunkSizeEvents, | ||
uint64_t * | chunkSizeDefs | ||
) |
Get the chunksize.
archive | Archive handle. | |
[out] | chunkSizeEvents | Chunk size for event files. |
[out] | chunkSizeDefs | Chunk size for definition files. |
OTF2_ErrorCode OTF2_Archive_GetCompression | ( | OTF2_Archive * | archive, |
OTF2_Compression * | compression | ||
) |
Get compression mode (none or zlib)
archive | Archive handle. | |
[out] | compression | Returned compression mode. |
OTF2_ErrorCode OTF2_Archive_GetCreator | ( | OTF2_Archive * | archive, |
char ** | creator | ||
) |
Get creator information.
archive | Archive handle. | |
[out] | creator | Returned creator. Allocated with malloc. |
OTF2_DefReader* OTF2_Archive_GetDefReader | ( | OTF2_Archive * | archive, |
OTF2_LocationRef | location | ||
) |
Get a local definition reader.
archive | Archive handle. |
location | Location ID of the requested reader handle. |
OTF2_DefWriter* OTF2_Archive_GetDefWriter | ( | OTF2_Archive * | archive, |
OTF2_LocationRef | location | ||
) |
Get a local definition writer.
archive | Archive handle. |
location | Location ID of the requested writer handle. |
OTF2_ErrorCode OTF2_Archive_GetDescription | ( | OTF2_Archive * | archive, |
char ** | description | ||
) |
Get description.
archive | Archive handle. | |
[out] | description | Returned description. Allocated with malloc. |
OTF2_EvtReader* OTF2_Archive_GetEvtReader | ( | OTF2_Archive * | archive, |
OTF2_LocationRef | location | ||
) |
Get a local event reader.
archive | Archive handle. |
location | Location ID of the requested reader handle. |
OTF2_EvtWriter* OTF2_Archive_GetEvtWriter | ( | OTF2_Archive * | archive, |
OTF2_LocationRef | location | ||
) |
Get a local event writer.
archive | Archive handle. |
location | Location ID of the requested writer handle. |
OTF2_ErrorCode OTF2_Archive_GetFileSubstrate | ( | OTF2_Archive * | archive, |
OTF2_FileSubstrate * | substrate | ||
) |
Get the file substrate (posix, sion, none)
archive | Archive handle. | |
[out] | substrate | Returned file substrate. |
OTF2_GlobalDefReader* OTF2_Archive_GetGlobalDefReader | ( | OTF2_Archive * | archive | ) |
Get a global definition reader.
archive | Archive handle. |
OTF2_GlobalDefWriter* OTF2_Archive_GetGlobalDefWriter | ( | OTF2_Archive * | archive | ) |
Get a global definition writer.
archive | Archive handle. |
OTF2_GlobalEvtReader* OTF2_Archive_GetGlobalEvtReader | ( | OTF2_Archive * | archive | ) |
Get a global event reader.
archive | Archive handle. |
OTF2_GlobalSnapReader* OTF2_Archive_GetGlobalSnapReader | ( | OTF2_Archive * | archive | ) |
Get a global snap reader.
archive | Archive handle. |
OTF2_ErrorCode OTF2_Archive_GetMachineName | ( | OTF2_Archive * | archive, |
char ** | machineName | ||
) |
Get machine name.
archive | Archive handle. | |
[out] | machineName | Returned machine name. Allocated with malloc. |
OTF2_MarkerReader* OTF2_Archive_GetMarkerReader | ( | OTF2_Archive * | archive | ) |
Get a marker reader.
archive | Archive handle. |
OTF2_MarkerWriter* OTF2_Archive_GetMarkerWriter | ( | OTF2_Archive * | archive | ) |
Get a marker writer.
archive | Archive handle. |
OTF2_ErrorCode OTF2_Archive_GetMasterSlaveMode | ( | OTF2_Archive * | archive, |
OTF2_MasterSlaveMode * | masterOrSlave | ||
) |
Get master slave mode.
archive | Archive handle. | |
[out] | masterOrSlave | Return pointer to the master slave mode. |
OTF2_ErrorCode OTF2_Archive_GetNumberOfGlobalDefinitions | ( | OTF2_Archive * | archive, |
uint64_t * | numberOfDefinitions | ||
) |
Get the number of global definitions.
archive | Archive handle. | |
[out] | numberOfDefinitions | Return pointer to the number of global definitions. |
OTF2_ErrorCode OTF2_Archive_GetNumberOfLocations | ( | OTF2_Archive * | archive, |
uint64_t * | numberOfLocations | ||
) |
Get the number of locations.
archive | Archive handle. | |
[out] | numberOfLocations | Return pointer to the number of locations. |
OTF2_ErrorCode OTF2_Archive_GetNumberOfSnapshots | ( | OTF2_Archive * | archive, |
uint32_t * | number | ||
) |
Get the number of snapshots.
archive | Archive handle. |
number | Snapshot number. |
OTF2_ErrorCode OTF2_Archive_GetNumberOfThumbnails | ( | OTF2_Archive * | archive, |
uint32_t * | number | ||
) |
Get the number of thumbnails.
archive | Archive handle. |
number | Thumb number. |
OTF2_ErrorCode OTF2_Archive_GetProperty | ( | OTF2_Archive * | archive, |
const char * | name, | ||
char ** | value | ||
) |
Get the value of the named trace file property.
archive | Archive handle. | |
name | Name of the property. | |
[out] | value | Returned value of the property. Allocated with malloc. |
if successful
if the named property was not found
OTF2_ErrorCode OTF2_Archive_GetPropertyNames | ( | OTF2_Archive * | archive, |
uint32_t * | numberOfProperties, | ||
char *** | names | ||
) |
Get the names of all trace file properties.
archive | Archive handle. | |
[out] | numberOfProperties | Returned number of trace file properties. |
[out] | names | Returned list of property names. Allocated with malloc. To release memory, just pass *names to free. |
OTF2_SnapReader* OTF2_Archive_GetSnapReader | ( | OTF2_Archive * | archive, |
OTF2_LocationRef | location | ||
) |
Get a local snap reader.
archive | Archive handle. |
location | Location ID of the requested snap handle. |
OTF2_SnapWriter* OTF2_Archive_GetSnapWriter | ( | OTF2_Archive * | archive, |
OTF2_LocationRef | location | ||
) |
Get a local snap writer.
archive | Archive handle. |
location | Location ID of the requested writer handle. |
OTF2_ThumbReader* OTF2_Archive_GetThumbReader | ( | OTF2_Archive * | archive, |
uint32_t | number | ||
) |
Get a thumb reader.
archive | Archive handle. |
number | Thumbnail number. |
OTF2_ThumbWriter* OTF2_Archive_GetThumbWriter | ( | OTF2_Archive * | archive, |
const char * | name, | ||
const char * | description, | ||
OTF2_ThumbnailType | type, | ||
uint32_t | numberOfSamples, | ||
uint32_t | numberOfMetrics, | ||
const uint64_t * | refsToDefs | ||
) |
Get a thumb writer.
archive | Archive handle. |
name | Name of thumb. |
description | Description of thumb. |
type | Type of thumb. |
numberOfSamples | Number of samples. |
numberOfMetrics | Number of metrics. |
refsToDefs | numberOfMetrics references to defintion matching the thumbnail type. |
OTF2_ErrorCode OTF2_Archive_GetTraceId | ( | OTF2_Archive * | archive, |
uint64_t * | id | ||
) |
Get the identifier of the trace file.
archive | Archive handle. | |
[out] | id | Trace identifier. |
OTF2_ErrorCode OTF2_Archive_GetVersion | ( | OTF2_Archive * | archive, |
uint8_t * | major, | ||
uint8_t * | minor, | ||
uint8_t * | bugfix | ||
) |
Get format version.
archive | Archive handle | |
[out] | major | Major version number |
[out] | minor | Minor version number |
[out] | bugfix | Bugfix revision |
OTF2_Archive* OTF2_Archive_Open | ( | const char * | archivePath, |
const char * | archiveName, | ||
const OTF2_FileMode | fileMode, | ||
const uint64_t | chunkSizeEvents, | ||
const uint64_t | chunkSizeDefs, | ||
const OTF2_FileSubstrate | fileSubstrate, | ||
const OTF2_Compression | compression | ||
) |
Create a new archive.
Creates a new archive handle that keeps all meta data about the archive on runtime.
archivePath | Path to the archive i.e. the directory where the anchor file is located. |
archiveName | Name of the archive. It is used to generate sub pathes e.g. 'archiveName.otf2'. |
fileMode | Determines if in reading or writing mode. Available values are OTF2_FILEMODE_WRITE or OTF2_FILEMODE_READ. |
chunkSizeEvents | Requested size of OTF2's internal event chunks in writing mode. Available values are from 256kB to 16MB. The event chunk size affects performance as well as total memory usage. A value satisfying both is about 1MB. If you are not sure which chunk size is the best to use, use OTF2_CHUNK_SIZE_EVENTS_DEFAULT. In reading mode this value is ignored because the correct chunk size is extracted from the anchor file. |
chunkSizeDefs | Requested size of OTF2's internal definition chunks in writing mode. Available values are from 256kB to 16MB. The definition chunk size affects performance as well as total memory usage. In addition, the definition chunk size must be big enough to carry the largest possible definition record. Therefore, the definition chunk size must be at least 10 times the number of locations. A value satisfying these requirements is about 4MB. If you are not sure which chunk size is the best to use, use OTF2_CHUNK_SIZE_DEFINITIONS_DEFAULT. In reading mode this value is ignored because the correct chunk size is extracted from the anchor file. |
fileSubstrate | Determines which file substrate should be used in writing mode. Available values are OTF2_SUBSTRATE_POSIX to use the standard Posix interface, OTF2_SUBSTRATE_SION to use an installed SION library to store multiple logical files into fewer or one physical file, and OTF2_SUBSTRATE_NONE to supress file writing at all. In reading mode this value is ignored because the correct file substrated is extracted from the anchor file. |
compression | Determines if compression is used to reduce the size of data in files. Available values are OTF2_COMPRESSION_ZLIB to use an installed zlib and OTF2_COMPRESSION_NONE to disable compression. In reading mode this value is ignored because the correct file compression is extracted from the anchor file. |
OTF2_ErrorCode OTF2_Archive_SetBoolProperty | ( | OTF2_Archive * | archive, |
const char * | name, | ||
bool | value, | ||
bool | overwrite | ||
) |
Add or remove a boolean trace file property to this archive.
archive | Archive handle. |
name | Name of the trace file property (case insensitive, [A-Z0-9_]). |
value | Boolean value of property (e.g. true or false). |
overwrite | If true a previous trace file property with the same name name will be overwritten. |
if successful
if property name does not conform to the naming scheme
if property was not found, but requested to remove
if property exists but overwrite was not set
OTF2_ErrorCode OTF2_Archive_SetCreator | ( | OTF2_Archive * | archive, |
const char * | creator | ||
) |
Set creator.
Sets information about the creator of the trace archive. This value is optional. It only needs to be set for an archive handle marked as 'master' or does not need to be set at all.
archive | Archive handle. |
creator | Creator information. |
OTF2_ErrorCode OTF2_Archive_SetDescription | ( | OTF2_Archive * | archive, |
const char * | description | ||
) |
Set a description.
Sets a description for a trace archive. This value is optional. It only needs to be set for an archive handle marked as 'master' or does not need to be set at all.
archive | Archive handle. |
description | Description. |
OTF2_ErrorCode OTF2_Archive_SetFileSionCallbacks | ( | OTF2_Archive * | archive, |
const OTF2_FileSionCallbacks * | fileSionCallbacks, | ||
void * | fileSionData | ||
) |
Set the SION callbacks for the archive.
archive | Archive handle. |
fileSionCallbacks | Struct holding the SION callback functions. |
fileSionData | Data passed to the SION callbacks in the userData argument. |
OTF2_ErrorCode OTF2_Archive_SetFlushCallbacks | ( | OTF2_Archive * | archive, |
const OTF2_FlushCallbacks * | flushCallbacks, | ||
void * | flushData | ||
) |
Set the flush callbacks for the archive.
archive | Archive handle. |
flushCallbacks | Struct holding the flush callback functions. |
flushData | Data passed to the flush callbacks in the userData argument. |
OTF2_ErrorCode OTF2_Archive_SetMachineName | ( | OTF2_Archive * | archive, |
const char * | machineName | ||
) |
Set machine name.
Sets the name for the machine the trace was recorded. This value is optional. It only needs to be set for an archive handle marked as 'master' or does not need to be set at all.
archive | Archive handle. |
machineName | Machine name. |
OTF2_ErrorCode OTF2_Archive_SetMasterSlaveMode | ( | OTF2_Archive * | archive, |
OTF2_MasterSlaveMode | masterOrSlave | ||
) |
Set master slave mode.
Sets master slave mode for a location. If OTF2_MASTER is passed, the location creates the directory structure for the trace files to store. Therefore, exactly one location can be master, all other locations must be slaves.
Please note: This call is only allowed in writing mode.
archive | Archive handle. |
masterOrSlave | Master or slave. Available values are OTF2_MASTER and OTF2_SLAVE. |
OTF2_ErrorCode OTF2_Archive_SetMemoryCallbacks | ( | OTF2_Archive * | archive, |
const OTF2_MemoryCallbacks * | memoryCallbacks, | ||
void * | memoryData | ||
) |
Set the memory callbacks for the archive.
archive | Archive handle. |
memoryCallbacks | Struct holding the memory callback functions. |
memoryData | Data passed to the memory callbacks in the userData argument. |
OTF2_ErrorCode OTF2_Archive_SetNumberOfSnapshots | ( | OTF2_Archive * | archive, |
uint32_t | number | ||
) |
Set the number of snapshots.
archive | Archive handle. |
number | Snapshot number. |
OTF2_ErrorCode OTF2_Archive_SetProperty | ( | OTF2_Archive * | archive, |
const char * | name, | ||
const char * | value, | ||
bool | overwrite | ||
) |
Add or remove a trace file property to this archive.
Removing a trace file property is done by passing "" in the value
parameter. The overwrite
parameter is ignored than.
archive | Archive handle. |
name | Name of the trace file property (case insensitive, [A-Z0-9_]). |
value | Value of property. |
overwrite | If true a previous trace file property with the same name name will be overwritten. |
if successful
if property name does not conform to the naming scheme
if property was not found, but requested to remove
if property exists but overwrite was not set
OTF2_ErrorCode OTF2_Archive_SwitchFileMode | ( | OTF2_Archive * | archive, |
OTF2_FileMode | newFileMode | ||
) |
Switch file mode of the archive.
Currently only a switch from OTF2_FILEMODE_READ to OTF2_FILEMODE_WRITE is permitted and in this case, the master/slave mode is reset and must be set again with OTF2_Archive_SetMasterSlaveMode. Currrently it is also only permitted when operating on an OTF2 archive with the OTF2_SUBSTRATE_POSIX file substrate.
archive | Archive handle. |
newFileMode | New OTF2_FileMode to switch to. |