6 #ifndef PYOTF_WRAPPER_H
7 #define PYOTF_WRAPPER_H
21 int pyOTF_COUNTER_VARTYPE_ISINTEGER( uint64_t x );
23 int pyOTF_COUNTER_VARTYPE_ISSIGNED( uint64_t x );
25 int pyOTF_COUNTER_VARTYPE_ISUNSIGNED( uint64_t x );
29 uint32_t l, PyObject* values );
34 int pyOTF_HandlerArray_setHandler(
OTF_HandlerArray* handlers, PyObject*
function, uint32_t recordtype );
36 int pyOTF_HandlerArray_setFirstHandlerArg(
OTF_HandlerArray* handlers, PyObject* fha, uint32_t recordtype );
40 uint8_t pyOTF_KeyValueList_appendByteArray(
OTF_KeyValueList* kvlist, uint32_t key, PyObject* values, uint32_t len);
42 PyObject* pyOTF_KeyValueList_getByteArray(
OTF_KeyValueList* kvlist, uint32_t key);
47 int pyOTF_Writer_writeDefProcessGroupKV(
OTF_Writer* writer, uint32_t stream,
48 uint32_t procGroup,
const char* name, uint32_t numberOfProcs,
51 int pyOTF_Writer_writeDefProcessGroup(
OTF_Writer* writer, uint32_t stream,
52 uint32_t procGroup,
const char* name, uint32_t numberOfProcs,
55 int pyOTF_Writer_writeDefAttributeListKV(
OTF_Writer* writer, uint32_t stream,
56 uint32_t attr_token, uint32_t num, PyObject* array,
59 int pyOTF_Writer_writeDefAttributeList(
OTF_Writer* writer, uint32_t stream,
60 uint32_t attr_token, uint32_t num, PyObject* array);
66 int pyOTF_Handler_DefinitionComment(
void* userData, uint32_t stream,
70 int pyOTF_Handler_DefTimerResolution(
void* userData, uint32_t stream,
74 int pyOTF_Handler_DefProcess(
void* userData, uint32_t stream,
75 uint32_t process,
const char* name, uint32_t parent,
79 int pyOTF_Handler_DefProcessGroup(
void* userData, uint32_t stream,
80 uint32_t procGroup,
const char* name, uint32_t numberOfProcs,
84 int pyOTF_Handler_DefAttributeList(
void* userData, uint32_t stream,
89 int pyOTF_Handler_DefProcessOrGroupAttributes(
void* userData, uint32_t stream,
93 int pyOTF_Handler_DefFunction(
void* userData, uint32_t stream,
94 uint32_t func,
const char* name, uint32_t funcGroup,
98 int pyOTF_Handler_DefFunctionGroup(
void* userData, uint32_t stream,
102 int pyOTF_Handler_DefCollectiveOperation(
void* userData, uint32_t stream,
103 uint32_t collOp,
const char* name, uint32_t type,
107 int pyOTF_Handler_DefCounter(
void* userData, uint32_t stream,
108 uint32_t counter,
const char* name, uint32_t properties,
112 int pyOTF_Handler_DefCounterGroup(
void* userData, uint32_t stream,
116 int pyOTF_Handler_DefScl(
void* userData, uint32_t stream,
117 uint32_t source, uint32_t sourceFile, uint32_t line,
121 int pyOTF_Handler_DefSclFile(
void* userData, uint32_t stream,
125 int pyOTF_Handler_DefCreator(
void* userData, uint32_t stream,
129 int pyOTF_Handler_DefVersion(
void* userData, uint32_t stream,
130 uint8_t major, uint8_t minor, uint8_t sub,
134 int pyOTF_Handler_DefFile(
void* userData, uint32_t stream,
135 uint32_t token,
const char *name, uint32_t group,
139 int pyOTF_Handler_DefFileGroup(
void* userData, uint32_t stream,
143 int pyOTF_Handler_DefKeyValue(
void* userData, uint32_t stream,
144 uint32_t key,
OTF_Type type,
const char *name,
148 int pyOTF_Handler_NoOp(
void* userData, uint64_t time,
152 int pyOTF_Handler_Enter(
void* userData, uint64_t time,
153 uint32_t
function, uint32_t process, uint32_t source,
157 int pyOTF_Handler_Leave(
void* userData, uint64_t time,
158 uint32_t
function, uint32_t process, uint32_t source,
162 int pyOTF_Handler_SendMsg(
void* userData, uint64_t time,
163 uint32_t sender, uint32_t receiver, uint32_t group,
164 uint32_t type, uint32_t length, uint32_t source,
168 int pyOTF_Handler_RecvMsg(
void* userData, uint64_t time,
169 uint32_t recvProc, uint32_t sendProc, uint32_t group,
170 uint32_t type, uint32_t length, uint32_t source,
174 int pyOTF_Handler_Counter(
void* userData, uint64_t time,
175 uint32_t process, uint32_t counter, uint64_t value,
179 int pyOTF_Handler_CollectiveOperation(
void* userData, uint64_t time,
180 uint32_t process, uint32_t collective, uint32_t procGroup,
181 uint32_t rootProc, uint32_t sent, uint32_t received,
185 int pyOTF_Handler_BeginCollectiveOperation(
void* userData, uint64_t time,
186 uint32_t process, uint32_t collOp, uint64_t matchingId,
187 uint32_t procGroup, uint32_t rootProc, uint64_t sent,
191 int pyOTF_Handler_EndCollectiveOperation(
void* userData, uint64_t time,
195 int pyOTF_Handler_EventComment(
void* userData, uint64_t time,
199 int pyOTF_Handler_BeginProcess(
void* userData, uint64_t time,
203 int pyOTF_Handler_EndProcess(
void* userData, uint64_t time,
207 int pyOTF_Handler_FileOperation(
void* userData, uint64_t time,
208 uint32_t fileid, uint32_t process, uint64_t handleid,
209 uint32_t operation, uint64_t bytes, uint64_t duration,
213 int pyOTF_Handler_BeginFileOperation(
void* userData, uint64_t time,
214 uint32_t process, uint64_t matchingId, uint32_t scltoken,
218 int pyOTF_Handler_EndFileOperation(
void* userData, uint64_t time,
219 uint32_t process, uint32_t fileid, uint64_t matchingId,
220 uint64_t handleId, uint32_t operation, uint64_t bytes,
224 int pyOTF_Handler_RMAPut(
void* userData, uint64_t time,
225 uint32_t process, uint32_t origin, uint32_t target,
226 uint32_t communicator, uint32_t tag, uint64_t bytes,
230 int pyOTF_Handler_RMAPutRemoteEnd(
void* userData, uint64_t time,
231 uint32_t process, uint32_t origin, uint32_t target,
232 uint32_t communicator, uint32_t tag, uint64_t bytes,
236 int pyOTF_Handler_RMAGet(
void* userData, uint64_t time,
237 uint32_t process, uint32_t origin, uint32_t target,
238 uint32_t communicator, uint32_t tag, uint64_t bytes,
242 int pyOTF_Handler_RMAEnd(
void* userData, uint64_t time,
243 uint32_t process, uint32_t remote, uint32_t communicator,
247 int pyOTF_Handler_SnapshotComment(
void* userData, uint64_t time,
251 int pyOTF_Handler_EnterSnapshot(
void *userData, uint64_t time,
252 uint64_t originaltime, uint32_t
function, uint32_t process,
256 int pyOTF_Handler_SendSnapshot(
void *userData, uint64_t time,
257 uint64_t originaltime, uint32_t sender, uint32_t receiver,
258 uint32_t procGroup, uint32_t tag, uint32_t length,
262 int pyOTF_Handler_OpenFileSnapshot(
void* userData, uint64_t time,
263 uint64_t originaltime, uint32_t fileid, uint32_t process,
267 int pyOTF_Handler_BeginCollopSnapshot(
void* userData, uint64_t time,
268 uint64_t originaltime, uint32_t process, uint32_t collOp,
269 uint64_t matchingId, uint32_t procGroup, uint32_t rootProc,
270 uint64_t sent, uint64_t received, uint32_t scltoken,
274 int pyOTF_Handler_BeginFileOpSnapshot(
void* userData, uint64_t time,
275 uint64_t originaltime, uint32_t process, uint64_t matchingId,
279 int pyOTF_Handler_SummaryComment(
void* userData, uint64_t time,
283 int pyOTF_Handler_FunctionSummary(
void* userData, uint64_t time,
284 uint32_t
function, uint32_t process, uint64_t invocations,
288 int pyOTF_Handler_FunctionGroupSummary(
void* userData, uint64_t time,
289 uint32_t funcGroup, uint32_t process, uint64_t invocations,
293 int pyOTF_Handler_MessageSummary(
void* userData, uint64_t time,
294 uint32_t process, uint32_t peer, uint32_t comm,
295 uint32_t type, uint64_t sentNumber, uint64_t receivedNumber,
299 int pyOTF_Handler_CollopSummary(
void *userData, uint64_t time,
300 uint32_t process, uint32_t comm, uint32_t collective,
301 uint64_t sentNumber, uint64_t receivedNumber, uint64_t sentBytes,
305 int pyOTF_Handler_FileOperationSummary(
void* userData, uint64_t time,
306 uint32_t fileid, uint32_t process, uint64_t nopen,
307 uint64_t nclose, uint64_t nread, uint64_t nwrite,
308 uint64_t nseek, uint64_t bytesread, uint64_t byteswrite,
312 int pyOTF_Handler_FileGroupOperationSummary(
void* userData, uint64_t time,
313 uint32_t groupid, uint32_t process, uint64_t nopen,
314 uint64_t nclose, uint64_t nread, uint64_t nwrite,
315 uint64_t nseek, uint64_t bytesread, uint64_t byteswrite,
319 int pyOTF_Handler_UnknownRecord(
void *userData, uint64_t time,
320 uint32_t process,
const char *record );
323 int pyOTF_Handler_DefMarker(
void *userData, uint32_t stream,
324 uint32_t token,
const char* name, uint32_t type,
328 int pyOTF_Handler_Marker(
void *userData, uint64_t time,
329 uint32_t process, uint32_t token,
const char* text,
337 int pyOTF_COUNTER_VARTYPE_ISINTEGER( uint64_t x ) {
338 return OTF_COUNTER_VARTYPE_ISINTEGER(x);
341 int pyOTF_COUNTER_VARTYPE_ISSIGNED( uint64_t x ) {
342 return OTF_COUNTER_VARTYPE_ISSIGNED(x);
345 int pyOTF_COUNTER_VARTYPE_ISUNSIGNED( uint64_t x ) {
346 return OTF_COUNTER_VARTYPE_ISUNSIGNED(x);
353 uint32_t l, PyObject* values ) {
357 uint32_t* vals= createInt32ArrayFromSequence( values );
372 uint8_t pyOTF_KeyValueList_appendByteArray(
OTF_KeyValueList* kvlist, uint32_t key, PyObject* values, uint32_t len) {
378 array = createInt8ArrayFromSequence( values );
389 PyObject* pyOTF_KeyValueList_getByteArray(
OTF_KeyValueList* kvlist, uint32_t key) {
393 uint8_t array[OTF_KEYVALUE_MAX_ARRAY_LEN];
398 pyarray = PyInt_FromLong(ret);
405 pyarray = SWIG_Python_AppendOutput(pyarray, PyInt_FromLong(len) );
408 pyarray = SWIG_Python_AppendOutput(pyarray, createSequenceFromInt8Array( array, len) );
416 int pyOTF_Writer_writeDefProcessGroupKV(
OTF_Writer* writer, uint32_t stream,
417 uint32_t procGroup,
const char* name, uint32_t numberOfProcs,
422 uint32_t* pyprocs= createInt32ArrayFromSequence( procs );
426 procGroup, name, numberOfProcs,
434 int pyOTF_Writer_writeDefProcessGroup(
OTF_Writer* writer, uint32_t stream,
435 uint32_t procGroup,
const char* name, uint32_t numberOfProcs,
440 uint32_t* pyprocs= createInt32ArrayFromSequence( procs );
444 procGroup, name, numberOfProcs,
452 int pyOTF_Writer_writeDefAttributeListKV(
OTF_Writer* writer, uint32_t stream,
453 uint32_t attr_token, uint32_t num, PyObject* array,
458 OTF_ATTR_TYPE* pyarray= createInt32ArrayFromSequence( array );
462 attr_token, num, pyarray,
470 int pyOTF_Writer_writeDefAttributeList(
OTF_Writer* writer, uint32_t stream,
471 uint32_t attr_token, uint32_t num, PyObject* array) {
475 OTF_ATTR_TYPE* pyarray= createInt32ArrayFromSequence( array );
479 attr_token, num, pyarray);
506 int pyOTF_Handler_DefinitionComment(
void* userData, uint32_t stream,
517 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
519 arglist= Py_BuildValue(
"OHsO", fha->realfha, stream,
522 result= PyEval_CallObject(fha->func, arglist);
528 ret= (int) PyInt_AsLong( result );
530 if( NULL == PyErr_Occurred() ){
542 int pyOTF_Handler_DefTimerResolution(
void* userData, uint32_t stream,
553 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
555 arglist= Py_BuildValue(
"OHKO", fha->realfha, stream,
556 ticksPerSecond, pylist );
558 result= PyEval_CallObject(fha->func, arglist);
564 ret= (int) PyInt_AsLong( result );
566 if( NULL == PyErr_Occurred() ){
578 int pyOTF_Handler_DefProcess(
void* userData, uint32_t stream,
579 uint32_t process,
const char* name, uint32_t parent,
590 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
592 arglist= Py_BuildValue(
"OHHsHO", fha->realfha, stream,
593 process, name, parent,
596 result= PyEval_CallObject(fha->func, arglist);
602 ret= (int) PyInt_AsLong( result );
604 if( NULL == PyErr_Occurred() ){
616 int pyOTF_Handler_DefProcessGroup(
void* userData, uint32_t stream,
617 uint32_t procGroup,
const char* name, uint32_t numberOfProcs,
631 pyprocs= PyList_New( numberOfProcs );
632 for( i= 0; i < numberOfProcs; ++i ) {
634 PyList_SetItem( pyprocs, i, PyInt_FromLong((
long) procs[i]) );
639 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
641 arglist= Py_BuildValue(
"OHHsHOO", fha->realfha, stream,
642 procGroup, name, numberOfProcs,
645 result= PyEval_CallObject(fha->func, arglist);
651 ret= (int) PyInt_AsLong( result );
653 if( NULL == PyErr_Occurred() ){
665 int pyOTF_Handler_DefAttributeList(
void* userData, uint32_t stream,
680 pyarray= PyList_New( num );
681 for( i= 0; i < num; ++i ) {
683 PyList_SetItem( pyarray, i, PyInt_FromLong((
long) array[i]) );
688 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
690 arglist= Py_BuildValue(
"OHHHOO", fha->realfha, stream,
691 attr_token, num, pyarray,
694 result= PyEval_CallObject(fha->func, arglist);
700 ret= (int) PyInt_AsLong( result );
702 if( NULL == PyErr_Occurred() ){
714 int pyOTF_Handler_DefProcessOrGroupAttributes(
void* userData, uint32_t stream,
725 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
727 arglist= Py_BuildValue(
"OHHHO", fha->realfha, stream,
728 proc_token, attr_token, pylist );
730 result= PyEval_CallObject(fha->func, arglist);
736 ret= (int) PyInt_AsLong( result );
738 if( NULL == PyErr_Occurred() ){
750 int pyOTF_Handler_DefFunction(
void* userData, uint32_t stream,
751 uint32_t func,
const char* name, uint32_t funcGroup,
762 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
764 arglist= Py_BuildValue(
"OHHsHHO", fha->realfha, stream,
765 func, name, funcGroup,
768 result= PyEval_CallObject(fha->func, arglist);
774 ret= (int) PyInt_AsLong( result );
776 if( NULL == PyErr_Occurred() ){
788 int pyOTF_Handler_DefFunctionGroup(
void* userData, uint32_t stream,
799 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
801 arglist= Py_BuildValue(
"OHHsO", fha->realfha, stream,
802 funcGroup, name, pylist );
804 result= PyEval_CallObject(fha->func, arglist);
810 ret= (int) PyInt_AsLong( result );
812 if( NULL == PyErr_Occurred() ){
824 int pyOTF_Handler_DefCollectiveOperation(
void* userData, uint32_t stream,
825 uint32_t collOp,
const char* name, uint32_t type,
836 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
838 arglist= Py_BuildValue(
"OHHsHO", fha->realfha, stream,
842 result= PyEval_CallObject(fha->func, arglist);
848 ret= (int) PyInt_AsLong( result );
850 if( NULL == PyErr_Occurred() ){
862 int pyOTF_Handler_DefCounter(
void* userData, uint32_t stream,
863 uint32_t counter,
const char* name, uint32_t properties,
874 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
876 arglist= Py_BuildValue(
"OHHsHHsO", fha->realfha, stream,
877 counter, name, properties,
878 counterGroup, unit, pylist );
880 result= PyEval_CallObject(fha->func, arglist);
886 ret= (int) PyInt_AsLong( result );
888 if( NULL == PyErr_Occurred() ){
900 int pyOTF_Handler_DefCounterGroup(
void* userData, uint32_t stream,
911 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
913 arglist= Py_BuildValue(
"OHHsO", fha->realfha, stream,
914 counterGroup, name, pylist );
916 result= PyEval_CallObject(fha->func, arglist);
922 ret= (int) PyInt_AsLong( result );
924 if( NULL == PyErr_Occurred() ){
936 int pyOTF_Handler_DefScl(
void* userData, uint32_t stream,
937 uint32_t source, uint32_t sourceFile, uint32_t line,
948 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
950 arglist= Py_BuildValue(
"OHHHHO", fha->realfha, stream,
951 source, sourceFile, line,
954 result= PyEval_CallObject(fha->func, arglist);
960 ret= (int) PyInt_AsLong( result );
962 if( NULL == PyErr_Occurred() ){
974 int pyOTF_Handler_DefSclFile(
void* userData, uint32_t stream,
985 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
987 arglist= Py_BuildValue(
"OHHsO", fha->realfha, stream,
988 sourceFile, name, pylist );
990 result= PyEval_CallObject(fha->func, arglist);
996 ret= (int) PyInt_AsLong( result );
998 if( NULL == PyErr_Occurred() ){
1010 int pyOTF_Handler_DefCreator(
void* userData, uint32_t stream,
1021 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1023 arglist= Py_BuildValue(
"OHsO", fha->realfha, stream,
1026 result= PyEval_CallObject(fha->func, arglist);
1032 ret= (int) PyInt_AsLong( result );
1034 if( NULL == PyErr_Occurred() ){
1046 int pyOTF_Handler_DefVersion(
void* userData, uint32_t stream,
1047 uint8_t major, uint8_t minor, uint8_t sub,
1058 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1060 arglist= Py_BuildValue(
"OHHHHsO", fha->realfha, stream,
1064 result= PyEval_CallObject(fha->func, arglist);
1070 ret= (int) PyInt_AsLong( result );
1072 if( NULL == PyErr_Occurred() ){
1084 int pyOTF_Handler_DefFile(
void* userData, uint32_t stream,
1085 uint32_t token,
const char *name, uint32_t group,
1096 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1098 arglist= Py_BuildValue(
"OHHsHO", fha->realfha, stream,
1102 result= PyEval_CallObject(fha->func, arglist);
1108 ret= (int) PyInt_AsLong( result );
1110 if( NULL == PyErr_Occurred() ){
1122 int pyOTF_Handler_DefFileGroup(
void* userData, uint32_t stream,
1133 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1135 arglist= Py_BuildValue(
"OHHsO", fha->realfha, stream,
1136 token, name, pylist );
1138 result= PyEval_CallObject(fha->func, arglist);
1144 ret= (int) PyInt_AsLong( result );
1146 if( NULL == PyErr_Occurred() ){
1158 int pyOTF_Handler_DefKeyValue(
void* userData, uint32_t stream,
1159 uint32_t key,
OTF_Type type,
const char *name,
1170 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1172 arglist= Py_BuildValue(
"OHHHssO", fha->realfha, stream,
1174 description, pylist );
1176 result= PyEval_CallObject(fha->func, arglist);
1182 ret= (int) PyInt_AsLong( result );
1184 if( NULL == PyErr_Occurred() ){
1196 int pyOTF_Handler_NoOp(
void* userData, uint64_t time,
1207 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1209 arglist= Py_BuildValue(
"OKHO", fha->realfha, time,
1212 result= PyEval_CallObject(fha->func, arglist);
1218 ret= (int) PyInt_AsLong( result );
1220 if( NULL == PyErr_Occurred() ){
1232 int pyOTF_Handler_Enter(
void* userData, uint64_t time,
1233 uint32_t
function, uint32_t process, uint32_t source,
1244 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1246 arglist= Py_BuildValue(
"OKHHHO", fha->realfha, time,
1247 function, process, source,
1250 result= PyEval_CallObject(fha->func, arglist);
1256 ret= (int) PyInt_AsLong( result );
1258 if( NULL == PyErr_Occurred() ){
1270 int pyOTF_Handler_Leave(
void* userData, uint64_t time,
1271 uint32_t
function, uint32_t process, uint32_t source,
1282 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1284 arglist= Py_BuildValue(
"OKHHHO", fha->realfha, time,
1285 function, process, source,
1288 result= PyEval_CallObject(fha->func, arglist);
1294 ret= (int) PyInt_AsLong( result );
1296 if( NULL == PyErr_Occurred() ){
1308 int pyOTF_Handler_SendMsg(
void* userData, uint64_t time,
1309 uint32_t sender, uint32_t receiver, uint32_t group,
1310 uint32_t type, uint32_t length, uint32_t source,
1321 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1323 arglist= Py_BuildValue(
"OKHHHHHHO", fha->realfha, time,
1324 sender, receiver, group,
1325 type, length, source,
1328 result= PyEval_CallObject(fha->func, arglist);
1334 ret= (int) PyInt_AsLong( result );
1336 if( NULL == PyErr_Occurred() ){
1348 int pyOTF_Handler_RecvMsg(
void* userData, uint64_t time,
1349 uint32_t recvProc, uint32_t sendProc, uint32_t group,
1350 uint32_t type, uint32_t length, uint32_t source,
1361 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1363 arglist= Py_BuildValue(
"OKHHHHHHO", fha->realfha, time,
1364 recvProc, sendProc, group,
1365 type, length, source,
1368 result= PyEval_CallObject(fha->func, arglist);
1374 ret= (int) PyInt_AsLong( result );
1376 if( NULL == PyErr_Occurred() ){
1388 int pyOTF_Handler_Counter(
void* userData, uint64_t time,
1389 uint32_t process, uint32_t counter, uint64_t value,
1400 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1402 arglist= Py_BuildValue(
"OKHHKO", fha->realfha, time,
1403 process, counter, value,
1406 result= PyEval_CallObject(fha->func, arglist);
1412 ret= (int) PyInt_AsLong( result );
1414 if( NULL == PyErr_Occurred() ){
1426 int pyOTF_Handler_CollectiveOperation(
void* userData, uint64_t time,
1427 uint32_t process, uint32_t collective, uint32_t procGroup,
1428 uint32_t rootProc, uint32_t sent, uint32_t received,
1439 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1441 arglist= Py_BuildValue(
"OKHHHHHHKHO", fha->realfha, time,
1442 process, collective, procGroup,
1443 rootProc, sent, received,
1444 duration, source, pylist );
1446 result= PyEval_CallObject(fha->func, arglist);
1452 ret= (int) PyInt_AsLong( result );
1454 if( NULL == PyErr_Occurred() ){
1466 int pyOTF_Handler_BeginCollectiveOperation(
void* userData, uint64_t time,
1467 uint32_t process, uint32_t collOp, uint64_t matchingId,
1468 uint32_t procGroup, uint32_t rootProc, uint64_t sent,
1479 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1481 arglist= Py_BuildValue(
"OKHHKHHKKHO", fha->realfha, time,
1482 process, collOp, matchingId,
1483 procGroup, rootProc, sent,
1484 received, scltoken, pylist );
1486 result= PyEval_CallObject(fha->func, arglist);
1492 ret= (int) PyInt_AsLong( result );
1494 if( NULL == PyErr_Occurred() ){
1506 int pyOTF_Handler_EndCollectiveOperation(
void* userData, uint64_t time,
1517 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1519 arglist= Py_BuildValue(
"OKHKO", fha->realfha, time,
1520 process, matchingId, pylist );
1522 result= PyEval_CallObject(fha->func, arglist);
1528 ret= (int) PyInt_AsLong( result );
1530 if( NULL == PyErr_Occurred() ){
1542 int pyOTF_Handler_EventComment(
void* userData, uint64_t time,
1553 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1555 arglist= Py_BuildValue(
"OKHsO", fha->realfha, time,
1556 process, comment, pylist );
1558 result= PyEval_CallObject(fha->func, arglist);
1564 ret= (int) PyInt_AsLong( result );
1566 if( NULL == PyErr_Occurred() ){
1578 int pyOTF_Handler_BeginProcess(
void* userData, uint64_t time,
1589 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1591 arglist= Py_BuildValue(
"OKHO", fha->realfha, time,
1594 result= PyEval_CallObject(fha->func, arglist);
1600 ret= (int) PyInt_AsLong( result );
1602 if( NULL == PyErr_Occurred() ){
1614 int pyOTF_Handler_EndProcess(
void* userData, uint64_t time,
1625 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1627 arglist= Py_BuildValue(
"OKHO", fha->realfha, time,
1630 result= PyEval_CallObject(fha->func, arglist);
1636 ret= (int) PyInt_AsLong( result );
1638 if( NULL == PyErr_Occurred() ){
1650 int pyOTF_Handler_FileOperation(
void* userData, uint64_t time,
1651 uint32_t fileid, uint32_t process, uint64_t handleid,
1652 uint32_t operation, uint64_t bytes, uint64_t duration,
1663 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1665 arglist= Py_BuildValue(
"OKHHKHKKHO", fha->realfha, time,
1666 fileid, process, handleid,
1667 operation, bytes, duration,
1670 result= PyEval_CallObject(fha->func, arglist);
1676 ret= (int) PyInt_AsLong( result );
1678 if( NULL == PyErr_Occurred() ){
1690 int pyOTF_Handler_BeginFileOperation(
void* userData, uint64_t time,
1691 uint32_t process, uint64_t matchingId, uint32_t scltoken,
1702 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1704 arglist= Py_BuildValue(
"OKHKHO", fha->realfha, time,
1705 process, matchingId, scltoken,
1708 result= PyEval_CallObject(fha->func, arglist);
1714 ret= (int) PyInt_AsLong( result );
1716 if( NULL == PyErr_Occurred() ){
1728 int pyOTF_Handler_EndFileOperation(
void* userData, uint64_t time,
1729 uint32_t process, uint32_t fileid, uint64_t matchingId,
1730 uint64_t handleId, uint32_t operation, uint64_t bytes,
1741 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1743 arglist= Py_BuildValue(
"OKHHKKHKHO", fha->realfha, time,
1744 process, fileid, matchingId,
1745 handleId, operation, bytes,
1748 result= PyEval_CallObject(fha->func, arglist);
1754 ret= (int) PyInt_AsLong( result );
1756 if( NULL == PyErr_Occurred() ){
1768 int pyOTF_Handler_RMAPut(
void* userData, uint64_t time,
1769 uint32_t process, uint32_t origin, uint32_t target,
1770 uint32_t communicator, uint32_t tag, uint64_t bytes,
1781 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1783 arglist= Py_BuildValue(
"OKHHHHHKHO", fha->realfha, time,
1784 process, origin, target,
1785 communicator, tag, bytes,
1788 result= PyEval_CallObject(fha->func, arglist);
1794 ret= (int) PyInt_AsLong( result );
1796 if( NULL == PyErr_Occurred() ){
1808 int pyOTF_Handler_RMAPutRemoteEnd(
void* userData, uint64_t time,
1809 uint32_t process, uint32_t origin, uint32_t target,
1810 uint32_t communicator, uint32_t tag, uint64_t bytes,
1821 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1823 arglist= Py_BuildValue(
"OKHHHHHKHO", fha->realfha, time,
1824 process, origin, target,
1825 communicator, tag, bytes,
1828 result= PyEval_CallObject(fha->func, arglist);
1834 ret= (int) PyInt_AsLong( result );
1836 if( NULL == PyErr_Occurred() ){
1848 int pyOTF_Handler_RMAGet(
void* userData, uint64_t time,
1849 uint32_t process, uint32_t origin, uint32_t target,
1850 uint32_t communicator, uint32_t tag, uint64_t bytes,
1861 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1863 arglist= Py_BuildValue(
"OKHHHHHKHO", fha->realfha, time,
1864 process, origin, target,
1865 communicator, tag, bytes,
1868 result= PyEval_CallObject(fha->func, arglist);
1874 ret= (int) PyInt_AsLong( result );
1876 if( NULL == PyErr_Occurred() ){
1888 int pyOTF_Handler_RMAEnd(
void* userData, uint64_t time,
1889 uint32_t process, uint32_t remote, uint32_t communicator,
1900 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1902 arglist= Py_BuildValue(
"OKHHHHHO", fha->realfha, time,
1903 process, remote, communicator,
1904 tag, source, pylist );
1906 result= PyEval_CallObject(fha->func, arglist);
1912 ret= (int) PyInt_AsLong( result );
1914 if( NULL == PyErr_Occurred() ){
1926 int pyOTF_Handler_SnapshotComment(
void* userData, uint64_t time,
1937 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1939 arglist= Py_BuildValue(
"OKHsO", fha->realfha, time,
1940 process, comment, pylist );
1942 result= PyEval_CallObject(fha->func, arglist);
1948 ret= (int) PyInt_AsLong( result );
1950 if( NULL == PyErr_Occurred() ){
1962 int pyOTF_Handler_EnterSnapshot(
void *userData, uint64_t time,
1963 uint64_t originaltime, uint32_t
function, uint32_t process,
1974 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
1976 arglist= Py_BuildValue(
"OKKHHHO", fha->realfha, time,
1977 originaltime,
function, process,
1980 result= PyEval_CallObject(fha->func, arglist);
1986 ret= (int) PyInt_AsLong( result );
1988 if( NULL == PyErr_Occurred() ){
2000 int pyOTF_Handler_SendSnapshot(
void *userData, uint64_t time,
2001 uint64_t originaltime, uint32_t sender, uint32_t receiver,
2002 uint32_t procGroup, uint32_t tag, uint32_t length,
2013 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
2015 arglist= Py_BuildValue(
"OKKHHHHHHO", fha->realfha, time,
2016 originaltime, sender, receiver,
2017 procGroup, tag, length,
2020 result= PyEval_CallObject(fha->func, arglist);
2026 ret= (int) PyInt_AsLong( result );
2028 if( NULL == PyErr_Occurred() ){
2040 int pyOTF_Handler_OpenFileSnapshot(
void* userData, uint64_t time,
2041 uint64_t originaltime, uint32_t fileid, uint32_t process,
2052 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
2054 arglist= Py_BuildValue(
"OKKHHKHO", fha->realfha, time,
2055 originaltime, fileid, process,
2056 handleid, source, pylist );
2058 result= PyEval_CallObject(fha->func, arglist);
2064 ret= (int) PyInt_AsLong( result );
2066 if( NULL == PyErr_Occurred() ){
2078 int pyOTF_Handler_BeginCollopSnapshot(
void* userData, uint64_t time,
2079 uint64_t originaltime, uint32_t process, uint32_t collOp,
2080 uint64_t matchingId, uint32_t procGroup, uint32_t rootProc,
2081 uint64_t sent, uint64_t received, uint32_t scltoken,
2092 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
2094 arglist= Py_BuildValue(
"OKKHHKHHKKHO", fha->realfha, time,
2095 originaltime, process, collOp,
2096 matchingId, procGroup, rootProc,
2097 sent, received, scltoken,
2100 result= PyEval_CallObject(fha->func, arglist);
2106 ret= (int) PyInt_AsLong( result );
2108 if( NULL == PyErr_Occurred() ){
2120 int pyOTF_Handler_BeginFileOpSnapshot(
void* userData, uint64_t time,
2121 uint64_t originaltime, uint32_t process, uint64_t matchingId,
2132 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
2134 arglist= Py_BuildValue(
"OKKHKHO", fha->realfha, time,
2135 originaltime, process, matchingId,
2138 result= PyEval_CallObject(fha->func, arglist);
2144 ret= (int) PyInt_AsLong( result );
2146 if( NULL == PyErr_Occurred() ){
2158 int pyOTF_Handler_SummaryComment(
void* userData, uint64_t time,
2169 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
2171 arglist= Py_BuildValue(
"OKHsO", fha->realfha, time,
2172 process, comment, pylist );
2174 result= PyEval_CallObject(fha->func, arglist);
2180 ret= (int) PyInt_AsLong( result );
2182 if( NULL == PyErr_Occurred() ){
2194 int pyOTF_Handler_FunctionSummary(
void* userData, uint64_t time,
2195 uint32_t
function, uint32_t process, uint64_t invocations,
2206 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
2208 arglist= Py_BuildValue(
"OKHHKKKO", fha->realfha, time,
2209 function, process, invocations,
2210 exclTime, inclTime, pylist );
2212 result= PyEval_CallObject(fha->func, arglist);
2218 ret= (int) PyInt_AsLong( result );
2220 if( NULL == PyErr_Occurred() ){
2232 int pyOTF_Handler_FunctionGroupSummary(
void* userData, uint64_t time,
2233 uint32_t funcGroup, uint32_t process, uint64_t invocations,
2244 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
2246 arglist= Py_BuildValue(
"OKHHKKKO", fha->realfha, time,
2247 funcGroup, process, invocations,
2248 exclTime, inclTime, pylist );
2250 result= PyEval_CallObject(fha->func, arglist);
2256 ret= (int) PyInt_AsLong( result );
2258 if( NULL == PyErr_Occurred() ){
2270 int pyOTF_Handler_MessageSummary(
void* userData, uint64_t time,
2271 uint32_t process, uint32_t peer, uint32_t comm,
2272 uint32_t type, uint64_t sentNumber, uint64_t receivedNumber,
2283 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
2285 arglist= Py_BuildValue(
"OKHHHHKKKKO", fha->realfha, time,
2286 process, peer, comm,
2287 type, sentNumber, receivedNumber,
2288 sentBytes, receivedBytes, pylist );
2290 result= PyEval_CallObject(fha->func, arglist);
2296 ret= (int) PyInt_AsLong( result );
2298 if( NULL == PyErr_Occurred() ){
2310 int pyOTF_Handler_CollopSummary(
void *userData, uint64_t time,
2311 uint32_t process, uint32_t comm, uint32_t collective,
2312 uint64_t sentNumber, uint64_t receivedNumber, uint64_t sentBytes,
2323 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
2325 arglist= Py_BuildValue(
"OKHHHKKKKO", fha->realfha, time,
2326 process, comm, collective,
2327 sentNumber, receivedNumber, sentBytes,
2328 receivedBytes, pylist );
2330 result= PyEval_CallObject(fha->func, arglist);
2336 ret= (int) PyInt_AsLong( result );
2338 if( NULL == PyErr_Occurred() ){
2350 int pyOTF_Handler_FileOperationSummary(
void* userData, uint64_t time,
2351 uint32_t fileid, uint32_t process, uint64_t nopen,
2352 uint64_t nclose, uint64_t nread, uint64_t nwrite,
2353 uint64_t nseek, uint64_t bytesread, uint64_t byteswrite,
2364 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
2366 arglist= Py_BuildValue(
"OKHHKKKKKKKO", fha->realfha, time,
2367 fileid, process, nopen,
2368 nclose, nread, nwrite,
2369 nseek, bytesread, byteswrite,
2372 result= PyEval_CallObject(fha->func, arglist);
2378 ret= (int) PyInt_AsLong( result );
2380 if( NULL == PyErr_Occurred() ){
2392 int pyOTF_Handler_FileGroupOperationSummary(
void* userData, uint64_t time,
2393 uint32_t groupid, uint32_t process, uint64_t nopen,
2394 uint64_t nclose, uint64_t nread, uint64_t nwrite,
2395 uint64_t nseek, uint64_t bytesread, uint64_t byteswrite,
2406 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
2408 arglist= Py_BuildValue(
"OKHHKKKKKKKO", fha->realfha, time,
2409 groupid, process, nopen,
2410 nclose, nread, nwrite,
2411 nseek, bytesread, byteswrite,
2414 result= PyEval_CallObject(fha->func, arglist);
2420 ret= (int) PyInt_AsLong( result );
2422 if( NULL == PyErr_Occurred() ){
2434 int pyOTF_Handler_UnknownRecord(
void *userData, uint64_t time,
2435 uint32_t process,
const char *record ) {
2444 arglist= Py_BuildValue(
"OKHs", fha->realfha, time,
2447 result= PyEval_CallObject(fha->func, arglist);
2451 ret= (int) PyInt_AsLong( result );
2453 if( NULL == PyErr_Occurred() ){
2465 int pyOTF_Handler_DefMarker(
void *userData, uint32_t stream,
2466 uint32_t token,
const char* name, uint32_t type,
2477 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
2479 arglist= Py_BuildValue(
"OHHsHO", fha->realfha, stream,
2483 result= PyEval_CallObject(fha->func, arglist);
2489 ret= (int) PyInt_AsLong( result );
2491 if( NULL == PyErr_Occurred() ){
2503 int pyOTF_Handler_Marker(
void *userData, uint64_t time,
2504 uint32_t process, uint32_t token,
const char* text,
2515 pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 );
2517 arglist= Py_BuildValue(
"OKHHsO", fha->realfha, time,
2518 process, token, text,
2521 result= PyEval_CallObject(fha->func, arglist);
2527 ret= (int) PyInt_AsLong( result );
2529 if( NULL == PyErr_Occurred() ){
2549 for( i= 0; i < OTF_NRECORDS; ++i ) {
2568 int pyOTF_HandlerArray_setHandler(
OTF_HandlerArray* handlers, PyObject*
function, uint32_t recordtype ) {
2575 if ( recordtype > OTF_NRECORDS ) {
2577 PyErr_SetString(PyExc_TypeError,
"Unexpected record type");
2580 }
else if ( NULL ==
function || 0 == PyCallable_Check(
function) ) {
2582 PyErr_SetString(PyExc_TypeError,
"Expecting a function object");
2594 PyErr_SetString(PyExc_TypeError,
"No Memory left");
2602 fhb->realfha= Py_None;
2613 Py_XINCREF(
function);
2620 switch( recordtype ) {
2622 case OTF_DEFINITIONCOMMENT_RECORD :
2629 case OTF_DEFTIMERRESOLUTION_RECORD :
2636 case OTF_DEFPROCESS_RECORD :
2643 case OTF_DEFPROCESSGROUP_RECORD :
2650 case OTF_DEFATTRLIST_RECORD :
2657 case OTF_DEFPROCESSORGROUPATTR_RECORD :
2664 case OTF_DEFFUNCTION_RECORD :
2671 case OTF_DEFFUNCTIONGROUP_RECORD :
2678 case OTF_DEFCOLLOP_RECORD :
2685 case OTF_DEFCOUNTER_RECORD :
2692 case OTF_DEFCOUNTERGROUP_RECORD :
2699 case OTF_DEFSCL_RECORD :
2706 case OTF_DEFSCLFILE_RECORD :
2713 case OTF_DEFCREATOR_RECORD :
2720 case OTF_DEFVERSION_RECORD :
2727 case OTF_DEFFILE_RECORD :
2734 case OTF_DEFFILEGROUP_RECORD :
2741 case OTF_DEFKEYVALUE_RECORD :
2748 case OTF_NOOP_RECORD :
2755 case OTF_ENTER_RECORD :
2762 case OTF_LEAVE_RECORD :
2769 case OTF_SEND_RECORD :
2776 case OTF_RECEIVE_RECORD :
2783 case OTF_COUNTER_RECORD :
2790 case OTF_COLLOP_RECORD :
2797 case OTF_BEGINCOLLOP_RECORD :
2804 case OTF_ENDCOLLOP_RECORD :
2811 case OTF_EVENTCOMMENT_RECORD :
2818 case OTF_BEGINPROCESS_RECORD :
2825 case OTF_ENDPROCESS_RECORD :
2832 case OTF_FILEOPERATION_RECORD :
2839 case OTF_BEGINFILEOP_RECORD :
2846 case OTF_ENDFILEOP_RECORD :
2853 case OTF_RMAPUT_RECORD :
2860 case OTF_RMAPUTRE_RECORD :
2867 case OTF_RMAGET_RECORD :
2874 case OTF_RMAEND_RECORD :
2881 case OTF_SNAPSHOTCOMMENT_RECORD :
2888 case OTF_ENTERSNAPSHOT_RECORD :
2895 case OTF_SENDSNAPSHOT_RECORD :
2902 case OTF_OPENFILESNAPSHOT_RECORD :
2909 case OTF_BEGINCOLLOPSNAPSHOT_RECORD :
2916 case OTF_BEGINFILEOPSNAPSHOT_RECORD :
2923 case OTF_SUMMARYCOMMENT_RECORD :
2930 case OTF_FUNCTIONSUMMARY_RECORD :
2937 case OTF_FUNCTIONGROUPSUMMARY_RECORD :
2944 case OTF_MESSAGESUMMARY_RECORD :
2951 case OTF_COLLOPSUMMARY_RECORD :
2958 case OTF_FILEOPERATIONSUMMARY_RECORD :
2965 case OTF_FILEGROUPOPERATIONSUMMARY_RECORD :
2972 case OTF_UNKNOWN_RECORD :
2979 case OTF_DEFMARKER_RECORD :
2986 case OTF_MARKER_RECORD :
3002 int pyOTF_HandlerArray_setFirstHandlerArg(
OTF_HandlerArray* handlers, PyObject* fha, uint32_t recordtype ) {
3009 if ( recordtype > OTF_NRECORDS ) {
3012 PyErr_SetString(PyExc_TypeError,
"Unexpected record type");
3025 PyErr_SetString(PyExc_TypeError,
"No Memory left");
3034 fhb->realfha= Py_None;
int OTF_Writer_writeDefAttributeList(OTF_Writer *writer, uint32_t streamid, uint32_t attr_token, uint32_t num, OTF_ATTR_TYPE *array)
Write an attribute list definition record.
Definition: OTF_Writer.c:715
int OTF_MasterControl_appendList(OTF_MasterControl *mc, uint32_t argument, uint32_t l, uint32_t *values)
Append the mapping argument -> ( list of l values ) to the master control structure.
Definition: OTF_MasterControl.c:573
uint8_t OTF_KeyValueList_getByteArray(OTF_KeyValueList *list, uint32_t key, uint8_t *value, uint32_t *len)
Read a byte array from the given OTF_KeyValueList instance.
Definition: OTF_KeyValue.c:620
Data structure that collects the information about which stream contains which parts of a multi-file ...
Definition: OTF_MasterControl.h:166
void ** firsthandlerarg
Array of first handler arguments.
Definition: OTF_HandlerArray.h:58
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
#define OTF_RETURN_ABORT
Definition: OTF_Definitions.h:270
Object structure which holds OTF record handlers.
Definition: OTF_HandlerArray.h:52
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.
Definition: pyOTF_Wrapper.h:11
int OTF_Writer_writeDefAttributeListKV(OTF_Writer *writer, uint32_t streamid, uint32_t attr_token, uint32_t num, OTF_ATTR_TYPE *array, OTF_KeyValueList *list)
Write an attribute list definition record including an OTF_KeyValueList.
Definition: OTF_Writer.c:730
int OTF_Writer_writeDefProcessGroup(OTF_Writer *writer, uint32_t streamid, uint32_t deftoken, const char *name, uint32_t n, const uint32_t *array)
Write a process group definition record.
Definition: OTF_Writer.c:680
#define OTF_RETURN_OK
When writing an own handler, use these macros to tell OTF, what to do.
Definition: OTF_Definitions.h:266
int OTF_HandlerArray_close(OTF_HandlerArray *handlers)
Close and delete a OTF_HandlerArray object.
Definition: OTF_HandlerArray.c:108
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
Holds the data objects needed for global trace creation.
Definition: OTF_Writer.c:21
int OTF_Writer_writeDefProcessGroupKV(OTF_Writer *writer, uint32_t streamid, uint32_t deftoken, const char *name, uint32_t n, const uint32_t *array, OTF_KeyValueList *list)
Write a process group definition record including an OTF_KeyValueList.
Definition: OTF_Writer.c:697
uint8_t OTF_KeyValueList_appendByteArray(OTF_KeyValueList *list, uint32_t key, uint8_t *value, uint32_t len)
Append a byte array to a given OTF_KeyValueList instance.
Definition: OTF_KeyValue.c:361