![]() |
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_ARCHIVE_H 00019 #define OTF2_ARCHIVE_H 00020 00021 00179 #include <stdint.h> 00180 00181 00182 #include <otf2/OTF2_ErrorCodes.h> 00183 00184 00185 #include <otf2/OTF2_Callbacks.h> 00186 #include <otf2/OTF2_DefWriter.h> 00187 #include <otf2/OTF2_DefReader.h> 00188 #include <otf2/OTF2_EvtWriter.h> 00189 #include <otf2/OTF2_EvtReader.h> 00190 #include <otf2/OTF2_SnapWriter.h> 00191 #include <otf2/OTF2_SnapReader.h> 00192 #include <otf2/OTF2_GlobalDefWriter.h> 00193 #include <otf2/OTF2_GlobalDefReader.h> 00194 #include <otf2/OTF2_GlobalEvtReader.h> 00195 #include <otf2/OTF2_GlobalSnapReader.h> 00196 #include <otf2/OTF2_Thumbnail.h> 00197 #include <otf2/OTF2_MarkerWriter.h> 00198 #include <otf2/OTF2_MarkerReader.h> 00199 00200 00201 #ifdef __cplusplus 00202 extern "C" { 00203 #endif /* __cplusplus */ 00204 00205 00211 #define OTF2_CHUNK_SIZE_EVENTS_DEFAULT ( 1024 * 1024 ) 00212 00213 00219 #define OTF2_CHUNK_SIZE_DEFINITIONS_DEFAULT ( 4 * 1024 * 1024 ) 00220 00221 00227 typedef struct OTF2_Archive_struct OTF2_Archive; 00228 00229 00238 typedef uint8_t OTF2_MasterSlaveMode; 00239 00240 00243 enum OTF2_MasterSlaveMode_enum 00244 { 00246 OTF2_SLAVE = 0, 00248 OTF2_MASTER = 1 00249 }; 00250 00251 00310 OTF2_Archive* 00311 OTF2_Archive_Open( const char* archivePath, 00312 const char* archiveName, 00313 const OTF2_FileMode fileMode, 00314 const uint64_t chunkSizeEvents, 00315 const uint64_t chunkSizeDefs, 00316 const OTF2_FileSubstrate fileSubstrate, 00317 const OTF2_Compression compression ); 00318 00319 00330 OTF2_ErrorCode 00331 OTF2_Archive_Close( OTF2_Archive* archive ); 00332 00333 00349 OTF2_ErrorCode 00350 OTF2_Archive_SwitchFileMode( OTF2_Archive* archive, 00351 OTF2_FileMode newFileMode ); 00352 00353 00369 OTF2_ErrorCode 00370 OTF2_Archive_SetMasterSlaveMode( OTF2_Archive* archive, 00371 OTF2_MasterSlaveMode masterOrSlave ); 00372 00373 00385 OTF2_ErrorCode 00386 OTF2_Archive_SetMachineName( OTF2_Archive* archive, 00387 const char* machineName ); 00388 00389 00401 OTF2_ErrorCode 00402 OTF2_Archive_SetDescription( OTF2_Archive* archive, 00403 const char* description ); 00404 00405 00417 OTF2_ErrorCode 00418 OTF2_Archive_SetCreator( OTF2_Archive* archive, 00419 const char* creator ); 00420 00421 00431 OTF2_ErrorCode 00432 OTF2_Archive_SetFlushCallbacks( OTF2_Archive* archive, 00433 const OTF2_FlushCallbacks* flushCallbacks, 00434 void* flushData ); 00435 00436 00446 OTF2_ErrorCode 00447 OTF2_Archive_SetMemoryCallbacks( OTF2_Archive* archive, 00448 const OTF2_MemoryCallbacks* memoryCallbacks, 00449 void* memoryData ); 00450 00451 00461 OTF2_ErrorCode 00462 OTF2_Archive_SetFileSionCallbacks( OTF2_Archive* archive, 00463 const OTF2_FileSionCallbacks* fileSionCallbacks, 00464 void* fileSionData ); 00465 00466 00491 OTF2_ErrorCode 00492 OTF2_Archive_SetProperty( OTF2_Archive* archive, 00493 const char* name, 00494 const char* value, 00495 bool overwrite ); 00496 00497 00519 OTF2_ErrorCode 00520 OTF2_Archive_SetBoolProperty( OTF2_Archive* archive, 00521 const char* name, 00522 bool value, 00523 bool overwrite ); 00524 00525 00536 OTF2_ErrorCode 00537 OTF2_Archive_GetPropertyNames( OTF2_Archive* archive, 00538 uint32_t* numberOfProperties, 00539 char*** names ); 00540 00541 00555 OTF2_ErrorCode 00556 OTF2_Archive_GetProperty( OTF2_Archive* archive, 00557 const char* name, 00558 char** value ); 00559 00560 00571 OTF2_ErrorCode 00572 OTF2_Archive_GetTraceId( OTF2_Archive* archive, 00573 uint64_t* id ); 00574 00575 00583 OTF2_ErrorCode 00584 OTF2_Archive_GetMasterSlaveMode( OTF2_Archive* archive, 00585 OTF2_MasterSlaveMode* masterOrSlave ); 00586 00587 00595 OTF2_ErrorCode 00596 OTF2_Archive_GetNumberOfLocations( OTF2_Archive* archive, 00597 uint64_t* numberOfLocations ); 00598 00599 00607 OTF2_ErrorCode 00608 OTF2_Archive_GetNumberOfGlobalDefinitions( OTF2_Archive* archive, 00609 uint64_t* numberOfDefinitions ); 00610 00611 00619 OTF2_ErrorCode 00620 OTF2_Archive_GetMachineName( OTF2_Archive* archive, 00621 char** machineName ); 00622 00623 00631 OTF2_ErrorCode 00632 OTF2_Archive_GetDescription( OTF2_Archive* archive, 00633 char** description ); 00634 00635 00643 OTF2_ErrorCode 00644 OTF2_Archive_GetCreator( OTF2_Archive* archive, 00645 char** creator ); 00646 00647 00657 OTF2_ErrorCode 00658 OTF2_Archive_GetVersion( OTF2_Archive* archive, 00659 uint8_t* major, 00660 uint8_t* minor, 00661 uint8_t* bugfix ); 00662 00663 00672 OTF2_ErrorCode 00673 OTF2_Archive_GetChunkSize( OTF2_Archive* archive, 00674 uint64_t* chunkSizeEvents, 00675 uint64_t* chunkSizeDefs ); 00676 00677 00685 OTF2_ErrorCode 00686 OTF2_Archive_GetFileSubstrate( OTF2_Archive* archive, 00687 OTF2_FileSubstrate* substrate ); 00688 00689 00697 OTF2_ErrorCode 00698 OTF2_Archive_GetCompression( OTF2_Archive* archive, 00699 OTF2_Compression* compression ); 00700 00701 00710 OTF2_EvtWriter* 00711 OTF2_Archive_GetEvtWriter( OTF2_Archive* archive, 00712 OTF2_LocationRef location ); 00713 00714 00723 OTF2_DefWriter* 00724 OTF2_Archive_GetDefWriter( OTF2_Archive* archive, 00725 OTF2_LocationRef location ); 00726 00727 00735 OTF2_GlobalDefWriter* 00736 OTF2_Archive_GetGlobalDefWriter( OTF2_Archive* archive ); 00737 00738 00749 OTF2_SnapWriter* 00750 OTF2_Archive_GetSnapWriter( OTF2_Archive* archive, 00751 OTF2_LocationRef location ); 00752 00753 00771 OTF2_ThumbWriter* 00772 OTF2_Archive_GetThumbWriter( OTF2_Archive* archive, 00773 const char* name, 00774 const char* description, 00775 OTF2_ThumbnailType type, 00776 uint32_t numberOfSamples, 00777 uint32_t numberOfMetrics, 00778 const uint64_t* refsToDefs ); 00779 00780 00790 OTF2_MarkerWriter* 00791 OTF2_Archive_GetMarkerWriter( OTF2_Archive* archive ); 00792 00793 00802 OTF2_EvtReader* 00803 OTF2_Archive_GetEvtReader( OTF2_Archive* archive, 00804 OTF2_LocationRef location ); 00805 00806 00814 OTF2_GlobalEvtReader* 00815 OTF2_Archive_GetGlobalEvtReader( OTF2_Archive* archive ); 00816 00817 00826 OTF2_DefReader* 00827 OTF2_Archive_GetDefReader( OTF2_Archive* archive, 00828 OTF2_LocationRef location ); 00829 00830 00838 OTF2_GlobalDefReader* 00839 OTF2_Archive_GetGlobalDefReader( OTF2_Archive* archive ); 00840 00841 00852 OTF2_SnapReader* 00853 OTF2_Archive_GetSnapReader( OTF2_Archive* archive, 00854 OTF2_LocationRef location ); 00855 00856 00866 OTF2_GlobalSnapReader* 00867 OTF2_Archive_GetGlobalSnapReader( OTF2_Archive* archive ); 00868 00869 00880 OTF2_ThumbReader* 00881 OTF2_Archive_GetThumbReader( OTF2_Archive* archive, 00882 uint32_t number ); 00883 00884 00894 OTF2_MarkerReader* 00895 OTF2_Archive_GetMarkerReader( OTF2_Archive* archive ); 00896 00897 00905 OTF2_ErrorCode 00906 OTF2_Archive_CloseEvtWriter( OTF2_Archive* archive, 00907 OTF2_EvtWriter* writer ); 00908 00909 00917 OTF2_ErrorCode 00918 OTF2_Archive_CloseDefWriter( OTF2_Archive* archive, 00919 OTF2_DefWriter* writer ); 00920 00930 OTF2_ErrorCode 00931 OTF2_Archive_CloseMarkerWriter( OTF2_Archive* archive, 00932 OTF2_MarkerWriter* writer ); 00933 00934 00944 OTF2_ErrorCode 00945 OTF2_Archive_CloseSnapWriter( OTF2_Archive* archive, 00946 OTF2_SnapWriter* writer ); 00947 00948 00956 OTF2_ErrorCode 00957 OTF2_Archive_CloseEvtReader( OTF2_Archive* archive, 00958 OTF2_EvtReader* reader ); 00959 00960 00970 OTF2_ErrorCode 00971 OTF2_Archive_CloseThumbReader( OTF2_Archive* archive, 00972 OTF2_ThumbReader* reader ); 00973 00983 OTF2_ErrorCode 00984 OTF2_Archive_CloseGlobalEvtReader( OTF2_Archive* archive, 00985 OTF2_GlobalEvtReader* globalEvtReader ); 00986 00987 00995 OTF2_ErrorCode 00996 OTF2_Archive_CloseDefReader( OTF2_Archive* archive, 00997 OTF2_DefReader* reader ); 00998 00999 01007 OTF2_ErrorCode 01008 OTF2_Archive_CloseGlobalDefReader( OTF2_Archive* archive, 01009 OTF2_GlobalDefReader* globalDefReader ); 01010 01011 01021 OTF2_ErrorCode 01022 OTF2_Archive_CloseSnapReader( OTF2_Archive* archive, 01023 OTF2_SnapReader* reader ); 01024 01025 01036 OTF2_ErrorCode 01037 OTF2_Archive_CloseGlobalSnapReader( OTF2_Archive* archive, 01038 OTF2_GlobalSnapReader* globalSnapReader ); 01039 01049 OTF2_ErrorCode 01050 OTF2_Archive_CloseMarkerReader( OTF2_Archive* archive, 01051 OTF2_MarkerReader* markerReader ); 01052 01053 01063 OTF2_ErrorCode 01064 OTF2_Archive_CloseMarkerReader( OTF2_Archive* archive, 01065 OTF2_MarkerReader* markerReader ); 01066 01067 01078 OTF2_ErrorCode 01079 OTF2_Archive_GetNumberOfThumbnails( OTF2_Archive* archive, 01080 uint32_t* number ); 01081 01092 OTF2_ErrorCode 01093 OTF2_Archive_SetNumberOfSnapshots( OTF2_Archive* archive, 01094 uint32_t number ); 01095 01106 OTF2_ErrorCode 01107 OTF2_Archive_GetNumberOfSnapshots( OTF2_Archive* archive, 01108 uint32_t* number ); 01109 01110 01111 #ifdef __cplusplus 01112 } 01113 #endif /* __cplusplus */ 01114 01115 01116 #endif /* !OTF2_ARCHIVE_H */