OpenMPI  0.1.1
vt_unify_handlers.h
1 /**
2  * VampirTrace
3  * http://www.tu-dresden.de/zih/vampirtrace
4  *
5  * Copyright (c) 2005-2012, ZIH, TU Dresden, Federal Republic of Germany
6  *
7  * Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
8  * Centre, Federal Republic of Germany
9  *
10  * See the file COPYING in the package base directory for details
11  **/
12 
13 #ifndef _VT_UNIFY_HANDLERS_H_
14 #define _VT_UNIFY_HANDLERS_H_
15 
16 #include "config.h"
17 
18 #include "vt_unify_defs_recs.h"
19 #include "vt_unify_lvector.hh"
20 #include "vt_unify_markers.h"
21 
22 #include "otf.h"
23 
24 //
25 // first handler argument structures for reading ...
26 //
27 
28 // ... definitions
30 {
31  FirstHandlerArg_DefsS( LargeVectorC<DefRec_BaseS*> & _loc_defs )
32  : loc_defs( _loc_defs ) {}
33 
34  LargeVectorC<DefRec_BaseS*> & loc_defs;
35 
36 };
37 
38 // ... marker
40 {
41  FirstHandlerArg_MarkersS( LargeVectorC<DefRec_DefMarkerS*> & _loc_defs,
42  LargeVectorC<MarkersC::MarkerSpotS*> & _loc_spots )
43  : loc_defs( _loc_defs ), loc_spots( _loc_spots ) {}
44 
45  LargeVectorC<DefRec_DefMarkerS*> & loc_defs;
46  LargeVectorC<MarkersC::MarkerSpotS*> & loc_spots;
47 
48 };
49 
50 // ... events
52 {
54  : wstream( _wstream ) {}
55 
56  OTF_WStream * wstream;
57 
58 };
59 
60 // ... statistics
62 
63 // key-value list "record handler"
64 // translate local key tokens to global tokens
65 void HandleKeyValueList( const uint32_t & proc, OTF_KeyValueList * kvs );
66 
67 // definition record handlers
68 //
69 
70 int HandleDefComment( FirstHandlerArg_DefsS * fha,
71  uint32_t streamid, const char * comment );
72 
73 int HandleDefCreator( FirstHandlerArg_DefsS * fha,
74  uint32_t streamid, const char * creator );
75 
76 int HandleDefTimerResolution( FirstHandlerArg_DefsS * fha,
77  uint32_t streamid, uint64_t ticksPerSecond );
78 
79 int HandleDefTimeRange( FirstHandlerArg_DefsS * fha,
80  uint32_t streamid, uint64_t minTime, uint64_t maxTime );
81 
82 int HandleDefProcess( FirstHandlerArg_DefsS * fha,
83  uint32_t streamid, uint32_t deftoken, const char * name,
84  uint32_t parent );
85 
86 int HandleDefProcessGroup( FirstHandlerArg_DefsS * fha,
87  uint32_t streamid, uint32_t deftoken, const char * name,
88  uint32_t n, uint32_t * array );
89 
90 int HandleDefProcessGroupAttributes( FirstHandlerArg_DefsS * fha,
91  uint32_t streamid, uint32_t group, uint32_t attributes );
92 
93 int HandleDefSclFile( FirstHandlerArg_DefsS * fha,
94  uint32_t streamid, uint32_t deftoken, const char * filename );
95 
96 int HandleDefScl( FirstHandlerArg_DefsS * fha,
97  uint32_t streamid, uint32_t deftoken, uint32_t sclfile,
98  uint32_t sclline );
99 
100 int HandleDefFileGroup( FirstHandlerArg_DefsS * fha,
101  uint32_t streamid, uint32_t deftoken, const char * name );
102 
103 int HandleDefFile( FirstHandlerArg_DefsS * fha,
104  uint32_t streamid, uint32_t deftoken, const char * name,
105  uint32_t group );
106 
107 int HandleDefFunctionGroup( FirstHandlerArg_DefsS * fha,
108  uint32_t streamid, uint32_t deftoken, const char * name );
109 
110 int HandleDefFunction( FirstHandlerArg_DefsS * fha,
111  uint32_t streamid, uint32_t deftoken, const char * name, uint32_t group,
112  uint32_t scltoken );
113 
114 int HandleDefCollOp( FirstHandlerArg_DefsS * fha,
115  uint32_t streamid, uint32_t collOp, const char * name, uint32_t type );
116 
117 int HandleDefCounterGroup( FirstHandlerArg_DefsS * fha,
118  uint32_t streamid, uint32_t deftoken, const char * name );
119 
120 int HandleDefCounter( FirstHandlerArg_DefsS * fha,
121  uint32_t streamid, uint32_t deftoken, const char * name,
122  uint32_t properties, uint32_t countergroup, const char * unit );
123 
124 int HandleDefCounterAssignments( FirstHandlerArg_DefsS * fha,
125  uint32_t streamid, uint32_t counter, uint32_t n, uint32_t * array );
126 
127 int HandleDefKeyValue( FirstHandlerArg_DefsS * fha,
128  uint32_t streamid, uint32_t key, OTF_Type type, const char * name,
129  const char * description );
130 
131 // marker record handlers
132 //
133 
134 int HandleDefMarker( FirstHandlerArg_MarkersS * fha,
135  uint32_t streamid, uint32_t deftoken, const char * name, uint32_t type );
136 
137 int HandleMarkerSpot( FirstHandlerArg_MarkersS * fha,
138  uint64_t time, uint32_t proc, uint32_t marker, const char * text );
139 
140 // event record handlers
141 //
142 
143 int HandleEventComment( FirstHandlerArg_EventsS * fha,
144  uint64_t time, uint32_t proc, const char * comment,
145  OTF_KeyValueList * kvs );
146 
147 int HandleEnter( FirstHandlerArg_EventsS * fha,
148  uint64_t time, uint32_t func, uint32_t proc, uint32_t scl,
149  OTF_KeyValueList * kvs );
150 
151 int HandleLeave( FirstHandlerArg_EventsS * fha,
152  uint64_t time, uint32_t func, uint32_t proc, uint32_t scl,
153  OTF_KeyValueList * kvs );
154 
155 int HandleCounter( FirstHandlerArg_EventsS * fha,
156  uint64_t time, uint32_t proc, uint32_t counter, uint64_t value,
157  OTF_KeyValueList * kvs );
158 
159 int HandleBeginFileOp( FirstHandlerArg_EventsS * fha,
160  uint64_t time, uint32_t proc, uint64_t matchid, uint32_t scl,
161  OTF_KeyValueList * kvs );
162 
163 int HandleEndFileOp( FirstHandlerArg_EventsS * fha,
164  uint64_t time, uint32_t proc, uint32_t file, uint64_t matchid,
165  uint64_t handleid, uint32_t operation, uint64_t bytes, uint32_t scl,
166  OTF_KeyValueList * kvs );
167 
168 int HandleSendMsg( FirstHandlerArg_EventsS * fha,
169  uint64_t time, uint32_t sender, uint32_t receiver, uint32_t comm,
170  uint32_t tag, uint32_t length, uint32_t scl, OTF_KeyValueList * kvs );
171 
172 int HandleRecvMsg( FirstHandlerArg_EventsS * fha,
173  uint64_t time, uint32_t receiver, uint32_t sender, uint32_t comm,
174  uint32_t tag, uint32_t length, uint32_t scl, OTF_KeyValueList * kvs );
175 
176 int HandleBeginCollOp( FirstHandlerArg_EventsS * fha,
177  uint64_t time, uint32_t proc, uint32_t operation, uint64_t matchid,
178  uint32_t comm, uint32_t root, uint64_t sent, uint64_t recvd,
179  uint32_t scl, OTF_KeyValueList * kvs );
180 
181 int HandleEndCollOp( FirstHandlerArg_EventsS * fha,
182  uint64_t time, uint32_t proc, uint64_t matchid, OTF_KeyValueList * kvs );
183 
184 int HandleRMAPut( FirstHandlerArg_EventsS * fha,
185  uint64_t time, uint32_t proc, uint32_t origin, uint32_t dest,
186  uint32_t comm, uint32_t tag, uint64_t bytes, uint32_t scl,
187  OTF_KeyValueList * kvs );
188 
189 int HandleRMAPutRemoteEnd( FirstHandlerArg_EventsS * fha,
190  uint64_t time, uint32_t proc, uint32_t origin, uint32_t dest,
191  uint32_t comm, uint32_t tag, uint64_t bytes, uint32_t scl,
192  OTF_KeyValueList * kvs );
193 
194 int HandleRMAGet( FirstHandlerArg_EventsS * fha,
195  uint64_t time, uint32_t proc, uint32_t origin, uint32_t dest,
196  uint32_t comm, uint32_t tag, uint64_t bytes, uint32_t scl,
197  OTF_KeyValueList * kvs );
198 
199 int HandleRMAEnd( FirstHandlerArg_EventsS * fha,
200  uint64_t time, uint32_t proc, uint32_t remote, uint32_t comm,
201  uint32_t tag, uint32_t scl, OTF_KeyValueList * kvs );
202 
203 // summary record handlers
204 //
205 
206 int HandleFunctionSummary( FirstHandlerArg_StatsS * fha,
207  uint64_t time, uint32_t func, uint32_t proc, uint64_t invocations,
208  uint64_t exclTime, uint64_t inclTime );
209 
210 int HandleMessageSummary( FirstHandlerArg_StatsS * fha,
211  uint64_t time, uint32_t proc, uint32_t peer, uint32_t comm,
212  uint32_t type, uint64_t sentNum, uint64_t recvNum,
213  uint64_t sentBytes, uint64_t recvBytes );
214 
215 int HandleCollOpSummary( FirstHandlerArg_StatsS * fha,
216  uint64_t time, uint32_t proc, uint32_t comm, uint32_t collop,
217  uint64_t sentNum, uint64_t recvNum, uint64_t sentBytes,
218  uint64_t recvBytes );
219 
220 int HandleFileOpSummary( FirstHandlerArg_StatsS * fha,
221  uint64_t time, uint32_t file, uint32_t proc, uint64_t nopen,
222  uint64_t nclose, uint64_t nread, uint64_t nwrite, uint64_t nseek,
223  uint64_t bytesRead, uint64_t bytesWrite );
224 
225 #endif // _VT_UNIFY_HANDLERS_H_
Main include file for applications using OTF.
VampirTrace http://www.tu-dresden.de/zih/vampirtrace.
Definition: vt_unify_handlers.h:29
enum OTF_Type_enum OTF_Type
An enum which holds all OTF datatypes that are relevant for OTF_KeyValueList.
Definition: vt_unify_handlers.h:39
Definition: OTF_WStream.h:95
struct OTF_KeyValueList_struct OTF_KeyValueList
Object type which holds a key-value list.
Definition: OTF_KeyValue.h:242
Definition: vt_unify_handlers.h:51