2.0 (revision 4611)
OTF2_GlobalDefWriter.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) 2009-2012,
5  * RWTH Aachen University, Germany
6  *
7  * Copyright (c) 2009-2012,
8  * Gesellschaft fuer numerische Simulation mbH Braunschweig, Germany
9  *
10  * Copyright (c) 2009-2012, 2014,
11  * Technische Universitaet Dresden, Germany
12  *
13  * Copyright (c) 2009-2012,
14  * University of Oregon, Eugene, USA
15  *
16  * Copyright (c) 2009-2012,
17  * Forschungszentrum Juelich GmbH, Germany
18  *
19  * Copyright (c) 2009-2012,
20  * German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany
21  *
22  * Copyright (c) 2009-2012,
23  * Technische Universitaet Muenchen, Germany
24  *
25  * This software may be modified and distributed under the terms of
26  * a BSD-style license. See the COPYING file in the package base
27  * directory for details.
28  *
29  */
30 
31 
32 #ifndef OTF2_GLOBAL_DEF_WRITER_H
33 #define OTF2_GLOBAL_DEF_WRITER_H
34 
35 
51 #include <stdint.h>
52 
53 
54 #include <otf2/OTF2_ErrorCodes.h>
55 
56 
59 #include <otf2/OTF2_Definitions.h>
60 
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif /* __cplusplus */
65 
66 
71 typedef struct OTF2_GlobalDefWriter_struct OTF2_GlobalDefWriter;
72 
73 
84  uint64_t* numberOfDefinitions );
85 
86 
97  uint64_t* numberOfLocations );
98 
99 
120  uint64_t timerResolution,
121  uint64_t globalOffset,
122  uint64_t traceLength );
123 
124 
146  OTF2_Paradigm paradigm,
147  OTF2_StringRef name,
148  OTF2_ParadigmClass paradigmClass );
149 
150 
170  OTF2_Paradigm paradigm,
171  OTF2_ParadigmProperty property,
172  OTF2_Type type,
173  OTF2_AttributeValue value );
174 
175 
190  OTF2_StringRef self,
191  const char* string );
192 
193 
213  OTF2_AttributeRef self,
214  OTF2_StringRef name,
215  OTF2_StringRef description,
216  OTF2_Type type );
217 
218 
242  OTF2_StringRef name,
243  OTF2_StringRef className,
244  OTF2_SystemTreeNodeRef parent );
245 
246 
267  OTF2_StringRef name,
268  OTF2_LocationGroupType locationGroupType,
269  OTF2_SystemTreeNodeRef systemTreeParent );
270 
271 
292  OTF2_LocationRef self,
293  OTF2_StringRef name,
294  OTF2_LocationType locationType,
295  uint64_t numberOfEvents,
296  OTF2_LocationGroupRef locationGroup );
297 
298 
328  OTF2_RegionRef self,
329  OTF2_StringRef name,
330  OTF2_StringRef canonicalName,
331  OTF2_StringRef description,
332  OTF2_RegionRole regionRole,
333  OTF2_Paradigm paradigm,
334  OTF2_RegionFlag regionFlags,
335  OTF2_StringRef sourceFile,
336  uint32_t beginLineNumber,
337  uint32_t endLineNumber );
338 
339 
363  OTF2_CallsiteRef self,
364  OTF2_StringRef sourceFile,
365  uint32_t lineNumber,
366  OTF2_RegionRef enteredRegion,
367  OTF2_RegionRef leftRegion );
368 
369 
388  OTF2_CallpathRef self,
389  OTF2_CallpathRef parent,
390  OTF2_RegionRef region );
391 
392 
415  OTF2_GroupRef self,
416  OTF2_StringRef name,
417  OTF2_GroupType groupType,
418  OTF2_Paradigm paradigm,
419  OTF2_GroupFlag groupFlags,
420  uint32_t numberOfMembers,
421  const uint64_t* members );
422 
423 
471  OTF2_StringRef name,
472  OTF2_StringRef description,
473  OTF2_MetricType metricType,
474  OTF2_MetricMode metricMode,
475  OTF2_Type valueType,
476  OTF2_Base base,
477  int64_t exponent,
478  OTF2_StringRef unit );
479 
480 
504  OTF2_MetricRef self,
505  uint8_t numberOfMetrics,
506  const OTF2_MetricMemberRef* metricMembers,
507  OTF2_MetricOccurrence metricOccurrence,
508  OTF2_RecorderKind recorderKind );
509 
510 
537  OTF2_MetricRef self,
538  OTF2_MetricRef metricClass,
539  OTF2_LocationRef recorder,
540  OTF2_MetricScope metricScope,
541  uint64_t scope );
542 
543 
570  OTF2_CommRef self,
571  OTF2_StringRef name,
572  OTF2_GroupRef group,
573  OTF2_CommRef parent );
574 
575 
594  OTF2_ParameterRef self,
595  OTF2_StringRef name,
596  OTF2_ParameterType parameterType );
597 
598 
617  OTF2_RmaWinRef self,
618  OTF2_StringRef name,
619  OTF2_CommRef comm );
620 
621 
639  OTF2_MetricRef metricClass,
640  OTF2_LocationRef recorder );
641 
642 
663  OTF2_SystemTreeNodeRef systemTreeNode,
664  OTF2_StringRef name,
665  OTF2_Type type,
666  OTF2_AttributeValue value );
667 
668 
686  OTF2_SystemTreeNodeRef systemTreeNode,
687  OTF2_SystemTreeDomain systemTreeDomain );
688 
689 
709  OTF2_LocationGroupRef locationGroup,
710  OTF2_StringRef name,
711  OTF2_Type type,
712  OTF2_AttributeValue value );
713 
714 
734  OTF2_LocationRef location,
735  OTF2_StringRef name,
736  OTF2_Type type,
737  OTF2_AttributeValue value );
738 
739 
760  OTF2_StringRef name,
761  uint32_t size,
762  OTF2_CartPeriodicity cartPeriodicity );
763 
764 
791  OTF2_StringRef name,
792  OTF2_CommRef communicator,
793  uint8_t numberOfDimensions,
794  const OTF2_CartDimensionRef* cartDimensions );
795 
796 
818  OTF2_CartTopologyRef cartTopology,
819  uint32_t rank,
820  uint8_t numberOfDimensions,
821  const uint32_t* coordinates );
822 
823 
848  OTF2_StringRef file,
849  uint32_t lineNumber );
850 
851 
922  OTF2_RegionRef region,
923  OTF2_SourceCodeLocationRef sourceCodeLocation,
924  OTF2_CallingContextRef parent );
925 
926 
947  OTF2_CallingContextRef callingContext,
948  OTF2_StringRef name,
949  OTF2_Type type,
950  OTF2_AttributeValue value );
951 
952 
990  OTF2_StringRef name,
991  OTF2_InterruptGeneratorMode interruptGeneratorMode,
992  OTF2_Base base,
993  int64_t exponent,
994  uint64_t period );
995 
996 
997 #ifdef __cplusplus
998 }
999 #endif /* __cplusplus */
1000 
1001 
1002 #endif /* !OTF2_GLOBAL_DEF_WRITER_H */
uint32_t OTF2_GroupFlag
Wrapper for enum OTF2_GroupFlag_enum.
Definition: OTF2_Definitions.h:360
OTF2_ErrorCode OTF2_GlobalDefWriter_GetNumberOfLocations(OTF2_GlobalDefWriter *writerHandle, uint64_t *numberOfLocations)
Returns the current number of written location definitions of a global definition writer...
uint8_t OTF2_ParameterType
Wrapper for enum OTF2_ParameterType_enum.
Definition: OTF2_Definitions.h:611
uint64_t OTF2_LocationRef
Type used to indicate a reference to a Location definition.
Definition: OTF2_GeneralDefinitions.h:125
uint8_t OTF2_ParadigmProperty
Wrapper for enum OTF2_ParadigmProperty_enum.
Definition: OTF2_GeneralDefinitions.h:845
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteAttribute(OTF2_GlobalDefWriter *writerHandle, OTF2_AttributeRef self, OTF2_StringRef name, OTF2_StringRef description, OTF2_Type type)
Writes a Attribute definition record into the GlobalDefWriter.
uint8_t OTF2_MetricMode
Wrapper for enum OTF2_MetricMode_enum.
Definition: OTF2_Definitions.h:515
uint8_t OTF2_Type
Wrapper for enum OTF2_Type_enum.
Definition: OTF2_GeneralDefinitions.h:525
uint8_t OTF2_Base
Wrapper for enum OTF2_Base_enum.
Definition: OTF2_Definitions.h:382
uint8_t OTF2_Paradigm
Wrapper for enum OTF2_Paradigm_enum.
Definition: OTF2_GeneralDefinitions.h:661
uint32_t OTF2_StringRef
Type used to indicate a reference to a String definition.
Definition: OTF2_GeneralDefinitions.h:101
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteMetricMember(OTF2_GlobalDefWriter *writerHandle, OTF2_MetricMemberRef self, OTF2_StringRef name, OTF2_StringRef description, OTF2_MetricType metricType, OTF2_MetricMode metricMode, OTF2_Type valueType, OTF2_Base base, int64_t exponent, OTF2_StringRef unit)
Writes a MetricMember definition record into the GlobalDefWriter.
uint8_t OTF2_RecorderKind
Wrapper for enum OTF2_RecorderKind_enum.
Definition: OTF2_Definitions.h:583
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteRegion(OTF2_GlobalDefWriter *writerHandle, OTF2_RegionRef self, OTF2_StringRef name, OTF2_StringRef canonicalName, OTF2_StringRef description, OTF2_RegionRole regionRole, OTF2_Paradigm paradigm, OTF2_RegionFlag regionFlags, OTF2_StringRef sourceFile, uint32_t beginLineNumber, uint32_t endLineNumber)
Writes a Region definition record into the GlobalDefWriter.
OTF2_ErrorCode OTF2_GlobalDefWriter_GetNumberOfDefinitions(OTF2_GlobalDefWriter *writerHandle, uint64_t *numberOfDefinitions)
Returns the current number of written definitions of a global definition writer.
Declares the OTF2_AttributeValue and provides convenience functions to convert from and to OTF2 enum ...
uint32_t OTF2_ParameterRef
Type used to indicate a reference to a Parameter definition.
Definition: OTF2_GeneralDefinitions.h:173
uint8_t OTF2_RegionRole
Wrapper for enum OTF2_RegionRole_enum.
Definition: OTF2_Definitions.h:139
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteSystemTreeNodeProperty(OTF2_GlobalDefWriter *writerHandle, OTF2_SystemTreeNodeRef systemTreeNode, OTF2_StringRef name, OTF2_Type type, OTF2_AttributeValue value)
Writes a SystemTreeNodeProperty definition record into the GlobalDefWriter.
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteCallsite(OTF2_GlobalDefWriter *writerHandle, OTF2_CallsiteRef self, OTF2_StringRef sourceFile, uint32_t lineNumber, OTF2_RegionRef enteredRegion, OTF2_RegionRef leftRegion)
Writes a Callsite definition record into the GlobalDefWriter.
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteCartTopology(OTF2_GlobalDefWriter *writerHandle, OTF2_CartTopologyRef self, OTF2_StringRef name, OTF2_CommRef communicator, uint8_t numberOfDimensions, const OTF2_CartDimensionRef *cartDimensions)
Writes a CartTopology definition record into the GlobalDefWriter.
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteLocationGroupProperty(OTF2_GlobalDefWriter *writerHandle, OTF2_LocationGroupRef locationGroup, OTF2_StringRef name, OTF2_Type type, OTF2_AttributeValue value)
Writes a LocationGroupProperty definition record into the GlobalDefWriter.
OTF2_ErrorCode
Definition: OTF2_ErrorCodes.h:54
Data types used in the definition records.
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteMetricClass(OTF2_GlobalDefWriter *writerHandle, OTF2_MetricRef self, uint8_t numberOfMetrics, const OTF2_MetricMemberRef *metricMembers, OTF2_MetricOccurrence metricOccurrence, OTF2_RecorderKind recorderKind)
Writes a MetricClass definition record into the GlobalDefWriter.
uint32_t OTF2_InterruptGeneratorRef
Type used to indicate a reference to a InterruptGenerator definition.
Definition: OTF2_GeneralDefinitions.h:209
This header file provides general definitions which should be accessible in all internal and external...
uint8_t OTF2_ParadigmClass
Wrapper for enum OTF2_ParadigmClass_enum.
Definition: OTF2_GeneralDefinitions.h:820
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteCallingContext(OTF2_GlobalDefWriter *writerHandle, OTF2_CallingContextRef self, OTF2_RegionRef region, OTF2_SourceCodeLocationRef sourceCodeLocation, OTF2_CallingContextRef parent)
Writes a CallingContext definition record into the GlobalDefWriter.
uint8_t OTF2_MetricType
Wrapper for enum OTF2_MetricType_enum.
Definition: OTF2_Definitions.h:425
uint32_t OTF2_MetricMemberRef
Type used to indicate a reference to a MetricMember definition.
Definition: OTF2_GeneralDefinitions.h:155
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteLocation(OTF2_GlobalDefWriter *writerHandle, OTF2_LocationRef self, OTF2_StringRef name, OTF2_LocationType locationType, uint64_t numberOfEvents, OTF2_LocationGroupRef locationGroup)
Writes a Location definition record into the GlobalDefWriter.
uint8_t OTF2_InterruptGeneratorMode
Wrapper for enum OTF2_InterruptGeneratorMode_enum.
Definition: OTF2_Definitions.h:652
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteCartDimension(OTF2_GlobalDefWriter *writerHandle, OTF2_CartDimensionRef self, OTF2_StringRef name, uint32_t size, OTF2_CartPeriodicity cartPeriodicity)
Writes a CartDimension definition record into the GlobalDefWriter.
uint32_t OTF2_MetricRef
Type used to indicate a reference to a MetricClass, or a MetricInstance definition.
Definition: OTF2_GeneralDefinitions.h:161
uint8_t OTF2_LocationType
Wrapper for enum OTF2_LocationType_enum.
Definition: OTF2_Definitions.h:114
uint8_t OTF2_MetricOccurrence
Wrapper for enum OTF2_MetricOccurrence_enum.
Definition: OTF2_Definitions.h:401
uint8_t OTF2_LocationGroupType
Wrapper for enum OTF2_LocationGroupType_enum.
Definition: OTF2_Definitions.h:95
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteParameter(OTF2_GlobalDefWriter *writerHandle, OTF2_ParameterRef self, OTF2_StringRef name, OTF2_ParameterType parameterType)
Writes a Parameter definition record into the GlobalDefWriter.
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteCallpath(OTF2_GlobalDefWriter *writerHandle, OTF2_CallpathRef self, OTF2_CallpathRef parent, OTF2_RegionRef region)
Writes a Callpath definition record into the GlobalDefWriter.
uint32_t OTF2_CallingContextRef
Type used to indicate a reference to a CallingContext definition.
Definition: OTF2_GeneralDefinitions.h:203
uint8_t OTF2_GroupType
Wrapper for enum OTF2_GroupType_enum.
Definition: OTF2_Definitions.h:305
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteLocationGroup(OTF2_GlobalDefWriter *writerHandle, OTF2_LocationGroupRef self, OTF2_StringRef name, OTF2_LocationGroupType locationGroupType, OTF2_SystemTreeNodeRef systemTreeParent)
Writes a LocationGroup definition record into the GlobalDefWriter.
uint8_t OTF2_MetricScope
Wrapper for enum OTF2_MetricScope_enum.
Definition: OTF2_Definitions.h:558
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteString(OTF2_GlobalDefWriter *writerHandle, OTF2_StringRef self, const char *string)
Writes a String definition record into the GlobalDefWriter.
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteComm(OTF2_GlobalDefWriter *writerHandle, OTF2_CommRef self, OTF2_StringRef name, OTF2_GroupRef group, OTF2_CommRef parent)
Writes a Comm definition record into the GlobalDefWriter.
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteInterruptGenerator(OTF2_GlobalDefWriter *writerHandle, OTF2_InterruptGeneratorRef self, OTF2_StringRef name, OTF2_InterruptGeneratorMode interruptGeneratorMode, OTF2_Base base, int64_t exponent, uint64_t period)
Writes a InterruptGenerator definition record into the GlobalDefWriter.
uint32_t OTF2_SystemTreeNodeRef
Type used to indicate a reference to a SystemTreeNode definition.
Definition: OTF2_GeneralDefinitions.h:113
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteMetricClassRecorder(OTF2_GlobalDefWriter *writerHandle, OTF2_MetricRef metricClass, OTF2_LocationRef recorder)
Writes a MetricClassRecorder definition record into the GlobalDefWriter.
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteMetricInstance(OTF2_GlobalDefWriter *writerHandle, OTF2_MetricRef self, OTF2_MetricRef metricClass, OTF2_LocationRef recorder, OTF2_MetricScope metricScope, uint64_t scope)
Writes a MetricInstance definition record into the GlobalDefWriter.
uint32_t OTF2_CartTopologyRef
Type used to indicate a reference to a CartTopology definition.
Definition: OTF2_GeneralDefinitions.h:191
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteLocationProperty(OTF2_GlobalDefWriter *writerHandle, OTF2_LocationRef location, OTF2_StringRef name, OTF2_Type type, OTF2_AttributeValue value)
Writes a LocationProperty definition record into the GlobalDefWriter.
uint8_t OTF2_CartPeriodicity
Wrapper for enum OTF2_CartPeriodicity_enum.
Definition: OTF2_Definitions.h:633
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteSystemTreeNode(OTF2_GlobalDefWriter *writerHandle, OTF2_SystemTreeNodeRef self, OTF2_StringRef name, OTF2_StringRef className, OTF2_SystemTreeNodeRef parent)
Writes a SystemTreeNode definition record into the GlobalDefWriter.
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteCallingContextProperty(OTF2_GlobalDefWriter *writerHandle, OTF2_CallingContextRef callingContext, OTF2_StringRef name, OTF2_Type type, OTF2_AttributeValue value)
Writes a CallingContextProperty definition record into the GlobalDefWriter.
uint32_t OTF2_SourceCodeLocationRef
Type used to indicate a reference to a SourceCodeLocation definition.
Definition: OTF2_GeneralDefinitions.h:197
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteParadigmProperty(OTF2_GlobalDefWriter *writerHandle, OTF2_Paradigm paradigm, OTF2_ParadigmProperty property, OTF2_Type type, OTF2_AttributeValue value)
Writes a ParadigmProperty definition record into the GlobalDefWriter.
struct OTF2_GlobalDefWriter_struct OTF2_GlobalDefWriter
Typedef of the struct which keeps all necessary information of a global definition writer...
Definition: OTF2_GlobalDefWriter.h:71
uint32_t OTF2_CartDimensionRef
Type used to indicate a reference to a CartDimension definition.
Definition: OTF2_GeneralDefinitions.h:185
uint32_t OTF2_CommRef
Type used to indicate a reference to a Comm definition.
Definition: OTF2_GeneralDefinitions.h:167
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteSystemTreeNodeDomain(OTF2_GlobalDefWriter *writerHandle, OTF2_SystemTreeNodeRef systemTreeNode, OTF2_SystemTreeDomain systemTreeDomain)
Writes a SystemTreeNodeDomain definition record into the GlobalDefWriter.
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteRmaWin(OTF2_GlobalDefWriter *writerHandle, OTF2_RmaWinRef self, OTF2_StringRef name, OTF2_CommRef comm)
Writes a RmaWin definition record into the GlobalDefWriter.
uint32_t OTF2_RegionFlag
Wrapper for enum OTF2_RegionFlag_enum.
Definition: OTF2_Definitions.h:281
uint32_t OTF2_RegionRef
Type used to indicate a reference to a Region definition.
Definition: OTF2_GeneralDefinitions.h:131
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteParadigm(OTF2_GlobalDefWriter *writerHandle, OTF2_Paradigm paradigm, OTF2_StringRef name, OTF2_ParadigmClass paradigmClass)
Writes a Paradigm definition record into the GlobalDefWriter.
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteCartCoordinate(OTF2_GlobalDefWriter *writerHandle, OTF2_CartTopologyRef cartTopology, uint32_t rank, uint8_t numberOfDimensions, const uint32_t *coordinates)
Writes a CartCoordinate definition record into the GlobalDefWriter.
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteGroup(OTF2_GlobalDefWriter *writerHandle, OTF2_GroupRef self, OTF2_StringRef name, OTF2_GroupType groupType, OTF2_Paradigm paradigm, OTF2_GroupFlag groupFlags, uint32_t numberOfMembers, const uint64_t *members)
Writes a Group definition record into the GlobalDefWriter.
uint32_t OTF2_GroupRef
Type used to indicate a reference to a Group definition.
Definition: OTF2_GeneralDefinitions.h:149
uint32_t OTF2_AttributeRef
Type used to indicate a reference to a Attribute definition.
Definition: OTF2_GeneralDefinitions.h:107
Error codes and error handling.
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteSourceCodeLocation(OTF2_GlobalDefWriter *writerHandle, OTF2_SourceCodeLocationRef self, OTF2_StringRef file, uint32_t lineNumber)
Writes a SourceCodeLocation definition record into the GlobalDefWriter.
uint32_t OTF2_RmaWinRef
Type used to indicate a reference to a RmaWin definition.
Definition: OTF2_GeneralDefinitions.h:179
Value container for an attributes.
Definition: OTF2_AttributeValue.h:52
uint32_t OTF2_CallpathRef
Type used to indicate a reference to a Callpath definition.
Definition: OTF2_GeneralDefinitions.h:143
uint32_t OTF2_CallsiteRef
Type used to indicate a reference to a Callsite definition.
Definition: OTF2_GeneralDefinitions.h:137
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteClockProperties(OTF2_GlobalDefWriter *writerHandle, uint64_t timerResolution, uint64_t globalOffset, uint64_t traceLength)
Writes a ClockProperties definition record into the GlobalDefWriter.
uint32_t OTF2_LocationGroupRef
Type used to indicate a reference to a LocationGroup definition.
Definition: OTF2_GeneralDefinitions.h:119
uint8_t OTF2_SystemTreeDomain
Wrapper for enum OTF2_SystemTreeDomain_enum.
Definition: OTF2_Definitions.h:56