![]() |
1.2 (revision 3183)
|
00001 /* 00002 * This file is part of the Score-P software (http://www.score-p.org) 00003 * 00004 * Copyright (c) 2009-2013, 00005 * RWTH Aachen University, Germany 00006 * Gesellschaft fuer numerische Simulation mbH Braunschweig, Germany 00007 * Technische Universitaet Dresden, Germany 00008 * University of Oregon, Eugene, USA 00009 * Forschungszentrum Juelich GmbH, Germany 00010 * German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany 00011 * Technische Universitaet Muenchen, Germany 00012 * 00013 * See the COPYING file in the package base directory for details. 00014 * 00015 */ 00016 00017 00018 #ifndef OTF2_GENERAL_DEFINITIONS_H 00019 #define OTF2_GENERAL_DEFINITIONS_H 00020 00021 00035 #include <stdint.h> 00036 00037 00038 #include <otf2/OTF2_ErrorCodes.h> 00039 00040 00041 #ifdef __cplusplus 00042 extern "C" { 00043 #endif /* __cplusplus */ 00044 00045 00046 /* ___ OTF2 library version information _____________________________________ */ 00047 00048 00051 #define OTF2_VERSION_MAJOR 1 00052 #define OTF2_VERSION_MINOR 2 00053 #define OTF2_VERSION_BUGFIX 0 00054 #define OTF2_VERSION_SUFFIX "" 00055 #define OTF2_VERSION "1.2" 00056 00059 /* ___ Symbols for undefined values _________________________________________ */ 00060 00061 00064 #define OTF2_UNDEFINED_UINT8 ( ( uint8_t )( ~( ( uint8_t )0u ) ) ) 00065 #define OTF2_UNDEFINED_UINT16 ( ( uint16_t )( ~( ( uint16_t )0u ) ) ) 00066 #define OTF2_UNDEFINED_UINT32 ( ( uint32_t )( ~( ( uint32_t )0u ) ) ) 00067 #define OTF2_UNDEFINED_UINT64 ( ( uint64_t )( ~( ( uint64_t )0u ) ) ) 00068 00072 #define OTF2_UNDEFINED_TYPE OTF2_UNDEFINED_UINT8 00073 00074 00076 typedef uint64_t OTF2_TimeStamp; 00077 #define OTF2_UNDEFINED_TIMESTAMP OTF2_UNDEFINED_UINT64 00078 00079 00081 typedef uint32_t OTF2_StringRef; 00083 #define OTF2_UNDEFINED_STRING ( ( OTF2_StringRef )OTF2_UNDEFINED_UINT32 ) 00084 00085 00087 typedef uint32_t OTF2_AttributeRef; 00089 #define OTF2_UNDEFINED_ATTRIBUTE ( ( OTF2_AttributeRef )OTF2_UNDEFINED_UINT32 ) 00090 00091 00093 typedef uint32_t OTF2_SystemTreeNodeRef; 00095 #define OTF2_UNDEFINED_SYSTEM_TREE_NODE ( ( OTF2_SystemTreeNodeRef )OTF2_UNDEFINED_UINT32 ) 00096 00097 00099 typedef uint32_t OTF2_LocationGroupRef; 00101 #define OTF2_UNDEFINED_LOCATION_GROUP ( ( OTF2_LocationGroupRef )OTF2_UNDEFINED_UINT32 ) 00102 00103 00105 typedef uint64_t OTF2_LocationRef; 00107 #define OTF2_UNDEFINED_LOCATION ( ( OTF2_LocationRef )OTF2_UNDEFINED_UINT64 ) 00108 00109 00111 typedef uint32_t OTF2_RegionRef; 00113 #define OTF2_UNDEFINED_REGION ( ( OTF2_RegionRef )OTF2_UNDEFINED_UINT32 ) 00114 00115 00117 typedef uint32_t OTF2_CallsiteRef; 00119 #define OTF2_UNDEFINED_CALLSITE ( ( OTF2_CallsiteRef )OTF2_UNDEFINED_UINT32 ) 00120 00121 00123 typedef uint32_t OTF2_CallpathRef; 00125 #define OTF2_UNDEFINED_CALLPATH ( ( OTF2_CallpathRef )OTF2_UNDEFINED_UINT32 ) 00126 00127 00129 typedef uint32_t OTF2_GroupRef; 00131 #define OTF2_UNDEFINED_GROUP ( ( OTF2_GroupRef )OTF2_UNDEFINED_UINT32 ) 00132 00133 00135 typedef uint32_t OTF2_MetricMemberRef; 00137 #define OTF2_UNDEFINED_METRIC_MEMBER ( ( OTF2_MetricMemberRef )OTF2_UNDEFINED_UINT32 ) 00138 00139 00141 typedef uint32_t OTF2_MetricRef; 00143 #define OTF2_UNDEFINED_METRIC ( ( OTF2_MetricRef )OTF2_UNDEFINED_UINT32 ) 00144 00145 00147 typedef uint32_t OTF2_CommRef; 00149 #define OTF2_UNDEFINED_COMM ( ( OTF2_CommRef )OTF2_UNDEFINED_UINT32 ) 00150 00151 00153 typedef uint32_t OTF2_ParameterRef; 00155 #define OTF2_UNDEFINED_PARAMETER ( ( OTF2_ParameterRef )OTF2_UNDEFINED_UINT32 ) 00156 00157 00159 typedef uint32_t OTF2_RmaWinRef; 00161 #define OTF2_UNDEFINED_RMA_WIN ( ( OTF2_RmaWinRef )OTF2_UNDEFINED_UINT32 ) 00162 00163 00164 /* ___ Declarations of opaque OTF2 objects __________________________________ */ 00165 00166 00168 typedef struct OTF2_EvtReader_struct OTF2_EvtReader; 00169 00170 00172 typedef struct OTF2_GlobalEvtReader_struct OTF2_GlobalEvtReader; 00173 00174 00176 typedef struct OTF2_DefReader_struct OTF2_DefReader; 00177 00178 00180 typedef struct OTF2_GlobalDefReader_struct OTF2_GlobalDefReader; 00181 00182 00184 typedef struct OTF2_SnapReader_struct OTF2_SnapReader; 00185 00186 00188 typedef struct OTF2_GlobalSnapReader_struct OTF2_GlobalSnapReader; 00189 00190 00192 typedef struct OTF2_MarkerReader_struct OTF2_MarkerReader; 00193 00194 00195 /* ___ Definitions related to the file interaction __________________________ */ 00196 00197 00199 #define OTF2_CHUNK_SIZE_MIN ( uint64_t )( 256 * 1024 ) 00200 00201 00203 #define OTF2_CHUNK_SIZE_MAX ( uint64_t )( 1024 * 1024 * 16 ) 00204 00205 00208 typedef uint8_t OTF2_FileSubstrate; 00209 00210 00214 enum OTF2_FileSubstrate_enum 00215 { 00217 OTF2_SUBSTRATE_UNDEFINED = 0, 00219 OTF2_SUBSTRATE_POSIX = 1, 00222 OTF2_SUBSTRATE_SION = 2, 00224 OTF2_SUBSTRATE_NONE = 3 00225 }; 00226 00227 00230 typedef uint8_t OTF2_FileMode; 00231 00232 00234 enum OTF2_FileMode_enum 00235 { 00237 OTF2_FILEMODE_WRITE = 0, 00239 OTF2_FILEMODE_READ = 1, 00241 OTF2_FILEMODE_MODIFY = 2 00242 }; 00243 00244 00247 typedef uint8_t OTF2_Compression; 00248 00249 00251 enum OTF2_Compression_enum 00252 { 00254 OTF2_COMPRESSION_UNDEFINED = 0, 00256 OTF2_COMPRESSION_NONE = 1, 00258 OTF2_COMPRESSION_ZLIB = 2 00259 }; 00260 00261 00264 typedef uint8_t OTF2_FileType; 00265 00268 enum OTF2_FileType_enum 00269 { 00273 OTF2_FILETYPE_ANCHOR = 0, 00274 00278 OTF2_FILETYPE_GLOBAL_DEFS = 1, 00279 00281 OTF2_FILETYPE_LOCAL_DEFS = 2, 00282 00284 OTF2_FILETYPE_EVENTS = 3, 00285 00287 OTF2_FILETYPE_SNAPSHOTS = 4, 00288 00290 OTF2_FILETYPE_THUMBNAIL = 5, 00291 00293 OTF2_FILETYPE_MARKER = 6 00294 }; 00295 00296 00315 typedef enum OTF2_CallbackCode_enum 00316 { 00318 OTF2_CALLBACK_SUCCESS = 0, 00319 00326 OTF2_CALLBACK_INTERRUPT = !OTF2_CALLBACK_SUCCESS 00327 } OTF2_CallbackCode; 00328 00329 00330 /* ___ Definitions related to the memory buffer ______________________________ */ 00331 00332 00335 typedef uint8_t OTF2_FlushType; 00336 00337 00339 enum OTF2_FlushType_enum 00340 { 00342 OTF2_NO_FLUSH = 0, 00344 OTF2_FLUSH = 1 00345 }; 00346 00347 00349 typedef uint8_t OTF2_MappingType; 00350 00356 enum OTF2_MappingType_enum 00357 { 00360 OTF2_MAPPING_STRING = 0, 00363 OTF2_MAPPING_ATTRIBUTE = 1, 00366 OTF2_MAPPING_LOCATION = 2, 00369 OTF2_MAPPING_REGION = 3, 00372 OTF2_MAPPING_GROUP = 4, 00375 OTF2_MAPPING_METRIC = 5, 00378 OTF2_MAPPING_COMM = 6, 00381 OTF2_MAPPING_PARAMETER = 7, 00384 OTF2_MAPPING_RMA_WIN = 8, 00385 00388 OTF2_MAPPING_MAX = 9 00389 }; 00390 00391 00393 typedef uint8_t OTF2_Type; 00394 00400 enum OTF2_Type_enum 00401 { 00404 OTF2_TYPE_NONE = 0, 00407 OTF2_TYPE_UINT8 = 1, 00410 OTF2_TYPE_UINT16 = 2, 00413 OTF2_TYPE_UINT32 = 3, 00416 OTF2_TYPE_UINT64 = 4, 00419 OTF2_TYPE_INT8 = 5, 00422 OTF2_TYPE_INT16 = 6, 00425 OTF2_TYPE_INT32 = 7, 00428 OTF2_TYPE_INT64 = 8, 00431 OTF2_TYPE_FLOAT = 9, 00434 OTF2_TYPE_DOUBLE = 10, 00437 OTF2_TYPE_STRING = 11, 00440 OTF2_TYPE_ATTRIBUTE = 12, 00443 OTF2_TYPE_LOCATION = 13, 00446 OTF2_TYPE_REGION = 14, 00449 OTF2_TYPE_GROUP = 15, 00452 OTF2_TYPE_METRIC = 16, 00455 OTF2_TYPE_COMM = 17, 00458 OTF2_TYPE_PARAMETER = 18, 00461 OTF2_TYPE_RMA_WIN = 19 00462 }; 00463 00464 00466 typedef uint8_t OTF2_Paradigm; 00467 00473 enum OTF2_Paradigm_enum 00474 { 00477 OTF2_PARADIGM_UNKNOWN = 0, 00480 OTF2_PARADIGM_USER = 1, 00483 OTF2_PARADIGM_COMPILER = 2, 00486 OTF2_PARADIGM_OPENMP = 3, 00489 OTF2_PARADIGM_MPI = 4, 00492 OTF2_PARADIGM_CUDA = 5, 00495 OTF2_PARADIGM_MEASUREMENT_SYSTEM = 6 00496 }; 00497 00498 00500 typedef uint8_t OTF2_ThumbnailType; 00501 00507 enum OTF2_ThumbnailType_enum 00508 { 00511 OTF2_THUMBNAIL_TYPE_REGION = 0, 00514 OTF2_THUMBNAIL_TYPE_METRIC = 1, 00517 OTF2_THUMBNAIL_TYPE_ATTRIBUTES = 2 00518 }; 00519 00520 00521 #ifdef __cplusplus 00522 } 00523 #endif /* __cplusplus */ 00524 00525 00526 #endif /* !OTF2_GENERAL_DEFINITIONS_H */