OpenMPI  0.1.1
OTF_WStream.h
Go to the documentation of this file.
1 /*
2  This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2012.
3  Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch
4 */
5 
6 /**
7  * @file OTF_WStream.h
8  *
9  * @brief Provides write access to trace streams, which consist of multiple
10  * buffers.
11  *
12  * \ingroup wstream
13  */
14 
15 /** \defgroup wstream Stream Writer Interface
16  *
17  * This interface provides functions for writing trace at stream level.
18  * A stream is part of a trace and consists of up to four buffers
19  * (event buffer, definition buffer, snapshots buffer, statistics buffer).
20  *
21  * wstream is structured similarly to writer.
22  *
23  * Use this interface, if you want to a specific stream and the writer
24  * interface does not provide the desired access.
25  *
26  * \section wstream_example A short Example
27  *
28  * \code
29  * #include <assert.h>
30  * #include "otf.h"
31  *
32  * int main( int argc, char** argv ) {
33  * \endcode
34  *
35  * Declare a file manager and a writer.
36  * \code
37  * OTF_FileManager* manager;
38  * OTF_WStream* wstream;
39  * \endcode
40  *
41  * Initialize the file manager. Open at most 100 OS files.
42  * \code
43  * manager= OTF_FileManager_open( 100 );
44  * assert( manager );
45  * \endcode
46  *
47  * Initialize the wstream object. Open file "test", writing the first stream.
48  * \code
49  * wstream = OTF_WStream_open( "test", 0, manager );
50  * assert( wstream );
51  * \endcode
52  *
53  * Write some definition records.
54  * \code
55  * OTF_WStream_writeDefTimerResolution( wstream, 1000 );
56  * OTF_WStream_writeDefProcess( wstream, 1, "proc one", 0 );
57  * \endcode
58  *
59  * Clean up before exiting the program.
60  * \code
61  * OTF_WStream_close( wstream );
62  * OTF_FileManager_close( manager );
63  *
64  * return 0;
65  * }
66  * \endcode
67  *
68  * Compile this using $ gcc -o test test.c `otfconfig --libs`.
69  *
70  * When executing this program it only writes one file (test.0.def),
71  * containg the written records.
72  *
73  */
74 
75 #ifndef OTF_WSTREAM_H
76 #define OTF_WSTREAM_H
77 
78 
79 #include <stdlib.h>
80 
81 
82 #include "OTF_inttypes.h"
83 
84 
85 #include "OTF_Definitions.h"
86 #include "OTF_FileManager.h"
87 #include "OTF_WBuffer.h"
88 #include "OTF_Filenames.h"
89 
90 
91 #ifdef __cplusplus
92 extern "C" {
93 #endif /* __cplusplus */
94 
96 
97 
98  /** name stub: all files will begin with this name */
99  char* namestub;
100 
101  /** Unique id for the current stream. */
102  uint32_t id;
103 
104  /** State wether to use long or short format,
105  see OTF_WSTREAM_FORMAT_XXX macros above. */
106  uint32_t format;
107 
108 
109  /** Definitions buffer. Definitions buffer carries definition
110  records. */
112 
113  /** Event buffer. The event buffer carries records for actual
114  events, i.e. records with a time stamp */
116 
117  /** Snaps (snapshots) buffer. The snapshots buffer carries
118  snapshots of the whole state at a point in time - as oppossed to
119  events which only show changes in the state. This can be used to
120  start from such a snapshot instead of from the very begining. */
122 
123  /** Statistics buffer. Statistics buffer carries statistical
124  information information about a certain time interval resp.
125  data at points of time that allow to derive statistics without
126  reading through all events of that interval. */
128 
129  /** Marker buffer. Marker buffer carries marker definitions and spots
130  which live in a separate file and wich are not sorted according to time stamp
131  in any way. */
133 
134  /** Default compression method for all buffers managed by this stream */
135  OTF_FileCompression compression;
136 
137  /** Default size of buffers managed by this WStream. */
138  uint32_t buffersizes;
139 
140 #ifdef HAVE_ZLIB
141  /** Default size of zbuffers managed by this RStream. */
142  uint32_t zbuffersizes;
143 #endif /* HAVE_ZLIB */
144 
145  /** file handle manager */
147 };
148 /** wstream object \ingroup wstream */
150 
151 
152 /**
153  * Create a new OTF_WStream instance.
154  *
155  * @param namestub File name prefix which is going to be used by
156  * all sub-files which belong to the writer stream.
157  * @param id Abitrary but unique identifier of the writer stream.
158  Must be > '0' for real streams. Use '0' for global definitions.
159  * @param manager File handle manager.
160  *
161  * @return Initialized OTF_WStream instance or 0 if an error
162  * occurred.
163  *
164  * \ingroup wstream
165  */
166 OTF_WStream* OTF_WStream_open( const char* namestub, uint32_t id,
168 
169 
170 /**
171  * Close an OTF_WStream instance and all its related files.
172  *
173  * @param wstream Pointer to an initialized OTF_WStream object. See
174  * also OTF_WStream_open().
175  *
176  * @return 1 if instance was closed successfully and 0 otherwise.
177  *
178  * \ingroup wstream
179  */
180 int OTF_WStream_close( OTF_WStream* wstream );
181 
182 
183 /**
184  * Flush an OTF_WStream instance, i.e. flush all associated buffers if existing.
185  *
186  * @param wstream Pointer to an initialized OTF_WStream object. See
187  * also OTF_WStream_open().
188  *
189  * @return 1 if everything flushed successfully and 0 otherwise.
190  *
191  * \ingroup wstream
192  */
193 int OTF_WStream_flush( OTF_WStream* wstream );
194 
195 
196 /**
197  * Returns the definition buffer of the according writer stream.
198  *
199  * @param wstream Pointer to an initialized OTF_WStream object. See
200  * also OTF_WStream_open().
201  *
202  * @return Initialized OTF_WBuffer instance or 0 if an error occured.
203  *
204  * \ingroup wstream
205  */
207 
208 
209 /**
210  * Returns the event buffer of the according writer stream.
211  *
212  * @param wstream Pointer to an initialized OTF_WStream object. See
213  * also OTF_WStream_open().
214  *
215  * @return Initialized OTF_WBuffer instance or 0 if an error occured.
216  *
217  * \ingroup wstream
218  */
220 
221 
222 /**
223  * Returns the snapshots buffer of the according writer stream.
224  *
225  * @param wstream Pointer to an initialized OTF_WStream object. See
226  * also OTF_WStream_open().
227  *
228  * @return Initialized OTF_WBuffer instance or 0 if an error occured.
229  *
230  * \ingroup wstream
231  */
233 
234 
235 /**
236  * Returns the statistics buffer of the according writer stream.
237  *
238  * @param wstream Pointer to an initialized OTF_WStream object. See
239  * also OTF_WStream_open().
240  *
241  * @return Initialized OTF_WBuffer instance or 0 if an error occured.
242  *
243  * \ingroup wstream
244  */
246 
247 
248 /**
249  * Returns the marker buffer of the according writer stream.
250  *
251  * @param wstream Pointer to an initialized OTF_WStream object. See
252  * also OTF_WStream_open().
253  *
254  * @return Initialized OTF_WBuffer instance or 0 if an error occured.
255  *
256  * \ingroup wstream
257  */
259 
260 
261 /**
262  * Set the standard compression method for all buffers managed by this writer
263  * stream
264  *
265  * @param wstream Pointer to an initialized OTF_WStream object. See
266  * also OTF_WStream_open().
267  *
268  * @param compression Default compression level.
269  * 0-9, where 0 means no compression is applied, and 9 is
270  * the highest level of compression.
271  *
272  * @return 1 on success, 0 if an error occurs.
273  *
274  * \ingroup wstream
275  */
276 int OTF_WStream_setCompression( OTF_WStream* wstream, OTF_FileCompression
277  compression );
278 
279 
280 /**
281  * Return the standard compression method for all buffers managed by this writer
282  * stream
283  *
284  * @param wstream Pointer to an initialized OTF_WStream object. See
285  * also OTF_WStream_open().
286  *
287  * @return Standard compression level for all buffers managed by
288  * this writer stream.
289  *
290  * \ingroup wstream
291  */
292 OTF_FileCompression OTF_WStream_getCompression( OTF_WStream* wstream );
293 
294 
295 /**
296  * Set the default buffer size for all buffers managed by this writer stream.
297  * This is only effective for future buffers and will not change already
298  * allocated buffers. Those can be changed with the buffers directly.
299  *
300  * @param wstream Pointer to an initialized OTF_WStream object. See
301  * also OTF_WStream_open().
302  *
303  * @param size Intended buffer size.
304  *
305  * \ingroup wstream
306  */
307 void OTF_WStream_setBufferSizes( OTF_WStream* wstream, uint32_t size );
308 
309 /**
310  * Get the default buffer size for all buffers managed by this writer stream.
311  *
312  * @param wstream Pointer to an initialized OTF_WStream object. See
313  * also OTF_WStream_open().
314  *
315  * @return Default buffer size for all buffers managed by this writer
316  * stream.
317  *
318  * \ingroup wstream
319  */
320 uint32_t OTF_WStream_getBufferSizes( OTF_WStream* wstream );
321 
322 /**
323  * Set the default zbuffer size for all files managed by this writer stream.
324  * This is only effective for future files and will not change already
325  * allocated buffers. Those can be changed with the files directly.
326  *
327  * @param wstream Pointer to an initialized OTF_WStream object. See
328  * also OTF_WStream_open().
329  *
330  * @param size Intended buffer size.
331  *
332  * \ingroup wstream
333  */
334 void OTF_WStream_setZBufferSizes( OTF_WStream* wstream, uint32_t size );
335 
336 
337 /**
338  * Get the default zbuffer size for all files managed by this writer stream.
339  *
340  * @param wstream Pointer to an initialized OTF_WStream object. See
341  * also OTF_WStream_open().
342  *
343  * @return Default buffer size for all buffers managed by this reader
344  * stream.
345  *
346  * \ingroup wstream
347  */
348 uint32_t OTF_WStream_getZBufferSizes( OTF_WStream* wstream );
349 
350 /**
351  * Set the default ouput format.
352  *
353  * @param wstream Pointer to an initialized OTF_WStream object. See
354  * also OTF_WStream_open().
355  *
356  * @param format Intended output format (OTF_WSTREAM_FORMAT_{LONG,SHORT})
357  *
358  * \ingroup wstream
359  */
360 void OTF_WStream_setFormat( OTF_WStream* wstream, uint32_t format );
361 
362 /**
363  * Get the default output format
364  *
365  * @param wstream Pointer to an initialized OTF_WStream object. See
366  * also OTF_WStream_open().
367  *
368  * @return Default output format.
369  *
370  * \ingroup wstream
371  */
372 uint32_t OTF_WStream_getFormat( OTF_WStream* wstream );
373 
374 
375 /* *** definition record write handlers *** ******************************** */
376 
377 
378 /** Write a DEFINITIONCOMMENT record to stream 'wstream'.
379  * @see OTF_Writer_writeDefinitionComment()
380  * \ingroup wstream
381  */
383  const char* comment );
384 
385 /** Write a DEFINITIONCOMMENT record including an OTF_KeyValueList to stream 'wstream'.
386  * @see OTF_Writer_writeDefinitionCommentEV()
387  * \ingroup wstream
388  */
390  const char* comment, OTF_KeyValueList* list );
391 
392 
393 /** Write a DEFTIMERRESOLUTION record to stream 'wstream'.
394  * @see OTF_Writer_writeDefTimerResolution()
395  * \ingroup wstream
396  */
398  uint64_t ticksPerSecond );
399 
400 /** Write a DEFTIMERRESOLUTION record including an OTF_KeyValueList to stream 'wstream'.
401  * @see OTF_Writer_writeDefTimerResolutionEV()
402  * \ingroup wstream
403  */
405  uint64_t ticksPerSecond, OTF_KeyValueList* list );
406 
407 /** Write a DEFPROCESS record to stream 'wstream'.
408  * @see OTF_Writer_writeDefProcess()
409  * \ingroup wstream
410  */
411 int OTF_WStream_writeDefProcess( OTF_WStream* wstream, uint32_t deftoken,
412  const char* name, uint32_t parent );
413 
414 /** Write a DEFPROCESS record including an OTF_KeyValueList to stream 'wstream'.
415  * @see OTF_Writer_writeDefProcessKV()
416  * \ingroup wstream
417  */
418 int OTF_WStream_writeDefProcessKV( OTF_WStream* wstream, uint32_t deftoken,
419  const char* name, uint32_t parent, OTF_KeyValueList* list );
420 
421 /** Write a DEFPROCESSGROUP record to stream 'wstream'.
422  * @see OTF_Writer_writeDefProcessGroup()
423  * \ingroup wstream
424  */
425 int OTF_WStream_writeDefProcessGroup( OTF_WStream* wstream, uint32_t deftoken,
426  const char* name, uint32_t n, const uint32_t* array );
427 
428 /** Write a DEFPROCESSGROUP record including an OTF_KeyValueList to stream 'wstream'.
429  * @see OTF_Writer_writeDefProcessGroupKV()
430  * \ingroup wstream
431  */
432 int OTF_WStream_writeDefProcessGroupKV( OTF_WStream* wstream, uint32_t deftoken,
433  const char* name, uint32_t n, const uint32_t* array, OTF_KeyValueList* list );
434 
435 /** Write a DEFATTRLIST record to stream 'wstream'.
436  * @see OTF_Writer_writeDefAttributeList()
437  * \ingroup wstream
438  */
439 int OTF_WStream_writeDefAttributeList( OTF_WStream* wstream, uint32_t attr_token,
440  uint32_t num, OTF_ATTR_TYPE* array );
441 
442 /** Write a DEFATTRLIST record including an OTF_KeyValueList to stream 'wstream'.
443  * @see OTF_Writer_writeDefAttributeListKV()
444  * \ingroup wstream
445  */
446 int OTF_WStream_writeDefAttributeListKV( OTF_WStream* wstream, uint32_t attr_token,
447  uint32_t num, OTF_ATTR_TYPE* array, OTF_KeyValueList* list );
448 
449 /** Write a DEFPROCESSORGROUPATTR record to stream 'wstream'.
450  * @see OTF_Writer_writeDefAttributeList()
451  * \ingroup wstream
452  */
454  uint32_t proc_token, uint32_t attr_token );
455 
456 /** Write a DEFPROCESSORGROUPATTR record including an OTF_KeyValueList to stream 'wstream'.
457  * @see OTF_Writer_writeDefAttributeListKV()
458  * \ingroup wstream
459  */
461  uint32_t proc_token, uint32_t attr_token, OTF_KeyValueList* list );
462 
463 /** Write a DEFFUNCTION record to stream 'wstream'.
464  * @see OTF_Writer_writeDefFunction()
465  * \ingroup wstream
466  */
467 int OTF_WStream_writeDefFunction( OTF_WStream* wstream, uint32_t deftoken,
468  const char* name, uint32_t group, uint32_t scltoken );
469 
470 /** Write a DEFFUNCTION record including an OTF_KeyValueList to stream 'wstream'.
471  * @see OTF_Writer_writeDefFunctionKV()
472  * \ingroup wstream
473  */
474 int OTF_WStream_writeDefFunctionKV( OTF_WStream* wstream, uint32_t deftoken,
475  const char* name, uint32_t group, uint32_t scltoken, OTF_KeyValueList* list );
476 
477 /** Write a DEFFUNCTIONGROUP record to stream 'wstream'.
478  * @see OTF_Writer_writeDefFunctionGroup()
479  * \ingroup wstream
480  */
482  uint32_t deftoken, const char* name );
483 
484 /** Write a DEFFUNCTIONGROUP record including an OTF_KeyValueList to stream 'wstream'.
485  * @see OTF_Writer_writeDefFunctionGroupKV()
486  * \ingroup wstream
487  */
489  uint32_t deftoken, const char* name, OTF_KeyValueList* list );
490 
491 /** Write a DEFCOLLECTIVEOPERATION record to stream 'wstream'.
492  * @see OTF_Writer_writeDefCollectiveOperation()
493  * \ingroup wstream
494  */
496  uint32_t collOp, const char* name, uint32_t type );
497 
498 /** Write a DEFCOLLECTIVEOPERATION record including an OTF_KeyValueList to stream 'wstream'.
499  * @see OTF_Writer_writeDefCollectiveOperationKV()
500  * \ingroup wstream
501  */
503  uint32_t collOp, const char* name, uint32_t type, OTF_KeyValueList* list );
504 
505 /** Write a DEFCOUNTER record to stream 'wstream'.
506  * @see OTF_Writer_writeDefCounter()
507  * \ingroup wstream
508  */
509 int OTF_WStream_writeDefCounter( OTF_WStream* wstream, uint32_t deftoken,
510  const char* name, uint32_t properties, uint32_t countergroup,
511  const char* unit );
512 
513 /** Write a DEFCOUNTER record including an OTF_KeyValueList to stream 'wstream'.
514  * @see OTF_Writer_writeDefCounterKV()
515  * \ingroup wstream
516  */
517 int OTF_WStream_writeDefCounterKV( OTF_WStream* wstream, uint32_t deftoken,
518  const char* name, uint32_t properties, uint32_t countergroup,
519  const char* unit, OTF_KeyValueList* list );
520 
521 /** Write a DEFCOUNTERGROUP record to stream 'wstream'.
522  * @see OTF_Writer_writeDefCounterGroup()
523  * \ingroup wstream
524  */
526  uint32_t deftoken, const char* name );
527 
528 /** Write a DEFCOUNTERGROUP record including an OTF_KeyValueList to stream 'wstream'.
529  * @see OTF_Writer_writeDefCounterGroupKV()
530  * \ingroup wstream
531  */
533  uint32_t deftoken, const char* name, OTF_KeyValueList* list );
534 
535 /** Write a DEFSCL record to stream 'wstream'.
536  * @see OTF_Writer_writeDefScl()
537  * \ingroup wstream
538  */
539 int OTF_WStream_writeDefScl( OTF_WStream* wstream, uint32_t deftoken,
540  uint32_t sclfile, uint32_t sclline );
541 
542 /** Write a DEFSCL record including an OTF_KeyValueList to stream 'wstream'.
543  * @see OTF_Writer_writeDefSclKV()
544  * \ingroup wstream
545  */
546 int OTF_WStream_writeDefSclKV( OTF_WStream* wstream, uint32_t deftoken,
547  uint32_t sclfile, uint32_t sclline, OTF_KeyValueList* list );
548 
549 /** Write a DEFSCLFILE record to stream 'wstream'.
550  * @see OTF_Writer_writeDefSclFile()
551  * \ingroup wstream
552  */
554  uint32_t deftoken, const char* filename );
555 
556 /** Write a DEFSCLFILE record including an OTF_KeyValueList to stream 'wstream'.
557  * @see OTF_Writer_writeDefSclFileKV()
558  * \ingroup wstream
559  */
561  uint32_t deftoken, const char* filename, OTF_KeyValueList* list );
562 
563 /** Write a DEFCREATOR record to stream 'wstream'.
564  * @see OTF_Writer_writeDefCreator()
565  * \ingroup wstream
566  */
567 int OTF_WStream_writeDefCreator( OTF_WStream* wstream, const char* creator );
568 
569 /** Write a DEFCREATOR record including an OTF_KeyValueList to stream 'wstream'.
570  * @see OTF_Writer_writeDefCreatorKV()
571  * \ingroup wstream
572  */
573 int OTF_WStream_writeDefCreatorKV( OTF_WStream* wstream, const char* creator, OTF_KeyValueList* list );
574 
575 /** Write a DEFVERSION record to stream 'wstream'.
576  * @see OTF_Writer_writeOtfVersion()
577  * \ingroup wstream
578  */
580 
581 /** Write a DEFFILE record to stream 'wstream'.
582  * @see OTF_Writer_writeDefFile()
583  * \ingroup wstream
584  */
585 int OTF_WStream_writeDefFile( OTF_WStream* wstream, uint32_t token,
586  const char* name, uint32_t group );
587 
588 /** Write a DEFFILE record including an OTF_KeyValueList to stream 'wstream'.
589  * @see OTF_Writer_writeDefFileKV()
590  * \ingroup wstream
591  */
592 int OTF_WStream_writeDefFileKV( OTF_WStream* wstream, uint32_t token,
593  const char* name, uint32_t group, OTF_KeyValueList* list );
594 
595 /** Write a DEFFILEGROUP record to stream 'wstream'.
596  * @see OTF_Writer_writeDefFileGroup()
597  * \ingroup wstream
598  */
599 int OTF_WStream_writeDefFileGroup( OTF_WStream* wstream, uint32_t token,
600  const char* name );
601 
602 /** Write a DEFFILEGROUP record including an OTF_KeyValueList to stream 'wstream'.
603  * @see OTF_Writer_writeDefFileGroupKV()
604  * \ingroup wstream
605  */
606 int OTF_WStream_writeDefFileGroupKV( OTF_WStream* wstream, uint32_t token,
607  const char* name, OTF_KeyValueList* list );
608 
609 /** Write a DEFKEYVALUE record to stream 'wstream'.
610  * @see OTF_Writer_writeDefKeyValue()
611  * \ingroup wstream
612  */
613 int OTF_WStream_writeDefKeyValue( OTF_WStream* wstream, uint32_t key,
614  OTF_Type type, const char* name, const char *description );
615 
616 /** Write a DEFKEYVALUE record including an OTF_KeyValueList to stream 'wstream'.
617  * @see OTF_Writer_writeDefKeyValueKV()
618  * \ingroup wstream
619  */
620 int OTF_WStream_writeDefKeyValueKV( OTF_WStream* wstream, uint32_t key,
621  OTF_Type type, const char* name, const char *description,
622  OTF_KeyValueList* list );
623 
624 
625 /** Write a DEFTIMERANGE record including an OTF_KeyValueList to
626  * stream 'wstream'.
627  * @see OTF_Writer_writeDefTimeRange()
628  * \ingroup wstream
629  */
630 int OTF_WStream_writeDefTimeRange( OTF_WStream* wstream, uint64_t minTime,
631  uint64_t maxTime, OTF_KeyValueList* list );
632 
633 /** Write a DEFCOUNTERASSIGNMENTS record including an OTF_KeyValueList to
634  * stream 'wstream'.
635  * @see OTF_Writer_writeDefCounterAssignments()
636  * \ingroup wstream
637  */
639  uint32_t counter_token, uint32_t number_of_members,
640  const uint32_t* procs_or_groups, OTF_KeyValueList* list );
641 
642 /** Write a DEFPROCESSSUBTITUTES record including an OTF_KeyValueList to
643  * stream 'wstream'.
644  * @see OTF_Writer_writeDefProcessSubsitutes()
645  * \ingroup wstream
646  */
648  uint32_t representative, uint32_t numberOfProcs, const uint32_t* procs,
649  OTF_KeyValueList* list );
650 
651 
652 /* *** event record write handlers *** ************************************* */
653 
654 
655 /** Write a NOOP record including an OTF_KeyValueList to stream 'wstream'.
656  * @see OTF_Writer_writeNoOpKV()
657  * \ingroup wstream
658  */
659 int OTF_WStream_writeNoOpKV( OTF_WStream* wstream, uint64_t time,
660  uint32_t process, OTF_KeyValueList* list );
661 
662 /** Write a ENTER record to stream 'wstream'.
663  * @see OTF_Writer_writeEnter()
664  * \ingroup wstream
665  */
666 int OTF_WStream_writeEnter( OTF_WStream* wstream, uint64_t time,
667  uint32_t statetoken, uint32_t cpuid, uint32_t scltoken );
668 
669 /** Write a ENTER record including an OTF_KeyValueList to stream 'wstream'.
670  * @see OTF_Writer_writeEnterKV()
671  * \ingroup wstream
672  */
673 int OTF_WStream_writeEnterKV( OTF_WStream* wstream, uint64_t time,
674  uint32_t statetoken, uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList* list );
675 
676 /** Write a RECEIVE record to stream 'wstream'.
677  * @see OTF_Writer_writeRecvMsg()
678  * \ingroup wstream
679  */
680 int OTF_WStream_writeRecvMsg( OTF_WStream* wstream, uint64_t time,
681  uint32_t receiver, uint32_t sender, uint32_t communicator,
682  uint32_t msgtype, uint32_t msglength, uint32_t scltoken );
683 
684 /** Write a RECEIVE record including an OTF_KeyValueList to stream 'wstream'.
685  * @see OTF_Writer_writeRecvMsgKV()
686  * \ingroup wstream
687  */
688 int OTF_WStream_writeRecvMsgKV( OTF_WStream* wstream, uint64_t time,
689  uint32_t receiver, uint32_t sender, uint32_t communicator,
690  uint32_t msgtype, uint32_t msglength, uint32_t scltoken, OTF_KeyValueList* list );
691 
692 /** Write a SEND record to stream 'wstream'.
693  * @see OTF_Writer_writeSendMsg()
694  * \ingroup wstream
695  */
696 int OTF_WStream_writeSendMsg( OTF_WStream* wstream, uint64_t time,
697  uint32_t sender, uint32_t receiver, uint32_t communicator,
698  uint32_t msgtype, uint32_t msglength, uint32_t scltoken );
699 
700 /** Write a SEND record including an OTF_KeyValueList to stream 'wstream'.
701  * @see OTF_Writer_writeSendMsgKV()
702  * \ingroup wstream
703  */
704 int OTF_WStream_writeSendMsgKV( OTF_WStream* wstream, uint64_t time,
705  uint32_t sender, uint32_t receiver, uint32_t communicator,
706  uint32_t msgtype, uint32_t msglength, uint32_t scltoken, OTF_KeyValueList* list );
707 
708 /** Write a LEAVE record to stream 'wstream'.
709  * @see OTF_Writer_writeLeave()
710  * \ingroup wstream
711  */
712 int OTF_WStream_writeLeave( OTF_WStream* wstream, uint64_t time,
713  uint32_t statetoken, uint32_t cpuid, uint32_t scltoken );
714 
715 /** Write a LEAVE record including an OTF_KeyValueList to stream 'wstream'.
716  * @see OTF_Writer_writeLeaveKV()
717  * \ingroup wstream
718  */
719 int OTF_WStream_writeLeaveKV( OTF_WStream* wstream, uint64_t time,
720  uint32_t statetoken, uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList* list );
721 
722 /** Write a COUNTER record to stream 'wstream'.
723  * @see OTF_Writer_writeCounter()
724  * \ingroup wstream
725  */
726 int OTF_WStream_writeCounter( OTF_WStream* wstream, uint64_t time,
727  uint32_t process, uint32_t counter_token, uint64_t value );
728 
729 /** Write a COUNTER record including an OTF_KeyValueList to stream 'wstream'.
730  * @see OTF_Writer_writeCounterKV()
731  * \ingroup wstream
732  */
733 int OTF_WStream_writeCounterKV( OTF_WStream* wstream, uint64_t time,
734  uint32_t process, uint32_t counter_token, uint64_t value, OTF_KeyValueList* list );
735 
736 /** Write a COLLOP record to stream 'wstream'.
737  * @deprecated This event record has been deprecated due to usage constraints.
738  * Please use OTF_WStream_writeBeginCollectiveOperation() and
739  * OTF_WStream_writeEndCollectiveOperation(), repectively.
740  * \ingroup wstream */
741 int OTF_WStream_writeCollectiveOperation( OTF_WStream* wstream, uint64_t time,
742  uint32_t process, uint32_t functionToken, uint32_t communicator,
743  uint32_t rootprocess, uint32_t sent, uint32_t received,
744  uint64_t duration, uint32_t scltoken );
745 
746 /** Write a COLLOP record including an OTF_KeyValueList to stream 'wstream'.
747  * @deprecated This event record has been deprecated due to usage constraints.
748  * Please use OTF_WStream_writeBeginCollectiveOperationKV() and
749  * OTF_WStream_writeEndCollectiveOperationKV(), repectively.
750  * \ingroup wstream */
751 int OTF_WStream_writeCollectiveOperationKV( OTF_WStream* wstream, uint64_t time,
752  uint32_t process, uint32_t functionToken, uint32_t communicator,
753  uint32_t rootprocess, uint32_t sent, uint32_t received,
754  uint64_t duration, uint32_t scltoken, OTF_KeyValueList* list );
755 
756 /** Write a COLLOPBEGIN record to stream 'wstream'.
757  * @see OTF_Writer_writeBeginCollectiveOperation()
758  * \ingroup wstream
759  */
761  uint64_t time, uint32_t process, uint32_t collOp,
762  uint64_t matchingId, uint32_t procGroup, uint32_t rootProc,
763  uint64_t sent, uint64_t received, uint32_t scltoken );
764 
765 /** Write a COLLOPBEGIN record including an OTF_KeyValueList to stream 'wstream'.
766  * @see OTF_Writer_writeBeginCollectiveOperationKV()
767  * \ingroup wstream
768  */
770  uint64_t time, uint32_t process, uint32_t collOp,
771  uint64_t matchingId, uint32_t procGroup, uint32_t rootProc,
772  uint64_t sent, uint64_t received, uint32_t scltoken, OTF_KeyValueList* list );
773 
774 /** Write a COLLOPEND record to stream 'wstream'.
775  * @see OTF_Writer_writeEndCollectiveOperation()
776  * \ingroup wstream
777  */
779  uint64_t time, uint32_t process, uint64_t matchingId );
780 
781 /** Write a COLLOPEND record including an OTF_KeyValueList to stream 'wstream'.
782  * @see OTF_Writer_writeEndCollectiveOperationKV()
783  * \ingroup wstream
784  */
786  uint64_t time, uint32_t process, uint64_t matchingId, OTF_KeyValueList* list );
787 
788 /** Write a #EVTCOMMENT record to stream 'wstream'.
789  * @see OTF_Writer_writeEventComment()
790  * \ingroup wstream
791  */
792 int OTF_WStream_writeEventComment( OTF_WStream* wstream, uint64_t time,
793  uint32_t process, const char* comment );
794 
795 /** Write a #EVTCOMMENT record including an OTF_KeyValueList to stream 'wstream'.
796  * @see OTF_Writer_writeEventCommentKV()
797  * \ingroup wstream
798  */
799 int OTF_WStream_writeEventCommentKV( OTF_WStream* wstream, uint64_t time,
800  uint32_t process, const char* comment, OTF_KeyValueList* list );
801 
802 /** Write a PROCESSBEGIN record to stream 'wstream'.
803  * @see OTF_Writer_writeBeginProcess()
804  * \ingroup wstream
805  */
806 int OTF_WStream_writeBeginProcess( OTF_WStream* wstream, uint64_t time,
807  uint32_t process );
808 
809 /** Write a PROCESSBEGIN record including an OTF_KeyValueList to stream 'wstream'.
810  * @see OTF_Writer_writeBeginProcessKV()
811  * \ingroup wstream
812  */
813 int OTF_WStream_writeBeginProcessKV( OTF_WStream* wstream, uint64_t time,
814  uint32_t process, OTF_KeyValueList* list );
815 
816 /** Write a PROCESSEND record to stream 'wstream'.
817  * @see OTF_Writer_writeEndProcess()
818  * \ingroup wstream
819  */
820 int OTF_WStream_writeEndProcess( OTF_WStream* wstream, uint64_t time,
821  uint32_t process );
822 
823 /** Write a PROCESSEND record including an OTF_KeyValueList to stream 'wstream'.
824  * @see OTF_Writer_writeEndProcessKV()
825  * \ingroup wstream
826  */
827 int OTF_WStream_writeEndProcessKV( OTF_WStream* wstream, uint64_t time,
828  uint32_t process, OTF_KeyValueList* list );
829 
830 /** Write a FILEOP record to stream 'wstream'.
831  * @deprecated This event record has been deprecated due to usage constraints.
832  * Please use OTF_WStream_writeBeginFileOperation() and
833  * OTF_WStream_writeEndFileOperation(), respectively.
834  * \ingroup wstream */
835 int OTF_WStream_writeFileOperation( OTF_WStream* wstream, uint64_t time,
836  uint32_t fileid, uint32_t process, uint64_t handleid, uint32_t operation,
837  uint64_t bytes, uint64_t duration, uint32_t source );
838 
839 /** Write a FILEOP record including an OTF_KeyValueList to stream 'wstream'.
840  * @deprecated This event record has been deprecated due to usage constraints.
841  * Please use OTF_WStream_writeBeginFileOperationKV() and
842  * OTF_WStream_writeEndFileOperationKV(), respectively.
843  * \ingroup wstream */
844 int OTF_WStream_writeFileOperationKV( OTF_WStream* wstream, uint64_t time,
845  uint32_t fileid, uint32_t process, uint64_t handleid, uint32_t operation,
846  uint64_t bytes, uint64_t duration, uint32_t source, OTF_KeyValueList* list );
847 
848 /** Write a FILEOPBEGIN record to stream 'wstream'.
849  * @see OTF_Writer_writeBeginFileOperation()
850  * \ingroup wstream
851  */
852 int OTF_WStream_writeBeginFileOperation( OTF_WStream* wstream, uint64_t time,
853  uint32_t process, uint64_t matchingId, uint32_t scltoken );
854 
855 /** Write a FILEOPBEGIN record including an OTF_KeyValueList to stream 'wstream'.
856  * @see OTF_Writer_writeBeginFileOperationKV()
857  * \ingroup wstream
858  */
859 int OTF_WStream_writeBeginFileOperationKV( OTF_WStream* wstream, uint64_t time,
860  uint32_t process, uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList* list );
861 
862 /** Write a FILEOPEND record to stream 'wstream'.
863  * @see OTF_Writer_writeEndFileOperation()
864  * \ingroup wstream
865  */
866 int OTF_WStream_writeEndFileOperation( OTF_WStream* wstream, uint64_t time,
867  uint32_t process, uint32_t fileid, uint64_t matchingId,
868  uint64_t handleId, uint32_t operation, uint64_t bytes,
869  uint32_t scltoken );
870 
871 /** Write a FILEOPEND record including an OTF_KeyValueList to stream 'wstream'.
872  * @see OTF_Writer_writeEndFileOperationKV()
873  * \ingroup wstream
874  */
875 int OTF_WStream_writeEndFileOperationKV( OTF_WStream* wstream, uint64_t time,
876  uint32_t process, uint32_t fileid, uint64_t matchingId,
877  uint64_t handleId, uint32_t operation, uint64_t bytes,
878  uint32_t scltoken, OTF_KeyValueList* list );
879 
880 /** Write a RMAPUT record to stream 'wstream'.
881  * @see OTF_Writer_writeRMAPut()
882  * \ingroup wstream
883  */
884 int OTF_WStream_writeRMAPut( OTF_WStream* wstream, uint64_t time,
885  uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator,
886  uint32_t tag, uint64_t bytes, uint32_t scltoken );
887 
888 /** Write a RMAPUT record including an OTF_KeyValueList to stream 'wstream'.
889  * @see OTF_Writer_writeRMAPutKV()
890  * \ingroup wstream
891  */
892 int OTF_WStream_writeRMAPutKV( OTF_WStream* wstream, uint64_t time,
893  uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator,
894  uint32_t tag, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* list );
895 
896 /** Write a RMAPUTRE record to stream 'wstream'.
897  * @see OTF_Writer_writeRMAPutRemoteEnd()
898  * \ingroup wstream
899  */
900 int OTF_WStream_writeRMAPutRemoteEnd( OTF_WStream* wstream, uint64_t time,
901  uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator,
902  uint32_t tag, uint64_t bytes, uint32_t scltoken );
903 
904 /** Write a RMAPUTRE record including an OTF_KeyValueList to stream 'wstream'.
905  * @see OTF_Writer_writeRMAPutRemoteEndKV()
906  * \ingroup wstream
907  */
908 int OTF_WStream_writeRMAPutRemoteEndKV( OTF_WStream* wstream, uint64_t time,
909  uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator,
910  uint32_t tag, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* list );
911 
912 /** Write a RMAGET record to stream 'wstream'.
913  * @see OTF_Writer_writeRMAGet()
914  * \ingroup wstream
915  */
916 int OTF_WStream_writeRMAGet( OTF_WStream* wstream, uint64_t time,
917  uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator,
918  uint32_t tag, uint64_t bytes, uint32_t scltoken );
919 
920 /** Write a RMAGET record including an OTF_KeyValueList to stream 'wstream'.
921  * @see OTF_Writer_writeRMAGetKV()
922  * \ingroup wstream
923  */
924 int OTF_WStream_writeRMAGetKV( OTF_WStream* wstream, uint64_t time,
925  uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator,
926  uint32_t tag, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* list );
927 
928 /** Write a RMAEND record to stream 'wstream'.
929  * @see OTF_Writer_writeRMAEnd()
930  * \ingroup wstream
931  */
932 int OTF_WStream_writeRMAEnd( OTF_WStream* wstream, uint64_t time,
933  uint32_t process, uint32_t remote, uint32_t communicator, uint32_t tag,
934  uint32_t scltoken );
935 
936 /** Write a RMAEND record including an OTF_KeyValueList to stream 'wstream'.
937  * @see OTF_Writer_writeRMAEndKV()
938  * \ingroup wstream
939  */
940 int OTF_WStream_writeRMAEndKV( OTF_WStream* wstream, uint64_t time,
941  uint32_t process, uint32_t remote, uint32_t communicator, uint32_t tag,
942  uint32_t scltoken, OTF_KeyValueList* list );
943 
944 
945 /* *** public snapshot record write handlers *** */
946 
947 
948 /** Write a #TCOMMENT record to stream 'wstream'.
949  * @see OTF_Writer_writeSnapshotComment()
950  * \ingroup wstream
951  */
952 int OTF_WStream_writeSnapshotComment( OTF_WStream* wstream, uint64_t time,
953  uint32_t process, const char* comment );
954 
955 /** Write a #TCOMMENT record including an OTF_KeyValueList to stream 'wstream'.
956  * @see OTF_Writer_writeSnapshotCommentKV()
957  * \ingroup wstream
958  */
959 int OTF_WStream_writeSnapshotCommentKV( OTF_WStream* wstream, uint64_t time,
960  uint32_t process, const char* comment, OTF_KeyValueList* list );
961 
962 /** Write a TENTER record to stream 'wstream'.
963  * @see OTF_Writer_writeEnterSnapshot()
964  * \ingroup wstream
965  */
966 int OTF_WStream_writeEnterSnapshot( OTF_WStream* wstream, uint64_t time,
967  uint64_t originaltime, uint32_t statetoken, uint32_t cpuid, uint32_t scltoken );
968 
969 /** Write a TENTER record including an OTF_KeyValueList to stream 'wstream'.
970  * @see OTF_Writer_writeEnterSnapshotKV()
971  * \ingroup wstream
972  */
973 int OTF_WStream_writeEnterSnapshotKV( OTF_WStream* wstream, uint64_t time,
974  uint64_t originaltime, uint32_t statetoken, uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList* list );
975 
976 /** Write a TSEND record to stream 'wstream'.
977  * @see OTF_Writer_writeSendSnapshot()
978  * \ingroup wstream
979  */
980 int OTF_WStream_writeSendSnapshot( OTF_WStream* wstream, uint64_t time,
981  uint64_t originaltime, uint32_t sender, uint32_t receiver,
982  uint32_t procGroup, uint32_t type, uint32_t length, uint32_t source );
983 
984 /** Write a TSEND record including an OTF_KeyValueList to stream 'wstream'.
985  * @see OTF_Writer_writeSendSnapshotKV()
986  * \ingroup wstream
987  */
988 int OTF_WStream_writeSendSnapshotKV( OTF_WStream* wstream, uint64_t time,
989  uint64_t originaltime, uint32_t sender, uint32_t receiver,
990  uint32_t procGroup, uint32_t type, uint32_t length,
991  uint32_t source, OTF_KeyValueList* list );
992 
993 /** Write a TOPENFILE record to stream 'wstream'.
994  * @see OTF_Writer_writeOpenFileSnapshot()
995  * \ingroup wstream
996  */
997 int OTF_WStream_writeOpenFileSnapshot( OTF_WStream* wstream,uint64_t time,
998  uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid,
999  uint32_t source );
1000 
1001 /** Write a TOPENFILE record including an OTF_KeyValueList to stream 'wstream'.
1002  * @see OTF_Writer_writeOpenFileSnapshotKV()
1003  * \ingroup wstream
1004  */
1005 int OTF_WStream_writeOpenFileSnapshotKV( OTF_WStream* wstream,uint64_t time,
1006  uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid,
1007  uint32_t source, OTF_KeyValueList* list );
1008 
1009 
1010 /** Write a TBEGINCOLLOP record to stream 'wstream'.
1011  * @see OTF_Writer_writeBeginCollopSnapshot()
1012  * \ingroup wstream
1013  */
1014 int OTF_WStream_writeBeginCollopSnapshot( OTF_WStream* wstream, uint64_t time,
1015  uint64_t originaltime, uint32_t process, uint32_t collOp, uint64_t matchingId,
1016  uint32_t procGroup, uint32_t rootProc, uint64_t sent, uint64_t received,
1017  uint32_t scltoken );
1018 
1019 
1020 /** Write a TBEGINCOLLOP record including an OTF_KeyValueList to stream 'wstream'.
1021  * @see OTF_Writer_writeBeginCollopSnapshotKV()
1022  * \ingroup wstream
1023  */
1024 int OTF_WStream_writeBeginCollopSnapshotKV( OTF_WStream* wstream, uint64_t time,
1025  uint64_t originaltime, uint32_t process, uint32_t collOp, uint64_t matchingId,
1026  uint32_t procGroup, uint32_t rootProc, uint64_t sent, uint64_t received,
1027  uint32_t scltoken, OTF_KeyValueList *list );
1028 
1029 
1030 /** Write a TBEGINFILEOP record to stream 'wstream'.
1031  * @see OTF_Writer_writeBeginFileOpSnapshot()
1032  * \ingroup wstream
1033  */
1034 int OTF_WStream_writeBeginFileOpSnapshot( OTF_WStream* wstream, uint64_t time,
1035  uint64_t originaltime, uint32_t process, uint64_t matchingId, uint32_t scltoken );
1036 
1037 /** Write a TBEGINFILEOP record including an OTF_KeyValueList to stream 'wstream'.
1038  * @see OTF_Writer_writeBeginFileOpSnapshotKV()
1039  * \ingroup wstream
1040  */
1041 int OTF_WStream_writeBeginFileOpSnapshotKV( OTF_WStream* wstream, uint64_t time,
1042  uint64_t originaltime, uint32_t process, uint64_t matchingId,
1043  uint32_t scltoken, OTF_KeyValueList *list );
1044 
1045 
1046 
1047 /* *** public statistics record write handlers *** */
1048 
1049 
1050 /** Write a SUMCOMMENT record to stream 'wstream'.
1051  * @see OTF_Writer_writeSummaryComment()
1052  * \ingroup wstream
1053  */
1054 int OTF_WStream_writeSummaryComment( OTF_WStream* wstream, uint64_t time,
1055  uint32_t process, const char* comment );
1056 
1057 /** Write a SUMCOMMENT record including an OTF_KeyValueList to stream 'wstream'.
1058  * @see OTF_Writer_writeSummaryCommentKV()
1059  * \ingroup wstream
1060  */
1061 int OTF_WStream_writeSummaryCommentKV( OTF_WStream* wstream, uint64_t time,
1062  uint32_t process, const char* comment, OTF_KeyValueList* list );
1063 
1064 /** Write a SUMFUNCTION record to stream 'wstream'.
1065  * @see OTF_Writer_writeFunctionSummary()
1066  * \ingroup wstream
1067  */
1069  uint64_t time, uint32_t function, uint32_t process,
1070  uint64_t count, uint64_t excltime, uint64_t incltime );
1071 
1072 /** Write a SUMFUNCTION record including an OTF_KeyValueList to stream 'wstream'.
1073  * @see OTF_Writer_writeFunctionSummaryKV()
1074  * \ingroup wstream
1075  */
1077  uint64_t time, uint32_t function, uint32_t process,
1078  uint64_t count, uint64_t excltime, uint64_t incltime, OTF_KeyValueList* list );
1079 
1080 /** Write a SUMFUNCTIONGROUP record to stream 'wstream'.
1081  * @see OTF_Writer_writeFunctionGroupSummary()
1082  * \ingroup wstream
1083  */
1085  uint64_t time, uint32_t functiongroup, uint32_t process,
1086  uint64_t count, uint64_t excltime, uint64_t incltime );
1087 
1088 /** Write a SUMFUNCTIONGROUP record including an OTF_KeyValueList to stream 'wstream'.
1089  * @see OTF_Writer_writeFunctionGroupSummaryKV()
1090  * \ingroup wstream
1091  */
1093  uint64_t time, uint32_t functiongroup, uint32_t process,
1094  uint64_t count, uint64_t excltime, uint64_t incltime, OTF_KeyValueList* list );
1095 
1096 /** Write a SUMMESSAGE record to stream 'wstream'.
1097  * @see OTF_Writer_writeMessageSummary()
1098  * \ingroup wstream
1099  */
1101  uint64_t time, uint32_t process, uint32_t peer,
1102  uint32_t comm, uint32_t tag, uint64_t number_sent, uint64_t number_recved,
1103  uint64_t bytes_sent, uint64_t bytes_recved );
1104 
1105 /** Write a SUMMESSAGE record including an OTF_KeyValueList to stream 'wstream'.
1106  * @see OTF_Writer_writeMessageSummaryKV()
1107  * \ingroup wstream
1108  */
1110  uint64_t time, uint32_t process, uint32_t peer,
1111  uint32_t comm, uint32_t tag, uint64_t number_sent, uint64_t number_recved,
1112  uint64_t bytes_sent, uint64_t bytes_recved, OTF_KeyValueList* list );
1113 
1114 /** Write a COLLOPMESSAGE record to stream 'wstream'.
1115  * @see OTF_Writer_writeCollopSummary()
1116  * \ingroup wstream
1117  */
1119  uint64_t time, uint32_t process, uint32_t comm, uint32_t collective,
1120  uint64_t number_sent, uint64_t number_recved, uint64_t bytes_sent, uint64_t bytes_recved );
1121 
1122 /** Write a COLLOPMESSAGE record including an OTF_KeyValueList to stream 'wstream'.
1123  * @see OTF_Writer_writeCollopSummaryKV()
1124  * \ingroup wstream
1125  */
1127  uint64_t time, uint32_t process, uint32_t comm, uint32_t collective,
1128  uint64_t number_sent, uint64_t number_recved, uint64_t bytes_sent, uint64_t bytes_recved, OTF_KeyValueList* list );
1129 
1130 /** Write a SUMFILEOPERATION record to stream 'wstream'.
1131  * @see OTF_Writer_writeFileOperationSummary()
1132  * \ingroup wstream
1133  */
1134 int OTF_WStream_writeFileOperationSummary( OTF_WStream* wstream, uint64_t time,
1135  uint32_t fileid, uint32_t process, uint64_t nopen, uint64_t nclose,
1136  uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread,
1137  uint64_t byteswrite );
1138 
1139 /** Write a SUMFILEOPERATION record including an OTF_KeyValueList to stream 'wstream'.
1140  * @see OTF_Writer_writeFileOperationSummaryKV()
1141  * \ingroup wstream
1142  */
1143 int OTF_WStream_writeFileOperationSummaryKV( OTF_WStream* wstream, uint64_t time,
1144  uint32_t fileid, uint32_t process, uint64_t nopen, uint64_t nclose,
1145  uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread,
1146  uint64_t byteswrite, OTF_KeyValueList* list );
1147 
1148 /** Write a SUMFILEGROUPOPERATION record to stream 'wstream'.
1149  * @see OTF_Writer_writeFileGroupOperationSummary()
1150  * \ingroup wstream
1151  */
1152 int OTF_WStream_writeFileGroupOperationSummary( OTF_WStream* wstream, uint64_t time,
1153  uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose,
1154  uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread,
1155  uint64_t byteswrite );
1156 
1157 /** Write a SUMFILEGROUPOPERATION record including an OTF_KeyValueList to stream 'wstream'.
1158  * @see OTF_Writer_writeFileGroupOperationSummaryKV()
1159  * \ingroup wstream
1160  */
1161 int OTF_WStream_writeFileGroupOperationSummaryKV( OTF_WStream* wstream, uint64_t time,
1162  uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose,
1163  uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread,
1164  uint64_t byteswrite, OTF_KeyValueList* list );
1165 
1166 /*
1167 int OTF_WStream_writeCounterSummary( OTF_WStream* wstream,
1168  uint64_t time, uint32_t process,
1169  uint32_t counter, uint64_t value );
1170 
1171 int OTF_WStream_writeCollOpSummary( OTF_WStream* wstream,
1172  uint64_t time, uint32_t process, uint32_t root,
1173  uint64_t bytes_sent, uint64_t bytes_recved );
1174 */
1175 
1176 
1177 
1178 /* *** marker record types *** */
1179 
1180 /** Write a def marker record to stream 'wstream'.
1181  * @see OTF_Writer_writeDefMarker()
1182  * \ingroup wstream
1183  */
1185  uint32_t token,
1186  const char* name,
1187  uint32_t type );
1188 
1189 /** Write a def marker record including an OTF_KeyValueList to stream 'wstream'.
1190  * @see OTF_Writer_writeDefMarkerKV()
1191  * \ingroup wstream
1192  */
1194  uint32_t token,
1195  const char* name,
1196  uint32_t type,
1197  OTF_KeyValueList* list );
1198 
1199 /** Write a marker record to stream 'wstream'.
1200  * @see OTF_Writer_writeMarker()
1201  * \ingroup wstream
1202  */
1203 int OTF_WStream_writeMarker( OTF_WStream* wstream,
1204  uint64_t time,
1205  uint32_t process,
1206  uint32_t token,
1207  const char* text );
1208 
1209 /** Write a marker record including an OTF_KeyValueList to stream 'wstream'.
1210  * @see OTF_Writer_writeMarkerKV()
1211  * \ingroup wstream
1212  */
1213 int OTF_WStream_writeMarkerKV( OTF_WStream* wstream,
1214  uint64_t time,
1215  uint32_t process,
1216  uint32_t token,
1217  const char* text,
1218  OTF_KeyValueList* list );
1219 
1220 
1221 #ifdef __cplusplus
1222 }
1223 #endif /* __cplusplus */
1224 
1225 #endif /* OTF_WSTREAM_H */
1226 
OTF_FileCompression compression
Default compression method for all buffers managed by this stream.
Definition: OTF_WStream.h:135
int OTF_WStream_writeBeginFileOpSnapshot(OTF_WStream *wstream, uint64_t time, uint64_t originaltime, uint32_t process, uint64_t matchingId, uint32_t scltoken)
Write a TBEGINFILEOP record to stream 'wstream'.
Definition: OTF_WStream.c:3691
int OTF_WStream_writeSendMsg(OTF_WStream *wstream, uint64_t time, uint32_t sender, uint32_t receiver, uint32_t communicator, uint32_t msgtype, uint32_t msglength, uint32_t scltoken)
Write a SEND record to stream 'wstream'.
Definition: OTF_WStream.c:2267
uint32_t id
Unique id for the current stream.
Definition: OTF_WStream.h:102
int OTF_WStream_writeRMAEnd(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t remote, uint32_t communicator, uint32_t tag, uint32_t scltoken)
Write a RMAEND record to stream 'wstream'.
Definition: OTF_WStream.c:3254
OTF_WBuffer * eventBuffer
Event buffer.
Definition: OTF_WStream.h:115
int OTF_WStream_writeFileGroupOperationSummaryKV(OTF_WStream *wstream, uint64_t time, uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose, uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, uint64_t byteswrite, OTF_KeyValueList *list)
Write a SUMFILEGROUPOPERATION record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:4089
OTF_WBuffer * defBuffer
Definitions buffer.
Definition: OTF_WStream.h:111
int OTF_WStream_writeCollectiveOperation(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t functionToken, uint32_t communicator, uint32_t rootprocess, uint32_t sent, uint32_t received, uint64_t duration, uint32_t scltoken)
Write a COLLOP record to stream 'wstream'.
Definition: OTF_WStream.c:2462
int OTF_WStream_writeRecvMsg(OTF_WStream *wstream, uint64_t time, uint32_t receiver, uint32_t sender, uint32_t communicator, uint32_t msgtype, uint32_t msglength, uint32_t scltoken)
Write a RECEIVE record to stream 'wstream'.
Definition: OTF_WStream.c:2193
int OTF_WStream_writeFunctionSummary(OTF_WStream *wstream, uint64_t time, uint32_t function, uint32_t process, uint64_t count, uint64_t excltime, uint64_t incltime)
Write a SUMFUNCTION record to stream 'wstream'.
Definition: OTF_WStream.c:3799
int OTF_WStream_writeDefMarker(OTF_WStream *wstream, uint32_t token, const char *name, uint32_t type)
Write a def marker record to stream 'wstream'.
Definition: OTF_WStream.c:4212
int OTF_WStream_writeDefTimerResolution(OTF_WStream *wstream, uint64_t ticksPerSecond)
Write a DEFTIMERRESOLUTION record to stream 'wstream'.
Definition: OTF_WStream.c:862
OTF_WBuffer * OTF_WStream_getMarkerBuffer(OTF_WStream *wstream)
Returns the marker buffer of the according writer stream.
Definition: OTF_WStream.c:561
OTF_WBuffer * OTF_WStream_getStatsBuffer(OTF_WStream *wstream)
Returns the statistics buffer of the according writer stream.
Definition: OTF_WStream.c:490
int OTF_WStream_writeRMAPutKV(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *list)
Write a RMAPUT record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2965
int OTF_WStream_writeDefProcess(OTF_WStream *wstream, uint32_t deftoken, const char *name, uint32_t parent)
Write a DEFPROCESS record to stream 'wstream'.
Definition: OTF_WStream.c:942
void OTF_WStream_setZBufferSizes(OTF_WStream *wstream, uint32_t size)
Set the default zbuffer size for all files managed by this writer stream.
Definition: OTF_WStream.c:712
int OTF_WStream_writeCollopSummary(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t comm, uint32_t collective, uint64_t number_sent, uint64_t number_recved, uint64_t bytes_sent, uint64_t bytes_recved)
Write a COLLOPMESSAGE record to stream 'wstream'.
Definition: OTF_WStream.c:4002
int OTF_WStream_writeDefCounterAssignments(OTF_WStream *wstream, uint32_t counter_token, uint32_t number_of_members, const uint32_t *procs_or_groups, OTF_KeyValueList *list)
Write a DEFCOUNTERASSIGNMENTS record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:1920
int OTF_WStream_writeNoOpKV(OTF_WStream *wstream, uint64_t time, uint32_t process, OTF_KeyValueList *list)
Write a NOOP record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2034
int OTF_WStream_writeDefFileGroupKV(OTF_WStream *wstream, uint32_t token, const char *name, OTF_KeyValueList *list)
Write a DEFFILEGROUP record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:1758
int OTF_WStream_writeLeave(OTF_WStream *wstream, uint64_t time, uint32_t statetoken, uint32_t cpuid, uint32_t scltoken)
Write a LEAVE record to stream 'wstream'.
Definition: OTF_WStream.c:2335
int OTF_WStream_setCompression(OTF_WStream *wstream, OTF_FileCompression compression)
Set the standard compression method for all buffers managed by this writer stream.
Definition: OTF_WStream.c:632
int OTF_WStream_writeDefFunctionGroupKV(OTF_WStream *wstream, uint32_t deftoken, const char *name, OTF_KeyValueList *list)
Write a DEFFUNCTIONGROUP record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:1219
int OTF_WStream_writeRMAPutRemoteEndKV(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *list)
Write a RMAPUTRE record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:3042
int OTF_WStream_writeDefCreator(OTF_WStream *wstream, const char *creator)
Write a DEFCREATOR record to stream 'wstream'.
Definition: OTF_WStream.c:1688
uint32_t buffersizes
Default size of buffers managed by this WStream.
Definition: OTF_WStream.h:138
int OTF_WStream_writeEndProcessKV(OTF_WStream *wstream, uint64_t time, uint32_t process, OTF_KeyValueList *list)
Write a PROCESSEND record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2699
int OTF_WStream_writeDefProcessGroupKV(OTF_WStream *wstream, uint32_t deftoken, const char *name, uint32_t n, const uint32_t *array, OTF_KeyValueList *list)
Write a DEFPROCESSGROUP record including an OTF_KeyValueList to stream 'wstream'. ...
Definition: OTF_WStream.c:949
int OTF_WStream_writeBeginFileOperation(OTF_WStream *wstream, uint64_t time, uint32_t process, uint64_t matchingId, uint32_t scltoken)
Write a FILEOPBEGIN record to stream 'wstream'.
Definition: OTF_WStream.c:2874
int OTF_WStream_writeDefSclKV(OTF_WStream *wstream, uint32_t deftoken, uint32_t sclfile, uint32_t sclline, OTF_KeyValueList *list)
Write a DEFSCL record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:1470
int OTF_WStream_writeDefSclFile(OTF_WStream *wstream, uint32_t deftoken, const char *filename)
Write a DEFSCLFILE record to stream 'wstream'.
Definition: OTF_WStream.c:1583
uint32_t OTF_WStream_getBufferSizes(OTF_WStream *wstream)
Get the default buffer size for all buffers managed by this writer stream.
Definition: OTF_WStream.c:705
int OTF_WStream_writeEventCommentKV(OTF_WStream *wstream, uint64_t time, uint32_t process, const char *comment, OTF_KeyValueList *list)
Write a #EVTCOMMENT record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2612
int OTF_WStream_writeCounterKV(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t counter_token, uint64_t value, OTF_KeyValueList *list)
Write a COUNTER record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2342
int OTF_WStream_writeDefCollectiveOperation(OTF_WStream *wstream, uint32_t collOp, const char *name, uint32_t type)
Write a DEFCOLLECTIVEOPERATION record to stream 'wstream'.
Definition: OTF_WStream.c:1332
int OTF_WStream_writeDefKeyValueKV(OTF_WStream *wstream, uint32_t key, OTF_Type type, const char *name, const char *description, OTF_KeyValueList *list)
Write a DEFKEYVALUE record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:1819
int OTF_WStream_writeBeginCollectiveOperationKV(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t collOp, uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, uint64_t sent, uint64_t received, uint32_t scltoken, OTF_KeyValueList *list)
Write a COLLOPBEGIN record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2472
uint32_t OTF_WStream_getZBufferSizes(OTF_WStream *wstream)
Get the default zbuffer size for all files managed by this writer stream.
Definition: OTF_WStream.c:745
int OTF_WStream_writeMessageSummary(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t peer, uint32_t comm, uint32_t tag, uint64_t number_sent, uint64_t number_recved, uint64_t bytes_sent, uint64_t bytes_recved)
Write a SUMMESSAGE record to stream 'wstream'.
Definition: OTF_WStream.c:3932
int OTF_WStream_writeDefFileGroup(OTF_WStream *wstream, uint32_t token, const char *name)
Write a DEFFILEGROUP record to stream 'wstream'.
Definition: OTF_WStream.c:1812
int OTF_WStream_writeDefFunction(OTF_WStream *wstream, uint32_t deftoken, const char *name, uint32_t group, uint32_t scltoken)
Write a DEFFUNCTION record to stream 'wstream'.
Definition: OTF_WStream.c:1212
int OTF_WStream_writeSummaryComment(OTF_WStream *wstream, uint64_t time, uint32_t process, const char *comment)
Write a SUMCOMMENT record to stream 'wstream'.
Definition: OTF_WStream.c:3741
OTF_FileManager * manager
file handle manager
Definition: OTF_WStream.h:146
int OTF_WStream_writeEndFileOperation(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t fileid, uint64_t matchingId, uint64_t handleId, uint32_t operation, uint64_t bytes, uint32_t scltoken)
Write a FILEOPEND record to stream 'wstream'.
Definition: OTF_WStream.c:2955
int OTF_WStream_writeDefProcessOrGroupAttributes(OTF_WStream *wstream, uint32_t proc_token, uint32_t attr_token)
Write a DEFPROCESSORGROUPATTR record to stream 'wstream'.
Definition: OTF_WStream.c:1136
int OTF_WStream_writeMessageSummaryKV(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t peer, uint32_t comm, uint32_t tag, uint64_t number_sent, uint64_t number_recved, uint64_t bytes_sent, uint64_t bytes_recved, OTF_KeyValueList *list)
Write a SUMMESSAGE record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:3868
int OTF_WStream_writeSendMsgKV(OTF_WStream *wstream, uint64_t time, uint32_t sender, uint32_t receiver, uint32_t communicator, uint32_t msgtype, uint32_t msglength, uint32_t scltoken, OTF_KeyValueList *list)
Write a SEND record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2203
OTF_WBuffer * OTF_WStream_getSnapshotBuffer(OTF_WStream *wstream)
Returns the snapshots buffer of the according writer stream.
Definition: OTF_WStream.c:415
int OTF_WStream_writeBeginFileOperationKV(OTF_WStream *wstream, uint64_t time, uint32_t process, uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList *list)
Write a FILEOPBEGIN record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2822
void OTF_WStream_setFormat(OTF_WStream *wstream, uint32_t format)
Set the default ouput format.
Definition: OTF_WStream.c:756
int OTF_WStream_writeRecvMsgKV(OTF_WStream *wstream, uint64_t time, uint32_t receiver, uint32_t sender, uint32_t communicator, uint32_t msgtype, uint32_t msglength, uint32_t scltoken, OTF_KeyValueList *list)
Write a RECEIVE record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2128
int OTF_WStream_writeSnapshotCommentKV(OTF_WStream *wstream, uint64_t time, uint32_t process, const char *comment, OTF_KeyValueList *list)
Write a #TCOMMENT record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:3266
int OTF_WStream_writeSummaryCommentKV(OTF_WStream *wstream, uint64_t time, uint32_t process, const char *comment, OTF_KeyValueList *list)
Write a SUMCOMMENT record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:3704
enum OTF_ATTR_TYPE_enum OTF_ATTR_TYPE
An enum which holds all values that are possible to set with datatype OTF_ATTR_TYPE().
int OTF_WStream_writeBeginProcess(OTF_WStream *wstream, uint64_t time, uint32_t process)
Write a PROCESSBEGIN record to stream 'wstream'.
Definition: OTF_WStream.c:2692
int OTF_WStream_writeRMAPut(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, uint64_t bytes, uint32_t scltoken)
Write a RMAPUT record to stream 'wstream'.
Definition: OTF_WStream.c:3032
int OTF_WStream_writeEnterSnapshotKV(OTF_WStream *wstream, uint64_t time, uint64_t originaltime, uint32_t statetoken, uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList *list)
Write a TENTER record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:3310
int OTF_WStream_writeDefCounter(OTF_WStream *wstream, uint32_t deftoken, const char *name, uint32_t properties, uint32_t countergroup, const char *unit)
Write a DEFCOUNTER record to stream 'wstream'.
Definition: OTF_WStream.c:1403
int OTF_WStream_writeFileOperationKV(OTF_WStream *wstream, uint64_t time, uint32_t fileid, uint32_t process, uint64_t handleid, uint32_t operation, uint64_t bytes, uint64_t duration, uint32_t source, OTF_KeyValueList *list)
Write a FILEOP record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2742
int OTF_WStream_writeEnter(OTF_WStream *wstream, uint64_t time, uint32_t statetoken, uint32_t cpuid, uint32_t scltoken)
Write a ENTER record to stream 'wstream'.
Definition: OTF_WStream.c:2121
int OTF_WStream_writeSendSnapshot(OTF_WStream *wstream, uint64_t time, uint64_t originaltime, uint32_t sender, uint32_t receiver, uint32_t procGroup, uint32_t type, uint32_t length, uint32_t source)
Write a TSEND record to stream 'wstream'.
Definition: OTF_WStream.c:3453
Manages file handles.
int OTF_WStream_writeDefFile(OTF_WStream *wstream, uint32_t token, const char *name, uint32_t group)
Write a DEFFILE record to stream 'wstream'.
Definition: OTF_WStream.c:1752
char * namestub
name stub: all files will begin with this name
Definition: OTF_WStream.h:99
enum OTF_Type_enum OTF_Type
An enum which holds all OTF datatypes that are relevant for OTF_KeyValueList.
int OTF_WStream_writeEndFileOperationKV(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t fileid, uint64_t matchingId, uint64_t handleId, uint32_t operation, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *list)
Write a FILEOPEND record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2882
int OTF_WStream_writeDefCounterGroupKV(OTF_WStream *wstream, uint32_t deftoken, const char *name, OTF_KeyValueList *list)
Write a DEFCOUNTERGROUP record including an OTF_KeyValueList to stream 'wstream'. ...
Definition: OTF_WStream.c:1412
int OTF_WStream_writeDefinitionComment(OTF_WStream *wstream, const char *comment)
Write a DEFINITIONCOMMENT record to stream 'wstream'.
Definition: OTF_WStream.c:817
int OTF_WStream_writeRMAGet(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, uint64_t bytes, uint32_t scltoken)
Write a RMAGET record to stream 'wstream'.
Definition: OTF_WStream.c:3186
int OTF_WStream_writeDefAttributeList(OTF_WStream *wstream, uint32_t attr_token, uint32_t num, OTF_ATTR_TYPE *array)
Write a DEFATTRLIST record to stream 'wstream'.
Definition: OTF_WStream.c:1083
int OTF_WStream_writeDefCounterGroup(OTF_WStream *wstream, uint32_t deftoken, const char *name)
Write a DEFCOUNTERGROUP record to stream 'wstream'.
Definition: OTF_WStream.c:1463
int OTF_WStream_writeDefProcessOrGroupAttributesKV(OTF_WStream *wstream, uint32_t proc_token, uint32_t attr_token, OTF_KeyValueList *list)
Write a DEFPROCESSORGROUPATTR record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:1090
OTF_WBuffer * OTF_WStream_getDefBuffer(OTF_WStream *wstream)
Returns the definition buffer of the according writer stream.
Definition: OTF_WStream.c:263
int OTF_WStream_writeDefProcessSubstitutes(OTF_WStream *wstream, uint32_t representative, uint32_t numberOfProcs, const uint32_t *procs, OTF_KeyValueList *list)
Write a DEFPROCESSSUBTITUTES record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:1968
int OTF_WStream_writeDefinitionCommentKV(OTF_WStream *wstream, const char *comment, OTF_KeyValueList *list)
Write a DEFINITIONCOMMENT record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:780
int OTF_WStream_writeDefMarkerKV(OTF_WStream *wstream, uint32_t token, const char *name, uint32_t type, OTF_KeyValueList *list)
Write a def marker record to stream 'wstream'.
Definition: OTF_WStream.c:4168
int OTF_WStream_writeRMAPutRemoteEnd(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, uint64_t bytes, uint32_t scltoken)
Write a RMAPUTRE record to stream 'wstream'.
Definition: OTF_WStream.c:3109
int OTF_WStream_writeBeginCollopSnapshotKV(OTF_WStream *wstream, uint64_t time, uint64_t originaltime, uint32_t process, uint32_t collOp, uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, uint64_t sent, uint64_t received, uint32_t scltoken, OTF_KeyValueList *list)
Write a TBEGINCOLLOP record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:3534
int OTF_WStream_writeDefTimeRange(OTF_WStream *wstream, uint64_t minTime, uint64_t maxTime, OTF_KeyValueList *list)
Write a DEFTIMERANGE record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:1878
Provides write access to trace buffers.
OTF_WBuffer * OTF_WStream_getEventBuffer(OTF_WStream *wstream)
Returns the event buffer of the according writer stream.
Definition: OTF_WStream.c:339
int OTF_WStream_writeDefKeyValue(OTF_WStream *wstream, uint32_t key, OTF_Type type, const char *name, const char *description)
Write a DEFKEYVALUE record to stream 'wstream'.
Definition: OTF_WStream.c:1871
int OTF_WStream_writeDefProcessKV(OTF_WStream *wstream, uint32_t deftoken, const char *name, uint32_t parent, OTF_KeyValueList *list)
Write a DEFPROCESS record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:869
int OTF_WStream_writeDefAttributeListKV(OTF_WStream *wstream, uint32_t attr_token, uint32_t num, OTF_ATTR_TYPE *array, OTF_KeyValueList *list)
Write a DEFATTRLIST record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:1025
int OTF_WStream_writeBeginCollectiveOperation(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t collOp, uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, uint64_t sent, uint64_t received, uint32_t scltoken)
Write a COLLOPBEGIN record to stream 'wstream'.
Definition: OTF_WStream.c:2554
int OTF_WStream_writeOpenFileSnapshotKV(OTF_WStream *wstream, uint64_t time, uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid, uint32_t source, OTF_KeyValueList *list)
Write a TOPENFILE record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:3462
int OTF_WStream_writeEndCollectiveOperationKV(OTF_WStream *wstream, uint64_t time, uint32_t process, uint64_t matchingId, OTF_KeyValueList *list)
Write a COLLOPEND record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2565
OTF_FileCompression OTF_WStream_getCompression(OTF_WStream *wstream)
Return the standard compression method for all buffers managed by this writer stream.
Definition: OTF_WStream.c:667
int OTF_WStream_flush(OTF_WStream *wstream)
Flush an OTF_WStream instance, i.e.
Definition: OTF_WStream.c:229
int OTF_WStream_writeBeginCollopSnapshot(OTF_WStream *wstream, uint64_t time, uint64_t originaltime, uint32_t process, uint32_t collOp, uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, uint64_t sent, uint64_t received, uint32_t scltoken)
Write a TBEGINCOLLOP record to stream 'wstream'.
Definition: OTF_WStream.c:3623
int OTF_WStream_writeLeaveKV(OTF_WStream *wstream, uint64_t time, uint32_t statetoken, uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList *list)
Write a LEAVE record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2276
int OTF_WStream_writeDefCollectiveOperationKV(OTF_WStream *wstream, uint32_t collOp, const char *name, uint32_t type, OTF_KeyValueList *list)
Write a DEFCOLLECTIVEOPERATION record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:1277
int OTF_WStream_writeFunctionGroupSummary(OTF_WStream *wstream, uint64_t time, uint32_t functiongroup, uint32_t process, uint64_t count, uint64_t excltime, uint64_t incltime)
Write a SUMFUNCTIONGROUP record to stream 'wstream'.
Definition: OTF_WStream.c:3859
OTF_WBuffer * statsBuffer
Statistics buffer.
Definition: OTF_WStream.h:127
int OTF_WStream_writeOtfVersion(OTF_WStream *wstream)
Write a DEFVERSION record to stream 'wstream'.
Definition: OTF_WStream.c:1644
int OTF_WStream_writeCollopSummaryKV(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t comm, uint32_t collective, uint64_t number_sent, uint64_t number_recved, uint64_t bytes_sent, uint64_t bytes_recved, OTF_KeyValueList *list)
Write a COLLOPMESSAGE record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:3943
int OTF_WStream_writeFileGroupOperationSummary(OTF_WStream *wstream, uint64_t time, uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose, uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, uint64_t byteswrite)
Write a SUMFILEGROUPOPERATION record to stream 'wstream'.
Definition: OTF_WStream.c:4156
int OTF_WStream_writeDefCounterKV(OTF_WStream *wstream, uint32_t deftoken, const char *name, uint32_t properties, uint32_t countergroup, const char *unit, OTF_KeyValueList *list)
Write a DEFCOUNTER record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:1339
int OTF_WStream_writeCollectiveOperationKV(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t functionToken, uint32_t communicator, uint32_t rootprocess, uint32_t sent, uint32_t received, uint64_t duration, uint32_t scltoken, OTF_KeyValueList *list)
Write a COLLOP record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2391
int OTF_WStream_writeSnapshotComment(OTF_WStream *wstream, uint64_t time, uint32_t process, const char *comment)
Write a #TCOMMENT record to stream 'wstream'.
Definition: OTF_WStream.c:3303
int OTF_WStream_writeRMAGetKV(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *list)
Write a RMAGET record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:3119
int OTF_WStream_writeEndCollectiveOperation(OTF_WStream *wstream, uint64_t time, uint32_t process, uint64_t matchingId)
Write a COLLOPEND record to stream 'wstream'.
Definition: OTF_WStream.c:2605
int OTF_WStream_writeOpenFileSnapshot(OTF_WStream *wstream, uint64_t time, uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid, uint32_t source)
Write a TOPENFILE record to stream 'wstream'.
Definition: OTF_WStream.c:3526
int OTF_WStream_close(OTF_WStream *wstream)
Close an OTF_WStream instance and all its related files.
Definition: OTF_WStream.c:206
Definition: OTF_WBuffer.h:36
int OTF_WStream_writeFunctionGroupSummaryKV(OTF_WStream *wstream, uint64_t time, uint32_t functiongroup, uint32_t process, uint64_t count, uint64_t excltime, uint64_t incltime, OTF_KeyValueList *list)
Write a SUMFUNCTIONGROUP record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:3808
Definition: OTF_WStream.h:95
OTF_WStream * OTF_WStream_open(const char *namestub, uint32_t id, OTF_FileManager *manager)
Create a new OTF_WStream instance.
Definition: OTF_WStream.c:169
int OTF_WStream_writeBeginFileOpSnapshotKV(OTF_WStream *wstream, uint64_t time, uint64_t originaltime, uint32_t process, uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList *list)
Write a TBEGINFILEOP record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:3633
int OTF_WStream_writeDefFunctionGroup(OTF_WStream *wstream, uint32_t deftoken, const char *name)
Write a DEFFUNCTIONGROUP record to stream 'wstream'.
Definition: OTF_WStream.c:1270
OTF_WBuffer * markerBuffer
Marker buffer.
Definition: OTF_WStream.h:132
struct OTF_KeyValueList_struct OTF_KeyValueList
Object type which holds a key-value list.
Definition: OTF_KeyValue.h:242
int OTF_WStream_writeDefTimerResolutionKV(OTF_WStream *wstream, uint64_t ticksPerSecond, OTF_KeyValueList *list)
Write a DEFTIMERRESOLUTION record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:824
int OTF_WStream_writeDefScl(OTF_WStream *wstream, uint32_t deftoken, uint32_t sclfile, uint32_t sclline)
Write a DEFSCL record to stream 'wstream'.
Definition: OTF_WStream.c:1525
Provides many many macros for different purposes.
int OTF_WStream_writeEnterKV(OTF_WStream *wstream, uint64_t time, uint32_t statetoken, uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList *list)
Write a ENTER record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2069
int OTF_WStream_writeDefCreatorKV(OTF_WStream *wstream, const char *creator, OTF_KeyValueList *list)
Write a DEFCREATOR record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:1651
int OTF_WStream_writeSendSnapshotKV(OTF_WStream *wstream, uint64_t time, uint64_t originaltime, uint32_t sender, uint32_t receiver, uint32_t procGroup, uint32_t type, uint32_t length, uint32_t source, OTF_KeyValueList *list)
Write a TSEND record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:3376
int OTF_WStream_writeMarkerKV(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t token, const char *text, OTF_KeyValueList *list)
Write a marker record to stream 'wstream'.
Definition: OTF_WStream.c:4220
int OTF_WStream_writeFileOperationSummaryKV(OTF_WStream *wstream, uint64_t time, uint32_t fileid, uint32_t process, uint64_t nopen, uint64_t nclose, uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, uint64_t byteswrite, OTF_KeyValueList *list)
Write a SUMFILEOPERATION record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:4012
file handles management structure
Definition: OTF_FileManager.c:32
int OTF_WStream_writeEnterSnapshot(OTF_WStream *wstream, uint64_t time, uint64_t originaltime, uint32_t statetoken, uint32_t cpuid, uint32_t scltoken)
Write a TENTER record to stream 'wstream'.
Definition: OTF_WStream.c:3368
uint32_t OTF_WStream_getFormat(OTF_WStream *wstream)
Get the default output format.
Definition: OTF_WStream.c:770
int OTF_WStream_writeDefSclFileKV(OTF_WStream *wstream, uint32_t deftoken, const char *filename, OTF_KeyValueList *list)
Write a DEFSCLFILE record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:1532
Handles file naming issues.
void OTF_WStream_setBufferSizes(OTF_WStream *wstream, uint32_t size)
Set the default buffer size for all buffers managed by this writer stream.
Definition: OTF_WStream.c:677
int OTF_WStream_writeEventComment(OTF_WStream *wstream, uint64_t time, uint32_t process, const char *comment)
Write a #EVTCOMMENT record to stream 'wstream'.
Definition: OTF_WStream.c:2649
uint32_t format
State wether to use long or short format, see OTF_WSTREAM_FORMAT_XXX macros above.
Definition: OTF_WStream.h:106
int OTF_WStream_writeFunctionSummaryKV(OTF_WStream *wstream, uint64_t time, uint32_t function, uint32_t process, uint64_t count, uint64_t excltime, uint64_t incltime, OTF_KeyValueList *list)
Write a SUMFUNCTION record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:3748
Deals with all data type related issues.
int OTF_WStream_writeFileOperationSummary(OTF_WStream *wstream, uint64_t time, uint32_t fileid, uint32_t process, uint64_t nopen, uint64_t nclose, uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, uint64_t byteswrite)
Write a SUMFILEOPERATION record to stream 'wstream'.
Definition: OTF_WStream.c:4079
int OTF_WStream_writeBeginProcessKV(OTF_WStream *wstream, uint64_t time, uint32_t process, OTF_KeyValueList *list)
Write a PROCESSBEGIN record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:2656
int OTF_WStream_writeDefProcessGroup(OTF_WStream *wstream, uint32_t deftoken, const char *name, uint32_t n, const uint32_t *array)
Write a DEFPROCESSGROUP record to stream 'wstream'.
Definition: OTF_WStream.c:1018
int OTF_WStream_writeRMAEndKV(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t remote, uint32_t communicator, uint32_t tag, uint32_t scltoken, OTF_KeyValueList *list)
Write a RMAEND record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:3196
int OTF_WStream_writeFileOperation(OTF_WStream *wstream, uint64_t time, uint32_t fileid, uint32_t process, uint64_t handleid, uint32_t operation, uint64_t bytes, uint64_t duration, uint32_t source)
Write a FILEOP record to stream 'wstream'.
Definition: OTF_WStream.c:2813
int OTF_WStream_writeDefFileKV(OTF_WStream *wstream, uint32_t token, const char *name, uint32_t group, OTF_KeyValueList *list)
Write a DEFFILE record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:1694
int OTF_WStream_writeCounter(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t counter_token, uint64_t value)
Write a COUNTER record to stream 'wstream'.
Definition: OTF_WStream.c:2384
int OTF_WStream_writeDefFunctionKV(OTF_WStream *wstream, uint32_t deftoken, const char *name, uint32_t group, uint32_t scltoken, OTF_KeyValueList *list)
Write a DEFFUNCTION record including an OTF_KeyValueList to stream 'wstream'.
Definition: OTF_WStream.c:1143
OTF_WBuffer * snapsBuffer
Snaps (snapshots) buffer.
Definition: OTF_WStream.h:121
int OTF_WStream_writeEndProcess(OTF_WStream *wstream, uint64_t time, uint32_t process)
Write a PROCESSEND record to stream 'wstream'.
Definition: OTF_WStream.c:2735
int OTF_WStream_writeMarker(OTF_WStream *wstream, uint64_t time, uint32_t process, uint32_t token, const char *text)
Write a marker record to stream 'wstream'.
Definition: OTF_WStream.c:4271