3.0-rc2 (revision 337012f1)
OTF2_SnapWriter.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Score-P software (http://www.score-p.org)
3  *
4  * Copyright (c) 2013, 2021,
5  * Technische Universitaet Dresden, Germany
6  *
7  * This software may be modified and distributed under the terms of
8  * a BSD-style license. See the COPYING file in the package base
9  * directory for details.
10  */
11 
12 
13 #ifndef OTF2_SNAP_WRITER_H
14 #define OTF2_SNAP_WRITER_H
15 
16 
27 #include <stdint.h>
28 
29 
30 #include "otf2_compiler.h"
31 
32 
33 #include <otf2/OTF2_ErrorCodes.h>
34 
35 
36 #include <otf2/OTF2_Events.h>
38 
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif /* __cplusplus */
43 
44 
50 typedef struct OTF2_SnapWriter_struct OTF2_SnapWriter;
51 
52 
65  OTF2_LocationRef* locationID );
66 
67 
68 
93  OTF2_AttributeList* attributeList,
94  OTF2_TimeStamp snapTime,
95  uint64_t numberOfRecords );
96 
97 
115  OTF2_AttributeList* attributeList,
116  OTF2_TimeStamp snapTime,
117  uint64_t contReadPos );
118 
119 
139  OTF2_AttributeList* attributeList,
140  OTF2_TimeStamp snapTime,
141  OTF2_TimeStamp origEventTime,
142  OTF2_MeasurementMode measurementMode );
143 
144 
165  OTF2_AttributeList* attributeList,
166  OTF2_TimeStamp snapTime,
167  OTF2_TimeStamp origEventTime,
168  OTF2_RegionRef region );
169 
170 
199  OTF2_AttributeList* attributeList,
200  OTF2_TimeStamp snapTime,
201  OTF2_TimeStamp origEventTime,
202  uint32_t receiver,
203  OTF2_CommRef communicator,
204  uint32_t msgTag,
205  uint64_t msgLength );
206 
207 
238  OTF2_AttributeList* attributeList,
239  OTF2_TimeStamp snapTime,
240  OTF2_TimeStamp origEventTime,
241  uint32_t receiver,
242  OTF2_CommRef communicator,
243  uint32_t msgTag,
244  uint64_t msgLength,
245  uint64_t requestID );
246 
247 
268  OTF2_AttributeList* attributeList,
269  OTF2_TimeStamp snapTime,
270  OTF2_TimeStamp origEventTime,
271  uint64_t requestID );
272 
273 
303  OTF2_AttributeList* attributeList,
304  OTF2_TimeStamp snapTime,
305  OTF2_TimeStamp origEventTime,
306  uint32_t sender,
307  OTF2_CommRef communicator,
308  uint32_t msgTag,
309  uint64_t msgLength );
310 
311 
335  OTF2_AttributeList* attributeList,
336  OTF2_TimeStamp snapTime,
337  OTF2_TimeStamp origEventTime,
338  uint64_t requestID );
339 
340 
371  OTF2_AttributeList* attributeList,
372  OTF2_TimeStamp snapTime,
373  OTF2_TimeStamp origEventTime,
374  uint32_t sender,
375  OTF2_CommRef communicator,
376  uint32_t msgTag,
377  uint64_t msgLength,
378  uint64_t requestID );
379 
380 
398  OTF2_AttributeList* attributeList,
399  OTF2_TimeStamp snapTime,
400  OTF2_TimeStamp origEventTime );
401 
402 
430  OTF2_AttributeList* attributeList,
431  OTF2_TimeStamp snapTime,
432  OTF2_TimeStamp origEventTime,
433  OTF2_CollectiveOp collectiveOp,
434  OTF2_CommRef communicator,
435  uint32_t root,
436  uint64_t sizeSent,
437  uint64_t sizeReceived );
438 
439 
458  OTF2_AttributeList* attributeList,
459  OTF2_TimeStamp snapTime,
460  OTF2_TimeStamp origEventTime,
461  uint32_t numberOfRequestedThreads );
462 
463 
487  OTF2_AttributeList* attributeList,
488  OTF2_TimeStamp snapTime,
489  OTF2_TimeStamp origEventTime,
490  uint32_t lockID,
491  uint32_t acquisitionOrder );
492 
493 
513  OTF2_AttributeList* attributeList,
514  OTF2_TimeStamp snapTime,
515  OTF2_TimeStamp origEventTime,
516  uint64_t taskID );
517 
518 
538  OTF2_AttributeList* attributeList,
539  OTF2_TimeStamp snapTime,
540  OTF2_TimeStamp origEventTime,
541  uint64_t taskID );
542 
543 
574  OTF2_AttributeList* attributeList,
575  OTF2_TimeStamp snapTime,
576  OTF2_TimeStamp origEventTime,
577  OTF2_MetricRef metric,
578  uint8_t numberOfMetrics,
579  const OTF2_Type* typeIDs,
580  const OTF2_MetricValue* metricValues );
581 
582 
608  OTF2_AttributeList* attributeList,
609  OTF2_TimeStamp snapTime,
610  OTF2_TimeStamp origEventTime,
611  OTF2_ParameterRef parameter,
612  OTF2_StringRef string );
613 
614 
637  OTF2_AttributeList* attributeList,
638  OTF2_TimeStamp snapTime,
639  OTF2_TimeStamp origEventTime,
640  OTF2_ParameterRef parameter,
641  int64_t value );
642 
643 
666  OTF2_AttributeList* attributeList,
667  OTF2_TimeStamp snapTime,
668  OTF2_TimeStamp origEventTime,
669  OTF2_ParameterRef parameter,
670  uint64_t value );
671 
672 
673 
674 #ifdef __cplusplus
675 }
676 #endif /* __cplusplus */
677 
678 
679 #endif /* !OTF2_SNAP_WRITER_H */
OTF2_ErrorCode OTF2_SnapWriter_ParameterUnsignedInt(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, OTF2_ParameterRef parameter, uint64_t value)
Records a ParameterUnsignedInt snapshot record.
OTF2_ErrorCode OTF2_SnapWriter_MpiIrecvRequest(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, uint64_t requestID)
Records a MpiIrecvRequest snapshot record.
uint64_t OTF2_LocationRef
Type used to indicate a reference to a Location definition.
Definition: OTF2_GeneralDefinitions.h:142
OTF2_ErrorCode OTF2_SnapWriter_MeasurementOnOff(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, OTF2_MeasurementMode measurementMode)
Records a MeasurementOnOff snapshot record.
OTF2_ErrorCode OTF2_SnapWriter_GetLocationID(const OTF2_SnapWriter *writer, OTF2_LocationRef *locationID)
Function to get the location ID of a snap writer object.
uint8_t OTF2_Type
Wrapper for enum OTF2_Type_enum.
Definition: OTF2_GeneralDefinitions.h:596
OTF2_ErrorCode OTF2_SnapWriter_OmpTaskSwitch(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, uint64_t taskID)
Records a OmpTaskSwitch snapshot record.
uint32_t OTF2_StringRef
Type used to indicate a reference to a String definition.
Definition: OTF2_GeneralDefinitions.h:118
OTF2_ErrorCode OTF2_SnapWriter_Enter(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, OTF2_RegionRef region)
Records a Enter snapshot record.
Enums and types used in event records.
uint8_t OTF2_MeasurementMode
Wrapper for enum OTF2_MeasurementMode_enum.
Definition: OTF2_Events.h:59
Metric value.
Definition: OTF2_Events.h:541
uint32_t OTF2_ParameterRef
Type used to indicate a reference to a Parameter definition.
Definition: OTF2_GeneralDefinitions.h:190
This layer enables dynamic appending of arbitrary attributes to any type of event record...
struct OTF2_AttributeList_struct OTF2_AttributeList
Attribute list handle.
Definition: OTF2_AttributeList.h:104
OTF2_ErrorCode
Definition: OTF2_ErrorCodes.h:54
OTF2_ErrorCode OTF2_SnapWriter_ParameterString(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, OTF2_ParameterRef parameter, OTF2_StringRef string)
Records a ParameterString snapshot record.
OTF2_ErrorCode OTF2_SnapWriter_MpiSend(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, uint32_t receiver, OTF2_CommRef communicator, uint32_t msgTag, uint64_t msgLength)
Records a MpiSend snapshot record.
OTF2_ErrorCode OTF2_SnapWriter_SnapshotStart(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, uint64_t numberOfRecords)
Records a SnapshotStart snapshot record.
OTF2_ErrorCode OTF2_SnapWriter_SnapshotEnd(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, uint64_t contReadPos)
Records a SnapshotEnd snapshot record.
uint64_t OTF2_TimeStamp
OTF2 time stamp.
Definition: OTF2_GeneralDefinitions.h:106
OTF2_ErrorCode OTF2_SnapWriter_OmpFork(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, uint32_t numberOfRequestedThreads)
Records a OmpFork snapshot record.
uint32_t OTF2_MetricRef
Type used to indicate a reference to a MetricClass, or a MetricInstance definition.
Definition: OTF2_GeneralDefinitions.h:178
OTF2_ErrorCode OTF2_SnapWriter_MpiCollectiveEnd(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, OTF2_CollectiveOp collectiveOp, OTF2_CommRef communicator, uint32_t root, uint64_t sizeSent, uint64_t sizeReceived)
Records a MpiCollectiveEnd snapshot record.
OTF2_ErrorCode OTF2_SnapWriter_MpiRecv(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, uint32_t sender, OTF2_CommRef communicator, uint32_t msgTag, uint64_t msgLength)
Records a MpiRecv snapshot record.
OTF2_ErrorCode OTF2_SnapWriter_MpiCollectiveBegin(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime)
Records a MpiCollectiveBegin snapshot record.
uint8_t OTF2_CollectiveOp
Wrapper for enum OTF2_CollectiveOp_enum.
Definition: OTF2_Events.h:79
Compiler feature test macros.
OTF2_ErrorCode OTF2_SnapWriter_OmpTaskCreate(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, uint64_t taskID)
Records a OmpTaskCreate snapshot record.
OTF2_ErrorCode OTF2_SnapWriter_ParameterInt(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, OTF2_ParameterRef parameter, int64_t value)
Records a ParameterInt snapshot record.
OTF2_ErrorCode OTF2_SnapWriter_MpiIsendComplete(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, uint64_t requestID)
Records a MpiIsendComplete snapshot record.
uint32_t OTF2_CommRef
Type used to indicate a reference to a Comm, or a InterComm definition.
Definition: OTF2_GeneralDefinitions.h:184
struct OTF2_SnapWriter_struct OTF2_SnapWriter
Keeps all necessary information about the snap writer. See OTF2_SnapWriter_struct for detailed inform...
Definition: OTF2_SnapWriter.h:50
uint32_t OTF2_RegionRef
Type used to indicate a reference to a Region definition.
Definition: OTF2_GeneralDefinitions.h:148
OTF2_ErrorCode OTF2_SnapWriter_MpiIsend(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, uint32_t receiver, OTF2_CommRef communicator, uint32_t msgTag, uint64_t msgLength, uint64_t requestID)
Records a MpiIsend snapshot record.
OTF2_ErrorCode OTF2_SnapWriter_Metric(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, OTF2_MetricRef metric, uint8_t numberOfMetrics, const OTF2_Type *typeIDs, const OTF2_MetricValue *metricValues)
Records a Metric snapshot record.
Error codes and error handling.
OTF2_ErrorCode OTF2_SnapWriter_OmpAcquireLock(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, uint32_t lockID, uint32_t acquisitionOrder)
Records a OmpAcquireLock snapshot record.
OTF2_ErrorCode OTF2_SnapWriter_MpiIrecv(OTF2_SnapWriter *writer, OTF2_AttributeList *attributeList, OTF2_TimeStamp snapTime, OTF2_TimeStamp origEventTime, uint32_t sender, OTF2_CommRef communicator, uint32_t msgTag, uint64_t msgLength, uint64_t requestID)
Records a MpiIrecv snapshot record.