1.5.1 (revision 4026)
otf2/OTF2_Archive.h
Go to the documentation of this file.
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 
00157 #include <stdint.h>
00158 
00159 
00160 #include <otf2/OTF2_ErrorCodes.h>
00161 
00162 
00163 #include <otf2/OTF2_Callbacks.h>
00164 #include <otf2/OTF2_DefWriter.h>
00165 #include <otf2/OTF2_DefReader.h>
00166 #include <otf2/OTF2_EvtWriter.h>
00167 #include <otf2/OTF2_EvtReader.h>
00168 #include <otf2/OTF2_SnapWriter.h>
00169 #include <otf2/OTF2_SnapReader.h>
00170 #include <otf2/OTF2_GlobalDefWriter.h>
00171 #include <otf2/OTF2_GlobalDefReader.h>
00172 #include <otf2/OTF2_GlobalEvtReader.h>
00173 #include <otf2/OTF2_GlobalSnapReader.h>
00174 #include <otf2/OTF2_Thumbnail.h>
00175 #include <otf2/OTF2_MarkerWriter.h>
00176 #include <otf2/OTF2_MarkerReader.h>
00177 
00178 
00179 #ifdef __cplusplus
00180 extern "C" {
00181 #endif /* __cplusplus */
00182 
00183 
00189 #define OTF2_CHUNK_SIZE_EVENTS_DEFAULT ( 1024 * 1024 )
00190 
00191 
00197 #define OTF2_CHUNK_SIZE_DEFINITIONS_DEFAULT ( 4 * 1024 * 1024 )
00198 
00199 
00205 typedef struct OTF2_Archive_struct OTF2_Archive;
00206 
00207 
00266 OTF2_Archive*
00267 OTF2_Archive_Open( const char*              archivePath,
00268                    const char*              archiveName,
00269                    const OTF2_FileMode      fileMode,
00270                    const uint64_t           chunkSizeEvents,
00271                    const uint64_t           chunkSizeDefs,
00272                    const OTF2_FileSubstrate fileSubstrate,
00273                    const OTF2_Compression   compression );
00274 
00275 
00286 OTF2_ErrorCode
00287 OTF2_Archive_Close( OTF2_Archive* archive );
00288 
00289 
00304 OTF2_ErrorCode
00305 OTF2_Archive_SwitchFileMode( OTF2_Archive* archive,
00306                              OTF2_FileMode newFileMode );
00307 
00308 
00320 OTF2_ErrorCode
00321 OTF2_Archive_SetMachineName( OTF2_Archive* archive,
00322                              const char*   machineName );
00323 
00324 
00336 OTF2_ErrorCode
00337 OTF2_Archive_SetDescription( OTF2_Archive* archive,
00338                              const char*   description );
00339 
00340 
00352 OTF2_ErrorCode
00353 OTF2_Archive_SetCreator( OTF2_Archive* archive,
00354                          const char*   creator );
00355 
00356 
00366 OTF2_ErrorCode
00367 OTF2_Archive_SetFlushCallbacks( OTF2_Archive*              archive,
00368                                 const OTF2_FlushCallbacks* flushCallbacks,
00369                                 void*                      flushData );
00370 
00371 
00381 OTF2_ErrorCode
00382 OTF2_Archive_SetMemoryCallbacks( OTF2_Archive*               archive,
00383                                  const OTF2_MemoryCallbacks* memoryCallbacks,
00384                                  void*                       memoryData );
00385 
00386 
00400 OTF2_ErrorCode
00401 OTF2_Archive_SetCollectiveCallbacks( OTF2_Archive*                   archive,
00402                                      const OTF2_CollectiveCallbacks* collectiveCallbacks,
00403                                      void*                           collectiveData,
00404                                      OTF2_CollectiveContext*         globalCommContext,
00405                                      OTF2_CollectiveContext*         localCommContext );
00406 
00407 
00415 OTF2_ErrorCode
00416 OTF2_Archive_SetSerialCollectiveCallbacks( OTF2_Archive* archive );
00417 
00418 
00438 OTF2_ErrorCode
00439 OTF2_Archive_SetLockingCallbacks( OTF2_Archive*                archive,
00440                                   const OTF2_LockingCallbacks* lockingCallbacks,
00441                                   void*                        lockingData );
00442 
00443 
00469 OTF2_ErrorCode
00470 OTF2_Archive_SetHint( OTF2_Archive* archive,
00471                       OTF2_Hint     hint,
00472                       void*         value );
00473 
00474 
00499 OTF2_ErrorCode
00500 OTF2_Archive_SetProperty( OTF2_Archive* archive,
00501                           const char*   name,
00502                           const char*   value,
00503                           bool          overwrite );
00504 
00505 
00527 OTF2_ErrorCode
00528 OTF2_Archive_SetBoolProperty( OTF2_Archive* archive,
00529                               const char*   name,
00530                               bool          value,
00531                               bool          overwrite );
00532 
00533 
00544 OTF2_ErrorCode
00545 OTF2_Archive_GetPropertyNames( OTF2_Archive* archive,
00546                                uint32_t*     numberOfProperties,
00547                                char***       names );
00548 
00549 
00563 OTF2_ErrorCode
00564 OTF2_Archive_GetProperty( OTF2_Archive* archive,
00565                           const char*   name,
00566                           char**        value );
00567 
00568 
00579 OTF2_ErrorCode
00580 OTF2_Archive_GetTraceId( OTF2_Archive* archive,
00581                          uint64_t*     id );
00582 
00583 
00591 OTF2_ErrorCode
00592 OTF2_Archive_GetNumberOfLocations( OTF2_Archive* archive,
00593                                    uint64_t*     numberOfLocations );
00594 
00595 
00603 OTF2_ErrorCode
00604 OTF2_Archive_GetNumberOfGlobalDefinitions( OTF2_Archive* archive,
00605                                            uint64_t*     numberOfDefinitions );
00606 
00607 
00615 OTF2_ErrorCode
00616 OTF2_Archive_GetMachineName( OTF2_Archive* archive,
00617                              char**        machineName );
00618 
00619 
00627 OTF2_ErrorCode
00628 OTF2_Archive_GetDescription( OTF2_Archive* archive,
00629                              char**        description );
00630 
00631 
00639 OTF2_ErrorCode
00640 OTF2_Archive_GetCreator( OTF2_Archive* archive,
00641                          char**        creator );
00642 
00643 
00653 OTF2_ErrorCode
00654 OTF2_Archive_GetVersion( OTF2_Archive* archive,
00655                          uint8_t*      major,
00656                          uint8_t*      minor,
00657                          uint8_t*      bugfix );
00658 
00659 
00668 OTF2_ErrorCode
00669 OTF2_Archive_GetChunkSize( OTF2_Archive* archive,
00670                            uint64_t*     chunkSizeEvents,
00671                            uint64_t*     chunkSizeDefs );
00672 
00673 
00681 OTF2_ErrorCode
00682 OTF2_Archive_GetFileSubstrate( OTF2_Archive*       archive,
00683                                OTF2_FileSubstrate* substrate );
00684 
00685 
00693 OTF2_ErrorCode
00694 OTF2_Archive_GetCompression( OTF2_Archive*     archive,
00695                              OTF2_Compression* compression );
00696 
00697 
00706 OTF2_EvtWriter*
00707 OTF2_Archive_GetEvtWriter( OTF2_Archive*    archive,
00708                            OTF2_LocationRef location );
00709 
00710 
00719 OTF2_DefWriter*
00720 OTF2_Archive_GetDefWriter( OTF2_Archive*    archive,
00721                            OTF2_LocationRef location );
00722 
00723 
00731 OTF2_GlobalDefWriter*
00732 OTF2_Archive_GetGlobalDefWriter( OTF2_Archive* archive );
00733 
00734 
00745 OTF2_SnapWriter*
00746 OTF2_Archive_GetSnapWriter( OTF2_Archive*    archive,
00747                             OTF2_LocationRef location );
00748 
00749 
00767 OTF2_ThumbWriter*
00768 OTF2_Archive_GetThumbWriter( OTF2_Archive*      archive,
00769                              const char*        name,
00770                              const char*        description,
00771                              OTF2_ThumbnailType type,
00772                              uint32_t           numberOfSamples,
00773                              uint32_t           numberOfMetrics,
00774                              const uint64_t*    refsToDefs );
00775 
00776 
00786 OTF2_MarkerWriter*
00787 OTF2_Archive_GetMarkerWriter( OTF2_Archive* archive );
00788 
00789 
00798 OTF2_EvtReader*
00799 OTF2_Archive_GetEvtReader( OTF2_Archive*    archive,
00800                            OTF2_LocationRef location );
00801 
00802 
00810 OTF2_GlobalEvtReader*
00811 OTF2_Archive_GetGlobalEvtReader( OTF2_Archive* archive );
00812 
00813 
00822 OTF2_DefReader*
00823 OTF2_Archive_GetDefReader( OTF2_Archive*    archive,
00824                            OTF2_LocationRef location );
00825 
00826 
00836 OTF2_GlobalDefReader*
00837 OTF2_Archive_GetGlobalDefReader( OTF2_Archive* archive );
00838 
00839 
00850 OTF2_SnapReader*
00851 OTF2_Archive_GetSnapReader( OTF2_Archive*    archive,
00852                             OTF2_LocationRef location );
00853 
00854 
00864 OTF2_GlobalSnapReader*
00865 OTF2_Archive_GetGlobalSnapReader( OTF2_Archive* archive );
00866 
00867 
00878 OTF2_ThumbReader*
00879 OTF2_Archive_GetThumbReader( OTF2_Archive* archive,
00880                              uint32_t      number );
00881 
00882 
00892 OTF2_MarkerReader*
00893 OTF2_Archive_GetMarkerReader( OTF2_Archive* archive );
00894 
00895 
00903 OTF2_ErrorCode
00904 OTF2_Archive_CloseEvtWriter( OTF2_Archive*   archive,
00905                              OTF2_EvtWriter* writer );
00906 
00907 
00915 OTF2_ErrorCode
00916 OTF2_Archive_CloseDefWriter( OTF2_Archive*   archive,
00917                              OTF2_DefWriter* writer );
00918 
00919 
00929 OTF2_ErrorCode
00930 OTF2_Archive_CloseMarkerWriter( OTF2_Archive*      archive,
00931                                 OTF2_MarkerWriter* writer );
00932 
00933 
00943 OTF2_ErrorCode
00944 OTF2_Archive_CloseSnapWriter( OTF2_Archive*    archive,
00945                               OTF2_SnapWriter* writer );
00946 
00947 
00963 OTF2_ErrorCode
00964 OTF2_Archive_CloseGlobalDefWriter( OTF2_Archive*         archive,
00965                                    OTF2_GlobalDefWriter* writer );
00966 
00967 
00975 OTF2_ErrorCode
00976 OTF2_Archive_CloseEvtReader( OTF2_Archive*   archive,
00977                              OTF2_EvtReader* reader );
00978 
00979 
00989 OTF2_ErrorCode
00990 OTF2_Archive_CloseThumbReader( OTF2_Archive*     archive,
00991                                OTF2_ThumbReader* reader );
00992 
00993 
01003 OTF2_ErrorCode
01004 OTF2_Archive_CloseGlobalEvtReader( OTF2_Archive*         archive,
01005                                    OTF2_GlobalEvtReader* globalEvtReader );
01006 
01007 
01015 OTF2_ErrorCode
01016 OTF2_Archive_CloseDefReader( OTF2_Archive*   archive,
01017                              OTF2_DefReader* reader );
01018 
01019 
01027 OTF2_ErrorCode
01028 OTF2_Archive_CloseGlobalDefReader( OTF2_Archive*         archive,
01029                                    OTF2_GlobalDefReader* globalDefReader );
01030 
01031 
01041 OTF2_ErrorCode
01042 OTF2_Archive_CloseSnapReader( OTF2_Archive*    archive,
01043                               OTF2_SnapReader* reader );
01044 
01045 
01056 OTF2_ErrorCode
01057 OTF2_Archive_CloseGlobalSnapReader( OTF2_Archive*          archive,
01058                                     OTF2_GlobalSnapReader* globalSnapReader );
01059 
01060 
01070 OTF2_ErrorCode
01071 OTF2_Archive_CloseMarkerReader( OTF2_Archive*      archive,
01072                                 OTF2_MarkerReader* markerReader );
01073 
01074 
01085 OTF2_ErrorCode
01086 OTF2_Archive_GetNumberOfThumbnails( OTF2_Archive* archive,
01087                                     uint32_t*     number );
01088 
01089 
01100 OTF2_ErrorCode
01101 OTF2_Archive_SetNumberOfSnapshots( OTF2_Archive* archive,
01102                                    uint32_t      number );
01103 
01104 
01115 OTF2_ErrorCode
01116 OTF2_Archive_GetNumberOfSnapshots( OTF2_Archive* archive,
01117                                    uint32_t*     number );
01118 
01119 
01131 OTF2_ErrorCode
01132 OTF2_Archive_OpenEvtFiles( OTF2_Archive* archive );
01133 
01134 
01146 OTF2_ErrorCode
01147 OTF2_Archive_CloseEvtFiles( OTF2_Archive* archive );
01148 
01149 
01161 OTF2_ErrorCode
01162 OTF2_Archive_OpenDefFiles( OTF2_Archive* archive );
01163 
01164 
01176 OTF2_ErrorCode
01177 OTF2_Archive_CloseDefFiles( OTF2_Archive* archive );
01178 
01179 
01191 OTF2_ErrorCode
01192 OTF2_Archive_OpenSnapFiles( OTF2_Archive* archive );
01193 
01194 
01206 OTF2_ErrorCode
01207 OTF2_Archive_CloseSnapFiles( OTF2_Archive* archive );
01208 
01209 
01220 OTF2_ErrorCode
01221 OTF2_Archive_SelectLocation( OTF2_Archive*    archive,
01222                              OTF2_LocationRef location );
01223 
01224 
01225 #ifdef __cplusplus
01226 }
01227 #endif /* __cplusplus */
01228 
01229 
01230 #endif /* !OTF2_ARCHIVE_H */