![]() |
1.4 (revision 3771)
|
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 * 00007 * Copyright (c) 2009-2013, 00008 * Gesellschaft fuer numerische Simulation mbH Braunschweig, Germany 00009 * 00010 * Copyright (c) 2009-2014, 00011 * Technische Universitaet Dresden, Germany 00012 * 00013 * Copyright (c) 2009-2013, 00014 * University of Oregon, Eugene, USA 00015 * 00016 * Copyright (c) 2009-2013, 00017 * Forschungszentrum Juelich GmbH, Germany 00018 * 00019 * Copyright (c) 2009-2013, 00020 * German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany 00021 * 00022 * Copyright (c) 2009-2013, 00023 * Technische Universitaet Muenchen, Germany 00024 * 00025 * This software may be modified and distributed under the terms of 00026 * a BSD-style license. See the COPYING file in the package base 00027 * directory for details. 00028 * 00029 */ 00030 00031 00032 #ifndef OTF2_ARCHIVE_H 00033 #define OTF2_ARCHIVE_H 00034 00035 00155 #include <stdint.h> 00156 00157 00158 #include <otf2/OTF2_ErrorCodes.h> 00159 00160 00161 #include <otf2/OTF2_Callbacks.h> 00162 #include <otf2/OTF2_DefWriter.h> 00163 #include <otf2/OTF2_DefReader.h> 00164 #include <otf2/OTF2_EvtWriter.h> 00165 #include <otf2/OTF2_EvtReader.h> 00166 #include <otf2/OTF2_SnapWriter.h> 00167 #include <otf2/OTF2_SnapReader.h> 00168 #include <otf2/OTF2_GlobalDefWriter.h> 00169 #include <otf2/OTF2_GlobalDefReader.h> 00170 #include <otf2/OTF2_GlobalEvtReader.h> 00171 #include <otf2/OTF2_GlobalSnapReader.h> 00172 #include <otf2/OTF2_Thumbnail.h> 00173 #include <otf2/OTF2_MarkerWriter.h> 00174 #include <otf2/OTF2_MarkerReader.h> 00175 00176 00177 #ifdef __cplusplus 00178 extern "C" { 00179 #endif /* __cplusplus */ 00180 00181 00187 #define OTF2_CHUNK_SIZE_EVENTS_DEFAULT ( 1024 * 1024 ) 00188 00189 00195 #define OTF2_CHUNK_SIZE_DEFINITIONS_DEFAULT ( 4 * 1024 * 1024 ) 00196 00197 00203 typedef struct OTF2_Archive_struct OTF2_Archive; 00204 00205 00264 OTF2_Archive* 00265 OTF2_Archive_Open( const char* archivePath, 00266 const char* archiveName, 00267 const OTF2_FileMode fileMode, 00268 const uint64_t chunkSizeEvents, 00269 const uint64_t chunkSizeDefs, 00270 const OTF2_FileSubstrate fileSubstrate, 00271 const OTF2_Compression compression ); 00272 00273 00284 OTF2_ErrorCode 00285 OTF2_Archive_Close( OTF2_Archive* archive ); 00286 00287 00302 OTF2_ErrorCode 00303 OTF2_Archive_SwitchFileMode( OTF2_Archive* archive, 00304 OTF2_FileMode newFileMode ); 00305 00306 00318 OTF2_ErrorCode 00319 OTF2_Archive_SetMachineName( OTF2_Archive* archive, 00320 const char* machineName ); 00321 00322 00334 OTF2_ErrorCode 00335 OTF2_Archive_SetDescription( OTF2_Archive* archive, 00336 const char* description ); 00337 00338 00350 OTF2_ErrorCode 00351 OTF2_Archive_SetCreator( OTF2_Archive* archive, 00352 const char* creator ); 00353 00354 00364 OTF2_ErrorCode 00365 OTF2_Archive_SetFlushCallbacks( OTF2_Archive* archive, 00366 const OTF2_FlushCallbacks* flushCallbacks, 00367 void* flushData ); 00368 00369 00379 OTF2_ErrorCode 00380 OTF2_Archive_SetMemoryCallbacks( OTF2_Archive* archive, 00381 const OTF2_MemoryCallbacks* memoryCallbacks, 00382 void* memoryData ); 00383 00384 00398 OTF2_ErrorCode 00399 OTF2_Archive_SetCollectiveCallbacks( OTF2_Archive* archive, 00400 const OTF2_CollectiveCallbacks* collectiveCallbacks, 00401 void* collectiveData, 00402 OTF2_CollectiveContext* globalCommContext, 00403 OTF2_CollectiveContext* localCommContext ); 00404 00405 00413 OTF2_ErrorCode 00414 OTF2_Archive_SetSerialCollectiveCallbacks( OTF2_Archive* archive ); 00415 00416 00441 OTF2_ErrorCode 00442 OTF2_Archive_SetProperty( OTF2_Archive* archive, 00443 const char* name, 00444 const char* value, 00445 bool overwrite ); 00446 00447 00469 OTF2_ErrorCode 00470 OTF2_Archive_SetBoolProperty( OTF2_Archive* archive, 00471 const char* name, 00472 bool value, 00473 bool overwrite ); 00474 00475 00486 OTF2_ErrorCode 00487 OTF2_Archive_GetPropertyNames( OTF2_Archive* archive, 00488 uint32_t* numberOfProperties, 00489 char*** names ); 00490 00491 00505 OTF2_ErrorCode 00506 OTF2_Archive_GetProperty( OTF2_Archive* archive, 00507 const char* name, 00508 char** value ); 00509 00510 00521 OTF2_ErrorCode 00522 OTF2_Archive_GetTraceId( OTF2_Archive* archive, 00523 uint64_t* id ); 00524 00525 00533 OTF2_ErrorCode 00534 OTF2_Archive_GetNumberOfLocations( OTF2_Archive* archive, 00535 uint64_t* numberOfLocations ); 00536 00537 00545 OTF2_ErrorCode 00546 OTF2_Archive_GetNumberOfGlobalDefinitions( OTF2_Archive* archive, 00547 uint64_t* numberOfDefinitions ); 00548 00549 00557 OTF2_ErrorCode 00558 OTF2_Archive_GetMachineName( OTF2_Archive* archive, 00559 char** machineName ); 00560 00561 00569 OTF2_ErrorCode 00570 OTF2_Archive_GetDescription( OTF2_Archive* archive, 00571 char** description ); 00572 00573 00581 OTF2_ErrorCode 00582 OTF2_Archive_GetCreator( OTF2_Archive* archive, 00583 char** creator ); 00584 00585 00595 OTF2_ErrorCode 00596 OTF2_Archive_GetVersion( OTF2_Archive* archive, 00597 uint8_t* major, 00598 uint8_t* minor, 00599 uint8_t* bugfix ); 00600 00601 00610 OTF2_ErrorCode 00611 OTF2_Archive_GetChunkSize( OTF2_Archive* archive, 00612 uint64_t* chunkSizeEvents, 00613 uint64_t* chunkSizeDefs ); 00614 00615 00623 OTF2_ErrorCode 00624 OTF2_Archive_GetFileSubstrate( OTF2_Archive* archive, 00625 OTF2_FileSubstrate* substrate ); 00626 00627 00635 OTF2_ErrorCode 00636 OTF2_Archive_GetCompression( OTF2_Archive* archive, 00637 OTF2_Compression* compression ); 00638 00639 00648 OTF2_EvtWriter* 00649 OTF2_Archive_GetEvtWriter( OTF2_Archive* archive, 00650 OTF2_LocationRef location ); 00651 00652 00661 OTF2_DefWriter* 00662 OTF2_Archive_GetDefWriter( OTF2_Archive* archive, 00663 OTF2_LocationRef location ); 00664 00665 00673 OTF2_GlobalDefWriter* 00674 OTF2_Archive_GetGlobalDefWriter( OTF2_Archive* archive ); 00675 00676 00687 OTF2_SnapWriter* 00688 OTF2_Archive_GetSnapWriter( OTF2_Archive* archive, 00689 OTF2_LocationRef location ); 00690 00691 00709 OTF2_ThumbWriter* 00710 OTF2_Archive_GetThumbWriter( OTF2_Archive* archive, 00711 const char* name, 00712 const char* description, 00713 OTF2_ThumbnailType type, 00714 uint32_t numberOfSamples, 00715 uint32_t numberOfMetrics, 00716 const uint64_t* refsToDefs ); 00717 00718 00728 OTF2_MarkerWriter* 00729 OTF2_Archive_GetMarkerWriter( OTF2_Archive* archive ); 00730 00731 00740 OTF2_EvtReader* 00741 OTF2_Archive_GetEvtReader( OTF2_Archive* archive, 00742 OTF2_LocationRef location ); 00743 00744 00752 OTF2_GlobalEvtReader* 00753 OTF2_Archive_GetGlobalEvtReader( OTF2_Archive* archive ); 00754 00755 00764 OTF2_DefReader* 00765 OTF2_Archive_GetDefReader( OTF2_Archive* archive, 00766 OTF2_LocationRef location ); 00767 00768 00778 OTF2_GlobalDefReader* 00779 OTF2_Archive_GetGlobalDefReader( OTF2_Archive* archive ); 00780 00781 00792 OTF2_SnapReader* 00793 OTF2_Archive_GetSnapReader( OTF2_Archive* archive, 00794 OTF2_LocationRef location ); 00795 00796 00806 OTF2_GlobalSnapReader* 00807 OTF2_Archive_GetGlobalSnapReader( OTF2_Archive* archive ); 00808 00809 00820 OTF2_ThumbReader* 00821 OTF2_Archive_GetThumbReader( OTF2_Archive* archive, 00822 uint32_t number ); 00823 00824 00834 OTF2_MarkerReader* 00835 OTF2_Archive_GetMarkerReader( OTF2_Archive* archive ); 00836 00837 00845 OTF2_ErrorCode 00846 OTF2_Archive_CloseEvtWriter( OTF2_Archive* archive, 00847 OTF2_EvtWriter* writer ); 00848 00849 00857 OTF2_ErrorCode 00858 OTF2_Archive_CloseDefWriter( OTF2_Archive* archive, 00859 OTF2_DefWriter* writer ); 00860 00861 00871 OTF2_ErrorCode 00872 OTF2_Archive_CloseMarkerWriter( OTF2_Archive* archive, 00873 OTF2_MarkerWriter* writer ); 00874 00875 00885 OTF2_ErrorCode 00886 OTF2_Archive_CloseSnapWriter( OTF2_Archive* archive, 00887 OTF2_SnapWriter* writer ); 00888 00889 00905 OTF2_ErrorCode 00906 OTF2_Archive_CloseGlobalDefWriter( OTF2_Archive* archive, 00907 OTF2_GlobalDefWriter* writer ); 00908 00909 00917 OTF2_ErrorCode 00918 OTF2_Archive_CloseEvtReader( OTF2_Archive* archive, 00919 OTF2_EvtReader* reader ); 00920 00921 00931 OTF2_ErrorCode 00932 OTF2_Archive_CloseThumbReader( OTF2_Archive* archive, 00933 OTF2_ThumbReader* reader ); 00934 00935 00945 OTF2_ErrorCode 00946 OTF2_Archive_CloseGlobalEvtReader( OTF2_Archive* archive, 00947 OTF2_GlobalEvtReader* globalEvtReader ); 00948 00949 00957 OTF2_ErrorCode 00958 OTF2_Archive_CloseDefReader( OTF2_Archive* archive, 00959 OTF2_DefReader* reader ); 00960 00961 00969 OTF2_ErrorCode 00970 OTF2_Archive_CloseGlobalDefReader( OTF2_Archive* archive, 00971 OTF2_GlobalDefReader* globalDefReader ); 00972 00973 00983 OTF2_ErrorCode 00984 OTF2_Archive_CloseSnapReader( OTF2_Archive* archive, 00985 OTF2_SnapReader* reader ); 00986 00987 00998 OTF2_ErrorCode 00999 OTF2_Archive_CloseGlobalSnapReader( OTF2_Archive* archive, 01000 OTF2_GlobalSnapReader* globalSnapReader ); 01001 01002 01012 OTF2_ErrorCode 01013 OTF2_Archive_CloseMarkerReader( OTF2_Archive* archive, 01014 OTF2_MarkerReader* markerReader ); 01015 01016 01027 OTF2_ErrorCode 01028 OTF2_Archive_GetNumberOfThumbnails( OTF2_Archive* archive, 01029 uint32_t* number ); 01030 01031 01042 OTF2_ErrorCode 01043 OTF2_Archive_SetNumberOfSnapshots( OTF2_Archive* archive, 01044 uint32_t number ); 01045 01046 01057 OTF2_ErrorCode 01058 OTF2_Archive_GetNumberOfSnapshots( OTF2_Archive* archive, 01059 uint32_t* number ); 01060 01061 01073 OTF2_ErrorCode 01074 OTF2_Archive_OpenEvtFiles( OTF2_Archive* archive ); 01075 01076 01088 OTF2_ErrorCode 01089 OTF2_Archive_CloseEvtFiles( OTF2_Archive* archive ); 01090 01091 01103 OTF2_ErrorCode 01104 OTF2_Archive_OpenDefFiles( OTF2_Archive* archive ); 01105 01106 01118 OTF2_ErrorCode 01119 OTF2_Archive_CloseDefFiles( OTF2_Archive* archive ); 01120 01121 01133 OTF2_ErrorCode 01134 OTF2_Archive_OpenSnapFiles( OTF2_Archive* archive ); 01135 01136 01148 OTF2_ErrorCode 01149 OTF2_Archive_CloseSnapFiles( OTF2_Archive* archive ); 01150 01151 01162 OTF2_ErrorCode 01163 OTF2_Archive_SelectLocation( OTF2_Archive* archive, 01164 OTF2_LocationRef location ); 01165 01166 01167 #ifdef __cplusplus 01168 } 01169 #endif /* __cplusplus */ 01170 01171 01172 #endif /* !OTF2_ARCHIVE_H */