OpenMPI  0.1.1
OTF_HandlerArray.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_HandlerArray.h
8  *
9  * @brief Provides read access to OTF traces which consist of multiple
10  * streams.
11  *
12  * \ingroup handler
13  * \ingroup ha
14  */
15 
16 /** \defgroup handler Handler Interface
17  *
18  * In the following, the handler interfaces for all record types are
19  * specified. The signature of callback handler functions is equal to the
20  * signature of corresponding record write functions except for the first
21  * argument. The first argument common to all callback handler functions is
22  * \em userData -- a generic pointer to custom user data. The second common
23  * argument to all callback hander functions is \em stream which identifies the
24  * stream where the definition occurred. A stream parameter = 0 indicates a
25  * global definition which is the default.
26  */
27 
28 /**
29  * \defgroup ha Handler Array Interface
30  *
31  * Using this interface you can setup a handler array for reading traces.
32  *
33  */
34 
35 #ifndef OTF_HANDLERARRAY_H
36 #define OTF_HANDLERARRAY_H
37 
38 
39 #include "OTF_Writer.h"
40 #include "OTF_WStream.h"
41 
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif /* __cplusplus */
46 
47 /** Generic function pointer for OTF record handlers. \ingroup ha*/
48 typedef int (OTF_FunctionPointer) ( void *userData );
49 
50 
51 /** Object structure which holds OTF record handlers. */
53 
54  /** Array of function pointer. */
56 
57  /** Array of first handler arguments. */
59 };
60 
61 /** Object type which holds OTF record handlers. \ingroup ha */
63 
64 
65 /** Open a new array of handlers. \ingroup ha */
67 
68 /** Close and delete a OTF_HandlerArray object. \ingroup ha */
70 
71 /** Assign the function pointer to your own handler of the given record
72  type. \ingroup ha */
74  OTF_FunctionPointer* pointer, uint32_t recordtype );
75 
76 /** Assign the first argument to your own handler of the given record type.
77 \ingroup ha */
79  void* firsthandlerarg, uint32_t recordtype );
80 
81 /** Provide copy handlers to every record type. \ingroup ha */
83  OTF_Writer* writer );
84 
85 /** Provide copy handlers to every record type for OTF streams. \ingroup ha */
87  OTF_WStream* writer );
88 
89 
90 /* typdefs for OTF definition records *************************** */
91 
92 /** @cond typedef */
93 
94 /** the following lines are ignored by doxygen */
95 
96 /* - the following part is also used to create the python wrapper automatically
97  - respect these rules to avoid problems while generating:
98  - write the definition macro as a comment (with a '#' placed in front)
99  one line above the typedef itself
100  - the use of the following datatypes is possible: char, uint8_t, uint32_t, uint64_t
101  - the first parameter must be a "void*" pointer
102  - to use pointer as parameter is very critical and requires some additional rules:
103  - pointer of type "char*" are allowed anytime
104  - pointer of type "uint32_t*" are allowed but the previous parameter must
105  be of type "uint32_t" and contain the number of elements that are in the array
106  the pointer references to
107  - pointer of type "void*" are allowed as the first parameter only
108 
109  - if you have to add a record that breaks one of the above-mentioned rules the generation
110  will skip this record and you manually have to update the python wrapper ( see
111  otflib_py/README_python for further information )
112  - check and test the new record with the python interface to avoid bugs caused by the
113  automatic generation
114 
115  do not remove the following line, because it is necessary to generate the python wrapper
116  #START_GEN_PYWRAPPER
117 */
118 
119 /* # OTF_DEFINITIONCOMMENT_RECORD */
120 typedef int (OTF_Handler_DefinitionComment) ( void* userData,
121  uint32_t stream,
122  const char* comment,
123  OTF_KeyValueList *list );
124 
125 /* # OTF_DEFTIMERRESOLUTION_RECORD */
126 typedef int (OTF_Handler_DefTimerResolution) ( void* userData,
127  uint32_t stream,
128  uint64_t ticksPerSecond,
129  OTF_KeyValueList *list );
130 
131 /* # OTF_DEFPROCESS_RECORD */
132 typedef int (OTF_Handler_DefProcess) ( void* userData,
133  uint32_t stream,
134  uint32_t process,
135  const char* name,
136  uint32_t parent,
137  OTF_KeyValueList *list );
138 
139 /* # OTF_DEFPROCESSGROUP_RECORD */
140 typedef int (OTF_Handler_DefProcessGroup) ( void* userData,
141  uint32_t stream,
142  uint32_t procGroup,
143  const char* name,
144  uint32_t numberOfProcs,
145  const uint32_t* procs,
146  OTF_KeyValueList *list );
147 
148 /* # OTF_DEFATTRLIST_RECORD */
149 typedef int (OTF_Handler_DefAttributeList) ( void* userData,
150  uint32_t stream,
151  uint32_t attr_token,
152  uint32_t num,
153  OTF_ATTR_TYPE* array,
154  OTF_KeyValueList *list );
155 
156 /* # OTF_DEFPROCESSORGROUPATTR_RECORD */
157 typedef int (OTF_Handler_DefProcessOrGroupAttributes) ( void* userData,
158  uint32_t stream,
159  uint32_t proc_token,
160  uint32_t attr_token,
161  OTF_KeyValueList *list );
162 
163 /* # OTF_DEFFUNCTION_RECORD */
164 typedef int (OTF_Handler_DefFunction) ( void* userData,
165  uint32_t stream,
166  uint32_t func,
167  const char* name,
168  uint32_t funcGroup,
169  uint32_t source,
170  OTF_KeyValueList *list );
171 
172 /* # OTF_DEFFUNCTIONGROUP_RECORD */
173 typedef int (OTF_Handler_DefFunctionGroup) ( void* userData,
174  uint32_t stream,
175  uint32_t funcGroup,
176  const char* name,
177  OTF_KeyValueList *list );
178 
179 /* # OTF_DEFCOLLOP_RECORD */
180 typedef int (OTF_Handler_DefCollectiveOperation) ( void* userData,
181  uint32_t stream,
182  uint32_t collOp,
183  const char* name,
184  uint32_t type,
185  OTF_KeyValueList *list );
186 
187 /* # OTF_DEFCOUNTER_RECORD */
188 typedef int (OTF_Handler_DefCounter) ( void* userData,
189  uint32_t stream,
190  uint32_t counter,
191  const char* name,
192  uint32_t properties,
193  uint32_t counterGroup,
194  const char* unit,
195  OTF_KeyValueList *list );
196 
197 /* # OTF_DEFCOUNTERGROUP_RECORD */
198 typedef int (OTF_Handler_DefCounterGroup) ( void* userData,
199  uint32_t stream,
200  uint32_t counterGroup,
201  const char* name,
202  OTF_KeyValueList *list );
203 
204 /* # OTF_DEFSCL_RECORD */
205 typedef int (OTF_Handler_DefScl) ( void* userData,
206  uint32_t stream,
207  uint32_t source,
208  uint32_t sourceFile,
209  uint32_t line,
210  OTF_KeyValueList *list );
211 
212 /* # OTF_DEFSCLFILE_RECORD */
213 typedef int (OTF_Handler_DefSclFile) ( void* userData,
214  uint32_t stream,
215  uint32_t sourceFile,
216  const char* name,
217  OTF_KeyValueList *list );
218 
219 /* # OTF_DEFCREATOR_RECORD */
220 typedef int (OTF_Handler_DefCreator) ( void* userData,
221  uint32_t stream,
222  const char* creator,
223  OTF_KeyValueList *list );
224 
225 /* # OTF_DEFVERSION_RECORD */
226 typedef int (OTF_Handler_DefVersion) ( void* userData,
227  uint32_t stream,
228  uint8_t major,
229  uint8_t minor,
230  uint8_t sub,
231  const char* string,
232  OTF_KeyValueList *list );
233 
234 /* # OTF_DEFFILE_RECORD */
235 typedef int (OTF_Handler_DefFile) ( void* userData,
236  uint32_t stream,
237  uint32_t token,
238  const char *name,
239  uint32_t group,
240  OTF_KeyValueList *list );
241 
242 /* # OTF_DEFFILEGROUP_RECORD */
243 typedef int (OTF_Handler_DefFileGroup) ( void* userData,
244  uint32_t stream,
245  uint32_t token,
246  const char *name,
247  OTF_KeyValueList *list );
248 
249 /* # OTF_DEFKEYVALUE_RECORD */
250 typedef int (OTF_Handler_DefKeyValue) ( void* userData,
251  uint32_t stream,
252  uint32_t key,
253  OTF_Type type,
254  const char *name,
255  const char *description,
256  OTF_KeyValueList *list );
257 
258 /* # OTF_DEFTIMERANGE_RECORD */
259 typedef int (OTF_Handler_DefTimeRange) ( void* userData,
260  uint32_t stream,
261  uint64_t minTime,
262  uint64_t maxTime,
263  OTF_KeyValueList* list );
264 
265 /* # OTF_DEFCOUNTERASSIGNMENTS_RECORD */
266 typedef int (OTF_Handler_DefCounterAssignments) ( void* userData,
267  uint32_t stream,
268  uint32_t counter,
269  uint32_t number_of_members,
270  const uint32_t* procs_or_groups,
271  OTF_KeyValueList* list );
272 
273 /* # OTF_DEFPROCESSSUBSTITUTES_RECORD */
274 typedef int (OTF_Handler_DefProcessSubstitutes) ( void* userData,
275  uint32_t stream,
276  uint32_t representative,
277  uint32_t numberOfProcs,
278  const uint32_t* procs,
279  OTF_KeyValueList* list );
280 
281 /* typedefs for OTF event records ****************************************** */
282 
283 /* # OTF_NOOP_RECORD */
284 typedef int (OTF_Handler_NoOp) ( void* userData,
285  uint64_t time,
286  uint32_t process,
287  OTF_KeyValueList *list );
288 
289 /* # OTF_ENTER_RECORD */
290 typedef int (OTF_Handler_Enter) ( void* userData,
291  uint64_t time,
292  uint32_t function,
293  uint32_t process,
294  uint32_t source,
295  OTF_KeyValueList *list );
296 
297 /* # OTF_LEAVE_RECORD */
298 typedef int (OTF_Handler_Leave) ( void* userData,
299  uint64_t time,
300  uint32_t function,
301  uint32_t process,
302  uint32_t source,
303  OTF_KeyValueList *list );
304 
305 /* # OTF_SEND_RECORD */
306 typedef int (OTF_Handler_SendMsg) ( void* userData,
307  uint64_t time,
308  uint32_t sender,
309  uint32_t receiver,
310  uint32_t group,
311  uint32_t type,
312  uint32_t length,
313  uint32_t source,
314  OTF_KeyValueList *list );
315 
316 /* # OTF_RECEIVE_RECORD */
317 typedef int (OTF_Handler_RecvMsg) ( void* userData,
318  uint64_t time,
319  uint32_t recvProc,
320  uint32_t sendProc,
321  uint32_t group,
322  uint32_t type,
323  uint32_t length,
324  uint32_t source,
325  OTF_KeyValueList *list );
326 
327 /* # OTF_COUNTER_RECORD */
328 typedef int (OTF_Handler_Counter) ( void* userData,
329  uint64_t time,
330  uint32_t process,
331  uint32_t counter,
332  uint64_t value,
333  OTF_KeyValueList *list );
334 
335 /* # OTF_COLLOP_RECORD */
336 typedef int (OTF_Handler_CollectiveOperation) ( void* userData,
337  uint64_t time,
338  uint32_t process,
339  uint32_t collective,
340  uint32_t procGroup,
341  uint32_t rootProc,
342  uint32_t sent,
343  uint32_t received,
344  uint64_t duration,
345  uint32_t source,
346  OTF_KeyValueList *list );
347 
348 /* # OTF_BEGINCOLLOP_RECORD */
349 typedef int (OTF_Handler_BeginCollectiveOperation) ( void* userData,
350  uint64_t time,
351  uint32_t process,
352  uint32_t collOp,
353  uint64_t matchingId,
354  uint32_t procGroup,
355  uint32_t rootProc,
356  uint64_t sent,
357  uint64_t received,
358  uint32_t scltoken,
359  OTF_KeyValueList *list );
360 
361 /* # OTF_ENDCOLLOP_RECORD */
362 typedef int (OTF_Handler_EndCollectiveOperation) ( void* userData,
363  uint64_t time,
364  uint32_t process,
365  uint64_t matchingId,
366  OTF_KeyValueList *list );
367 
368 /* # OTF_EVENTCOMMENT_RECORD */
369 typedef int (OTF_Handler_EventComment) ( void* userData,
370  uint64_t time,
371  uint32_t process,
372  const char* comment,
373  OTF_KeyValueList *list );
374 
375 /* # OTF_BEGINPROCESS_RECORD */
376 typedef int (OTF_Handler_BeginProcess) ( void* userData,
377  uint64_t time,
378  uint32_t process,
379  OTF_KeyValueList *list );
380 
381 /* # OTF_ENDPROCESS_RECORD */
382 typedef int (OTF_Handler_EndProcess) ( void* userData,
383  uint64_t time,
384  uint32_t process,
385  OTF_KeyValueList *list );
386 
387 
388 /* # OTF_FILEOPERATION_RECORD */
389 typedef int (OTF_Handler_FileOperation) ( void* userData,
390  uint64_t time,
391  uint32_t fileid,
392  uint32_t process,
393  uint64_t handleid,
394  uint32_t operation,
395  uint64_t bytes,
396  uint64_t duration,
397  uint32_t source,
398  OTF_KeyValueList *list );
399 
400 /* # OTF_BEGINFILEOP_RECORD */
401 typedef int (OTF_Handler_BeginFileOperation) ( void* userData,
402  uint64_t time,
403  uint32_t process,
404  uint64_t matchingId,
405  uint32_t scltoken,
406  OTF_KeyValueList *list );
407 
408 /* # OTF_ENDFILEOP_RECORD */
409 typedef int (OTF_Handler_EndFileOperation) ( void* userData,
410  uint64_t time,
411  uint32_t process,
412  uint32_t fileid,
413  uint64_t matchingId,
414  uint64_t handleId,
415  uint32_t operation,
416  uint64_t bytes,
417  uint32_t scltoken,
418  OTF_KeyValueList *list );
419 
420 /* # OTF_RMAPUT_RECORD */
421 typedef int (OTF_Handler_RMAPut) ( void* userData,
422  uint64_t time,
423  uint32_t process,
424  uint32_t origin,
425  uint32_t target,
426  uint32_t communicator,
427  uint32_t tag,
428  uint64_t bytes,
429  uint32_t source,
430  OTF_KeyValueList *list );
431 
432 /* # OTF_RMAPUTRE_RECORD */
433 typedef int (OTF_Handler_RMAPutRemoteEnd) ( void* userData,
434  uint64_t time,
435  uint32_t process,
436  uint32_t origin,
437  uint32_t target,
438  uint32_t communicator,
439  uint32_t tag,
440  uint64_t bytes,
441  uint32_t source,
442  OTF_KeyValueList *list );
443 
444 /* # OTF_RMAGET_RECORD */
445 typedef int (OTF_Handler_RMAGet) ( void* userData,
446  uint64_t time,
447  uint32_t process,
448  uint32_t origin,
449  uint32_t target,
450  uint32_t communicator,
451  uint32_t tag,
452  uint64_t bytes,
453  uint32_t source,
454  OTF_KeyValueList *list );
455 
456 /* # OTF_RMAEND_RECORD */
457 typedef int (OTF_Handler_RMAEnd) ( void* userData,
458  uint64_t time,
459  uint32_t process,
460  uint32_t remote,
461  uint32_t communicator,
462  uint32_t tag,
463  uint32_t source,
464  OTF_KeyValueList *list );
465 
466 
467 /* typedefs for OTF snapshot records *************************************** */
468 
469 
470 /* # OTF_SNAPSHOTCOMMENT_RECORD */
471 typedef int (OTF_Handler_SnapshotComment) ( void* userData,
472  uint64_t time,
473  uint32_t process,
474  const char* comment,
475  OTF_KeyValueList *list );
476 
477 /* # OTF_ENTERSNAPSHOT_RECORD */
478 typedef int (OTF_Handler_EnterSnapshot) ( void *userData,
479  uint64_t time,
480  uint64_t originaltime,
481  uint32_t function,
482  uint32_t process,
483  uint32_t source,
484  OTF_KeyValueList *list );
485 
486 /* # OTF_SENDSNAPSHOT_RECORD */
487 typedef int (OTF_Handler_SendSnapshot) ( void *userData,
488  uint64_t time,
489  uint64_t originaltime,
490  uint32_t sender,
491  uint32_t receiver,
492  uint32_t procGroup,
493  uint32_t tag,
494  uint32_t length,
495  uint32_t source,
496  OTF_KeyValueList *list );
497 
498 /* # OTF_OPENFILESNAPSHOT_RECORD */
499 typedef int (OTF_Handler_OpenFileSnapshot) ( void* userData,
500  uint64_t time,
501  uint64_t originaltime,
502  uint32_t fileid,
503  uint32_t process,
504  uint64_t handleid,
505  uint32_t source,
506  OTF_KeyValueList *list );
507 
508 /* # OTF_BEGINCOLLOPSNAPSHOT_RECORD */
509 typedef int (OTF_Handler_BeginCollopSnapshot) ( void* userData,
510  uint64_t time,
511  uint64_t originaltime,
512  uint32_t process,
513  uint32_t collOp,
514  uint64_t matchingId,
515  uint32_t procGroup,
516  uint32_t rootProc,
517  uint64_t sent,
518  uint64_t received,
519  uint32_t scltoken,
520  OTF_KeyValueList *list );
521 
522 /* # OTF_BEGINFILEOPSNAPSHOT_RECORD */
523 typedef int (OTF_Handler_BeginFileOpSnapshot) ( void* userData,
524  uint64_t time,
525  uint64_t originaltime,
526  uint32_t process,
527  uint64_t matchingId,
528  uint32_t scltoken,
529  OTF_KeyValueList *list );
530 
531 
532 /* typedefs for OTF summary records **************************************** */
533 
534 
535 /* # OTF_SUMMARYCOMMENT_RECORD */
536 typedef int (OTF_Handler_SummaryComment) ( void* userData,
537  uint64_t time,
538  uint32_t process,
539  const char* comment,
540  OTF_KeyValueList *list );
541 
542 /* # OTF_FUNCTIONSUMMARY_RECORD */
543 typedef int (OTF_Handler_FunctionSummary) ( void* userData,
544  uint64_t time,
545  uint32_t function,
546  uint32_t process,
547  uint64_t invocations,
548  uint64_t exclTime,
549  uint64_t inclTime,
550  OTF_KeyValueList *list );
551 
552 /* # OTF_FUNCTIONGROUPSUMMARY_RECORD */
553 typedef int (OTF_Handler_FunctionGroupSummary) ( void* userData,
554  uint64_t time,
555  uint32_t funcGroup,
556  uint32_t process,
557  uint64_t invocations,
558  uint64_t exclTime,
559  uint64_t inclTime,
560  OTF_KeyValueList *list );
561 
562 /* # OTF_MESSAGESUMMARY_RECORD */
563 typedef int (OTF_Handler_MessageSummary) ( void* userData,
564  uint64_t time,
565  uint32_t process,
566  uint32_t peer,
567  uint32_t comm,
568  uint32_t type,
569  uint64_t sentNumber,
570  uint64_t receivedNumber,
571  uint64_t sentBytes,
572  uint64_t receivedBytes,
573  OTF_KeyValueList *list );
574 
575 /* # OTF_COLLOPSUMMARY_RECORD */
576 typedef int (OTF_Handler_CollopSummary) ( void *userData,
577  uint64_t time,
578  uint32_t process,
579  uint32_t comm,
580  uint32_t collective,
581  uint64_t sentNumber,
582  uint64_t receivedNumber,
583  uint64_t sentBytes,
584  uint64_t receivedBytes,
585  OTF_KeyValueList *list );
586 
587 /* # OTF_FILEOPERATIONSUMMARY_RECORD */
588 typedef int (OTF_Handler_FileOperationSummary) ( void* userData,
589  uint64_t time,
590  uint32_t fileid,
591  uint32_t process,
592  uint64_t nopen,
593  uint64_t nclose,
594  uint64_t nread,
595  uint64_t nwrite,
596  uint64_t nseek,
597  uint64_t bytesread,
598  uint64_t byteswrite,
599  OTF_KeyValueList *list );
600 
601 /* # OTF_FILEGROUPOPERATIONSUMMARY_RECORD */
602 typedef int (OTF_Handler_FileGroupOperationSummary) ( void* userData,
603  uint64_t time,
604  uint32_t groupid,
605  uint32_t process,
606  uint64_t nopen,
607  uint64_t nclose,
608  uint64_t nread,
609  uint64_t nwrite,
610  uint64_t nseek,
611  uint64_t bytesread,
612  uint64_t byteswrite,
613  OTF_KeyValueList *list );
614 
615 /* # OTF_UNKNOWN_RECORD */
616 typedef int (OTF_Handler_UnknownRecord) ( void *userData,
617  uint64_t time,
618  uint32_t process,
619  const char *record );
620 
621 
622 /* typedefs for OTF marker records **************************************** */
623 
624 
625 /* # OTF_DEFMARKER_RECORD */
626 typedef int (OTF_Handler_DefMarker) ( void *userData,
627  uint32_t stream,
628  uint32_t token,
629  const char* name,
630  uint32_t type,
631  OTF_KeyValueList *list );
632 
633 /* # OTF_MARKER_RECORD */
634 typedef int (OTF_Handler_Marker) ( void *userData,
635  uint64_t time,
636  uint32_t process,
637  uint32_t token,
638  const char* text,
639  OTF_KeyValueList *list );
640 
641 /** @endcond */
642 
643 #ifdef __cplusplus
644 }
645 #endif /* __cplusplus */
646 
647 #endif /* OTF_HANDLERARRAY_H */
648 
int OTF_Handler_DefFunction(void *userData, uint32_t stream, uint32_t func, const char *name, uint32_t funcGroup, uint32_t source, OTF_KeyValueList *list)
Provides a function definition.
OTF_HandlerArray * OTF_HandlerArray_open(void)
Open a new array of handlers.
Definition: OTF_HandlerArray.c:58
int OTF_Handler_Counter(void *userData, uint64_t time, uint32_t process, uint32_t counter, uint64_t value, OTF_KeyValueList *list)
Provides a counter measurement.
int OTF_Handler_SendMsg(void *userData, uint64_t time, uint32_t sender, uint32_t receiver, uint32_t group, uint32_t type, uint32_t length, uint32_t source, OTF_KeyValueList *list)
Provides a message send event.
int OTF_Handler_FileOperationSummary(void *userData, 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)
Provides summarized information about file operations.
int OTF_Handler_Leave(void *userData, uint64_t time, uint32_t function, uint32_t process, uint32_t source, OTF_KeyValueList *list)
Provides a function leave event.
int OTF_Handler_FileOperation(void *userData, 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)
Provides a file operation event NOTE: this is experimental.
int OTF_Handler_SendSnapshot(void *userData, uint64_t time, uint64_t originaltime, uint32_t sender, uint32_t receiver, uint32_t procGroup, uint32_t tag, uint32_t length, uint32_t source, OTF_KeyValueList *list)
provides information about a past message send operation at the time 'originaltime'.
int OTF_Handler_DefTimeRange(void *userData, uint32_t stream, uint64_t minTime, uint64_t maxTime, OTF_KeyValueList *list)
Provides a TimeRange definition.
int OTF_Handler_DefFunctionGroup(void *userData, uint32_t stream, uint32_t funcGroup, const char *name, OTF_KeyValueList *list)
Provides a function group definition.
int OTF_Handler_FunctionGroupSummary(void *userData, uint64_t time, uint32_t funcGroup, uint32_t process, uint64_t invocations, uint64_t exclTime, uint64_t inclTime, OTF_KeyValueList *list)
Provides summarized information for a given group of functiongroups.
int OTF_Handler_DefProcessOrGroupAttributes(void *userData, uint32_t stream, uint32_t proc_token, uint32_t attr_token, OTF_KeyValueList *list)
Provides a process or group attributes definition.
int OTF_Handler_EndCollectiveOperation(void *userData, uint64_t time, uint32_t process, uint64_t matchingId, OTF_KeyValueList *list)
Provides an end collective operation member event.
int OTF_Handler_EventComment(void *userData, uint64_t time, uint32_t process, const char *comment, OTF_KeyValueList *list)
Provide a comment record.
void ** firsthandlerarg
Array of first handler arguments.
Definition: OTF_HandlerArray.h:58
int OTF_Handler_DefCounterAssignments(void *userData, uint32_t stream, uint32_t counter, uint32_t number_of_members, const uint32_t *procs_or_groups, OTF_KeyValueList *list)
Provides a CounterAssignments definition.
int OTF_HandlerArray_setHandler(OTF_HandlerArray *handlers, OTF_FunctionPointer *pointer, uint32_t recordtype)
Assign the function pointer to your own handler of the given record type.
Definition: OTF_HandlerArray.c:129
int( OTF_FunctionPointer)(void *userData)
Generic function pointer for OTF record handlers.
Definition: OTF_HandlerArray.h:48
int OTF_Handler_BeginProcess(void *userData, uint64_t time, uint32_t process, OTF_KeyValueList *list)
Provides a process creation event.
int OTF_Handler_RMAGet(void *userData, uint64_t time, uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, uint64_t bytes, uint32_t source, OTF_KeyValueList *list)
Provides a RMA get event - end marker is anticipated on initiating Process.
int OTF_HandlerArray_getCopyHandler_stream(OTF_HandlerArray *handlers, OTF_WStream *writer)
Provide copy handlers to every record type for OTF streams.
Definition: OTF_HandlerArray.c:499
int OTF_Handler_DefCounterGroup(void *userData, uint32_t stream, uint32_t counterGroup, const char *name, OTF_KeyValueList *list)
Provides a counter group definition.
int OTF_Handler_Marker(void *userData, uint64_t time, uint32_t process, uint32_t token, const char *text, OTF_KeyValueList *list)
Define a marker.
int OTF_Handler_DefMarker(void *userData, uint32_t stream, uint32_t token, const char *name, uint32_t type, OTF_KeyValueList *list)
Define a marker.
int OTF_Handler_RMAEnd(void *userData, uint64_t time, uint32_t process, uint32_t remote, uint32_t communicator, uint32_t tag, uint32_t source, OTF_KeyValueList *list)
Provide a RMA end event.
int OTF_Handler_NoOp(void *userData, uint64_t time, uint32_t process, OTF_KeyValueList *list)
Provides a no-operation event.
int OTF_Handler_UnknownRecord(void *userData, uint64_t time, uint32_t process, const char *record)
Can be used to handle records which cannot be read.
int OTF_Handler_FileGroupOperationSummary(void *userData, 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)
Provides summarized information about file operations in a file group.
int OTF_Handler_RecvMsg(void *userData, uint64_t time, uint32_t recvProc, uint32_t sendProc, uint32_t group, uint32_t type, uint32_t length, uint32_t source, OTF_KeyValueList *list)
Provides a message retrieval event.
int OTF_Handler_DefKeyValue(void *userData, uint32_t stream, uint32_t key, OTF_Type type, const char *name, const char *description, OTF_KeyValueList *list)
Provides a KeyValue definition.
int OTF_Handler_SummaryComment(void *userData, uint64_t time, uint32_t process, const char *comment, OTF_KeyValueList *list)
Provides a summary comment.
Object structure which holds OTF record handlers.
Definition: OTF_HandlerArray.h:52
int OTF_Handler_EndProcess(void *userData, uint64_t time, uint32_t process, OTF_KeyValueList *list)
Provides a process destruction event.
int OTF_Handler_BeginCollectiveOperation(void *userData, 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)
Provides a begin collective operation member event.
int OTF_Handler_DefinitionComment(void *userData, uint32_t stream, const char *comment, OTF_KeyValueList *list)
Provides a comment record.
int OTF_Handler_DefProcessGroup(void *userData, uint32_t stream, uint32_t procGroup, const char *name, uint32_t numberOfProcs, const uint32_t *procs, OTF_KeyValueList *list)
Provides a process group definition.
int OTF_HandlerArray_getCopyHandler(OTF_HandlerArray *handlers, OTF_Writer *writer)
Provide copy handlers to every record type.
Definition: OTF_HandlerArray.c:165
enum OTF_ATTR_TYPE_enum OTF_ATTR_TYPE
An enum which holds all values that are possible to set with datatype OTF_ATTR_TYPE().
enum OTF_Type_enum OTF_Type
An enum which holds all OTF datatypes that are relevant for OTF_KeyValueList.
int OTF_Handler_RMAPutRemoteEnd(void *userData, uint64_t time, uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, uint64_t bytes, uint32_t source, OTF_KeyValueList *list)
Provides a RMA put event with remote finalization marker, i.e.
int OTF_Handler_DefVersion(void *userData, uint32_t stream, uint8_t major, uint8_t minor, uint8_t sub, const char *string, OTF_KeyValueList *list)
Provides information on the trace“s otf-version.
int OTF_Handler_DefCounter(void *userData, uint32_t stream, uint32_t counter, const char *name, uint32_t properties, uint32_t counterGroup, const char *unit, OTF_KeyValueList *list)
Provides a counter definition.
int OTF_Handler_DefScl(void *userData, uint32_t stream, uint32_t source, uint32_t sourceFile, uint32_t line, OTF_KeyValueList *list)
Provides a source code location (SCL).
int OTF_Handler_DefCollectiveOperation(void *userData, uint32_t stream, uint32_t collOp, const char *name, uint32_t type, OTF_KeyValueList *list)
Provides a collective operation definition.
int OTF_Handler_DefCreator(void *userData, uint32_t stream, const char *creator, OTF_KeyValueList *list)
Provides file creator information.
int OTF_Handler_OpenFileSnapshot(void *userData, uint64_t time, uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid, uint32_t source, OTF_KeyValueList *list)
Provides a snapshot record for opened(and not yet closed) files.
int OTF_Handler_FunctionSummary(void *userData, uint64_t time, uint32_t function, uint32_t process, uint64_t invocations, uint64_t exclTime, uint64_t inclTime, OTF_KeyValueList *list)
Provides summarized information for a given function.
Provides write access to trace streams, which consist of multiple buffers.
int OTF_Handler_DefTimerResolution(void *userData, uint32_t stream, uint64_t ticksPerSecond, OTF_KeyValueList *list)
Provides the timer resolution.
int OTF_Handler_BeginFileOperation(void *userData, uint64_t time, uint32_t process, uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList *list)
Write a begin file operation record.
int OTF_HandlerArray_close(OTF_HandlerArray *handlers)
Close and delete a OTF_HandlerArray object.
Definition: OTF_HandlerArray.c:108
int OTF_Handler_DefSclFile(void *userData, uint32_t stream, uint32_t sourceFile, const char *name, OTF_KeyValueList *list)
Provides a source code location (SCL) file.
int OTF_Handler_EndFileOperation(void *userData, 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 an end file operation record.
Definition: OTF_WStream.h:95
int OTF_Handler_Enter(void *userData, uint64_t time, uint32_t function, uint32_t process, uint32_t source, OTF_KeyValueList *list)
Provides a function entry event.
int OTF_HandlerArray_setFirstHandlerArg(OTF_HandlerArray *handlers, void *firsthandlerarg, uint32_t recordtype)
Assign the first argument to your own handler of the given record type.
Definition: OTF_HandlerArray.c:147
struct OTF_KeyValueList_struct OTF_KeyValueList
Object type which holds a key-value list.
Definition: OTF_KeyValue.h:242
int OTF_Handler_DefAttributeList(void *userData, uint32_t stream, uint32_t attr_token, uint32_t num, OTF_ATTR_TYPE *array, OTF_KeyValueList *list)
Provides a list of attributes that is assigned to a unique token.
Holds the data objects needed for global trace creation.
Definition: OTF_Writer.c:21
Transparently writes OTF traces which consist of multiple streams.
int OTF_Handler_DefFileGroup(void *userData, uint32_t stream, uint32_t token, const char *name, OTF_KeyValueList *list)
Provides a file group definition NOTE: this is experimental.
int OTF_Handler_DefFile(void *userData, uint32_t stream, uint32_t token, const char *name, uint32_t group, OTF_KeyValueList *list)
Provides a file definition NOTE: this is experimental.
int OTF_Handler_MessageSummary(void *userData, uint64_t time, uint32_t process, uint32_t peer, uint32_t comm, uint32_t type, uint64_t sentNumber, uint64_t receivedNumber, uint64_t sentBytes, uint64_t receivedBytes, OTF_KeyValueList *list)
Provides summarized information for a given message type.
int OTF_Handler_CollectiveOperation(void *userData, uint64_t time, uint32_t process, uint32_t collective, uint32_t procGroup, uint32_t rootProc, uint32_t sent, uint32_t received, uint64_t duration, uint32_t source, OTF_KeyValueList *list)
Provides a collective operation member event.
int OTF_Handler_RMAPut(void *userData, uint64_t time, uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, uint64_t bytes, uint32_t source, OTF_KeyValueList *list)
Provides a RMA put event - end marker is anticipated on initiating Process.
int OTF_Handler_DefProcess(void *userData, uint32_t stream, uint32_t process, const char *name, uint32_t parent, OTF_KeyValueList *list)
Provides a process definition.
int OTF_Handler_BeginFileOpSnapshot(void *userData, uint64_t time, uint64_t originaltime, uint32_t process, uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList *list)
int OTF_Handler_BeginCollopSnapshot(void *userData, 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)
Provides a snapshot record for unfinished collective operations.
int OTF_Handler_EnterSnapshot(void *userData, uint64_t time, uint64_t originaltime, uint32_t function, uint32_t process, uint32_t source, OTF_KeyValueList *list)
provides information about a past function call at the time 'originaltime'.
int OTF_Handler_SnapshotComment(void *userData, uint64_t time, uint32_t process, const char *comment, OTF_KeyValueList *list)
Provides a snapshot comment.
OTF_FunctionPointer ** pointer
Array of function pointer.
Definition: OTF_HandlerArray.h:55
int OTF_Handler_CollopSummary(void *userData, uint64_t time, uint32_t process, uint32_t comm, uint32_t collective, uint64_t sentNumber, uint64_t receivedNumber, uint64_t sentBytes, uint64_t receivedBytes, OTF_KeyValueList *list)
Provides summarized information for collective operations.