OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Handler.h
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 #ifndef OTFTOVTF3_HANDLER_H
7 #define OTFTOVTF3_HANDLER_H
8
9 #ifdef HAVE_CONFIG_H
10 #include "config.h"
11 #endif
12
13 #include <map>
14
15 #include "OTF_inttypes.h"
16
17 #include "otf.h"
18
19 #define KV_QUIET_MODE 0
20 #define KV_BASIC_MODE 1
21 #define KV_FULL_MODE 2
22
23 typedef struct {
24
25
26 uint64_t num;
27
28 uint64_t minNum;
29 uint64_t maxNum;
30
31 int show_keyvalue;
32 bool silent_mode;
33
34 bool records[OTF_NRECORDS]; /* enabled record types */
35
36 std::map<uint32_t,uint32_t> counter_props;
37
38 FILE* outfile;
39
40 } Control;
41
42
43 int printKeyValueList(Control* c, OTF_KeyValueList* list);
44
45
46 /* *** Definition handler *** ************************************* */
47
48 int handleDefinitionComment( void* userData, uint32_t stream,
49 const char* comment, OTF_KeyValueList* kvlist );
50
51 int handleDefTimerResolution( void* userData, uint32_t stream,
52 uint64_t ticksPerSecond, OTF_KeyValueList* kvlist );
53
54 int handleDefProcess( void* userData, uint32_t stream, uint32_t process,
55 const char* name, uint32_t parent, OTF_KeyValueList* kvlist );
56
57 int handleDefProcessGroup( void* userData, uint32_t stream,
58 uint32_t procGroup, const char* name, uint32_t numberOfProcs,
59 const uint32_t* procs, OTF_KeyValueList* kvlist );
60
61 int handleDefAttributeList( void* userData, uint32_t stream,
62 uint32_t attr_token, uint32_t num, OTF_ATTR_TYPE* list,
63 OTF_KeyValueList* kvlist );
64
65 int handleDefProcessOrGroupAttributes( void* userData, uint32_t stream,
66 uint32_t proc_token, uint32_t attr_token, OTF_KeyValueList* kvlist );
67
68 int handleDefFunction( void* userData, uint32_t stream, uint32_t func,
69 const char* name, uint32_t funcGroup, uint32_t source, OTF_KeyValueList* kvlist );
70
71 int handleDefFunctionGroup( void* userData, uint32_t stream,
72 uint32_t funcGroup, const char* name, OTF_KeyValueList* kvlist );
73
74 int handleDefCollectiveOperation( void* userData, uint32_t stream,
75 uint32_t collOp, const char* name, uint32_t type, OTF_KeyValueList* kvlist );
76
77 int handleDefCounter( void* userData, uint32_t stream, uint32_t counter,
78 const char* name, uint32_t properties, uint32_t counterGroup,
79 const char* unit, OTF_KeyValueList* kvlist );
80
81 int handleDefCounterGroup( void* userData, uint32_t stream,
82 uint32_t counterGroup, const char* name, OTF_KeyValueList* kvlist );
83
84 int handleDefScl( void* userData, uint32_t stream, uint32_t source,
85 uint32_t sourceFile, uint32_t line, OTF_KeyValueList* kvlist );
86
87 int handleDefSclFile( void* userData, uint32_t stream,
88 uint32_t sourceFile, const char* name, OTF_KeyValueList* kvlist );
89
90 int handleDefCreator( void* userData, uint32_t stream,
91 const char* creator, OTF_KeyValueList* kvlist );
92
93 int handleDefVersion( void* userData, uint32_t stream, uint8_t major,
94 uint8_t minor, uint8_t sub, const char* string );
95
96 int handleDefKeyValue( void *userData, uint32_t streamid, uint32_t token,
97 OTF_Type type, const char *name, const char *desc, OTF_KeyValueList* kvlist );
98
99 int handleDefTimeRange( void* userData, uint32_t streamid, uint64_t minTime,
100 uint64_t maxTime, OTF_KeyValueList* kvlist );
101
102 int handleDefCounterAssignments( void* userData, uint32_t streamid,
103 uint32_t counter_token, uint32_t number_of_members,
104 const uint32_t* procs_or_groups, OTF_KeyValueList* kvlist );
105
106 int handleDefProcessSubstitutes( void* userData, uint32_t streamid,
107 uint32_t representative, uint32_t numberOfProcs, const uint32_t* procs,
108 OTF_KeyValueList* kvlist );
109
110 int handleNoOp( void* userData, uint64_t time, uint32_t process,
111 OTF_KeyValueList* kvlist );
112
113 int handleEnter( void* userData, uint64_t time, uint32_t function,
114 uint32_t process, uint32_t source, OTF_KeyValueList* kvlist );
115
116 int handleLeave( void* userData, uint64_t time, uint32_t function,
117 uint32_t process, uint32_t source, OTF_KeyValueList* kvlist );
118
119 int handleSendMsg( void* userData, uint64_t time, uint32_t sender,
120 uint32_t receiver, uint32_t group, uint32_t type, uint32_t length,
121 uint32_t source, OTF_KeyValueList* kvlist );
122
123 int handleRecvMsg( void* userData, uint64_t time, uint32_t recvProc,
124 uint32_t sendProc, uint32_t group, uint32_t type, uint32_t length,
125 uint32_t source, OTF_KeyValueList* kvlist );
126
127 int handleCounter( void* userData, uint64_t time, uint32_t process,
128 uint32_t counter, uint64_t value, OTF_KeyValueList* kvlist );
129
130 int handleCollectiveOperation( void* userData, uint64_t time,
131 uint32_t process, uint32_t collective, uint32_t procGroup,
132 uint32_t rootProc, uint32_t sent, uint32_t received, uint64_t duration,
133 uint32_t source, OTF_KeyValueList* kvlist );
134
135 int handleBeginCollectiveOperation( void* userData, uint64_t time,
136 uint32_t process, uint32_t collOp, uint64_t matchingId,
137 uint32_t procGroup, uint32_t rootprocess, uint64_t sent,
138 uint64_t received, uint32_t scltoken, OTF_KeyValueList* kvlist );
139
140 int handleEndCollectiveOperation( void* userData, uint64_t time,
141 uint32_t process, uint64_t matchingId, OTF_KeyValueList* kvlist );
142
143 int handleEventComment( void* userData, uint64_t time, uint32_t process,
144 const char* comment, OTF_KeyValueList* kvlist );
145
146 int handleBeginProcess( void* userData, uint64_t time, uint32_t process,
147 OTF_KeyValueList* kvlist );
148
149 int handleEndProcess( void* userData, uint64_t time, uint32_t process,
150 OTF_KeyValueList* kvlist );
151
152
153 int handleSnapshotComment( void* userData, uint64_t time,
154 uint32_t process, const char* comment, OTF_KeyValueList* kvlist );
155
156 int handleEnterSnapshot( void *userData, uint64_t time,
157 uint64_t originaltime, uint32_t function, uint32_t process,
158 uint32_t source, OTF_KeyValueList* kvlist );
159
160 int handleSendSnapshot( void *userData, uint64_t time,
161 uint64_t originaltime, uint32_t sender, uint32_t receiver,
162 uint32_t procGroup, uint32_t tag, uint32_t length, uint32_t source,
163 OTF_KeyValueList* kvlist );
164
165 int handleOpenFileSnapshot( void* userData, uint64_t time,
166 uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid,
167 uint32_t source, OTF_KeyValueList* kvlist );
168
169 int handleBeginCollopSnapshot( void *userData, uint64_t time, uint64_t originaltime,
170 uint32_t process, uint32_t collOp, uint64_t matchingId, uint32_t procGroup,
171 uint32_t rootProc, uint64_t sent, uint64_t received, uint32_t scltoken,
172 OTF_KeyValueList *list);
173
174 int handleBeginFileOpSnapshot( void *userData, uint64_t time, uint64_t originaltime,
175 uint32_t process, uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList *list);
176
177
178 int handleSummaryComment( void * userData, uint64_t time,
179 uint32_t process, const char* comment, OTF_KeyValueList* kvlist );
180
181 int handleFunctionSummary( void* userData, uint64_t time,
182 uint32_t function, uint32_t process, uint64_t invocations,
183 uint64_t exclTime, uint64_t inclTime, OTF_KeyValueList* kvlist );
184
185 int handleFunctionGroupSummary( void* userData, uint64_t time,
186 uint32_t funcGroup, uint32_t process, uint64_t invocations,
187 uint64_t exclTime, uint64_t inclTime, OTF_KeyValueList* kvlist );
188
189 int handleMessageSummary( void* userData, uint64_t time, uint32_t process,
190 uint32_t peer, uint32_t comm, uint32_t type, uint64_t sentNumber,
191 uint64_t receivedNumber, uint64_t sentBytes, uint64_t receivedBytes,
192 OTF_KeyValueList* kvlist );
193
194 int handleCollopSummary( void* userData, uint64_t time, uint32_t process,
195 uint32_t comm, uint32_t collective, uint64_t sentNumber, uint64_t receivedNumber,
196 uint64_t sentBytes, uint64_t receivedBytes, OTF_KeyValueList* kvlist);
197
198 int handleDefFile( void* userData, uint32_t stream,
199 uint32_t token, const char *name,
200 uint32_t group, OTF_KeyValueList* kvlist );
201
202 int handleDefFileGroup( void* userData, uint32_t stream,
203 uint32_t token, const char *name, OTF_KeyValueList* kvlist );
204
205 int handleFileOperation( void* userData, uint64_t time,
206 uint32_t fileid, uint32_t process,
207 uint64_t handleid, uint32_t operation,
208 uint64_t bytes, uint64_t duration,
209 uint32_t source, OTF_KeyValueList* kvlist );
210
211 int handleBeginFileOperation( void* userData, uint64_t time, uint32_t process,
212 uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList* kvlist );
213
214 int handleEndFileOperation( void* userData, uint64_t time, uint32_t process,
215 uint32_t fileid, uint64_t matchingId, uint64_t handleId, uint32_t operation,
216 uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* kvlist );
217
218 int handleRMAPut( void* userData, uint64_t time, uint32_t process,
219 uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag,
220 uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* kvlist );
221
222 int handleRMAPutRemoteEnd( void* userData, uint64_t time,
223 uint32_t process, uint32_t origin, uint32_t target,
224 uint32_t communicator, uint32_t tag, uint64_t bytes,
225 uint32_t scltoken, OTF_KeyValueList* kvlist );
226
227 int handleRMAGet( void* userData, uint64_t time, uint32_t process,
228 uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag,
229 uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* kvlist);
230
231 int handleRMAEnd( void* userData, uint64_t time, uint32_t process,
232 uint32_t remote, uint32_t communicator, uint32_t tag,
233 uint32_t scltoken, OTF_KeyValueList* kvlist );
234
235 int handleUnknown( void* fcb, uint64_t time, uint32_t process,
236 const char* record );
237
238
239 int handleDefMarker( void *userData, uint32_t stream, uint32_t token, const char* name,
240 uint32_t type, OTF_KeyValueList* kvlist );
241
242 int handleMarker( void *userData, uint64_t time, uint32_t process,
243 uint32_t token, const char* text, OTF_KeyValueList* kvlist );
244
245
246 #endif /* OTFTOVTF3_HANDLER_H */
otf.h
Main include file for applications using OTF.
OTF_ATTR_TYPE
enum OTF_ATTR_TYPE_enum OTF_ATTR_TYPE
An enum which holds all values that are possible to set with datatype OTF_ATTR_TYPE().
OTF_Type
enum OTF_Type_enum OTF_Type
An enum which holds all OTF datatypes that are relevant for OTF_KeyValueList.
Control
Definition: Control.h:22
OTF_KeyValueList
struct OTF_KeyValueList_struct OTF_KeyValueList
Object type which holds a key-value list.
Definition: OTF_KeyValue.h:242
OTF_inttypes.h
Deals with all data type related issues.