OpenMPI 0.1.1

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

- File List
- Globals

vt_unify_hooks_base.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_HOOKS_BASE_H_
14 #define _VT_UNIFY_HOOKS_BASE_H_
15
16 #include "config.h"
17
18 #include "vt_unify_hooks.h"
19
20 //
21 // HooksBaseC class
22 //
23 class HooksBaseC
24 {
25 friend class HooksC;
26
27 public:
28
29 // constructor
30 HooksBaseC();
31
32 // destructor
33 virtual ~HooksBaseC();
34
35 private:
36
37 // trigger phase hook
38 void triggerPhaseHook( const HooksC::PhaseTypeT & phase )
39 {
40 assert( m_phaseMethods.size() > (uint32_t)phase );
41 assert( m_phaseMethods[phase] != 0 );
42
43 ( this->*( m_phaseMethods[phase] ) )();
44 }
45
46 // trigger read record hook
47 void triggerReadRecordHook( const HooksC::RecordTypeT & rectype,
48 HooksC::VaArgsT & args )
49 {
50 assert( m_readRecHookMethods.size() > (uint32_t)rectype );
51 assert( m_readRecHookMethods[rectype] != 0 );
52
53 ( this->*( m_readRecHookMethods[rectype] ) )( args );
54 }
55
56 // trigger write record hook
57 void triggerWriteRecordHook( const HooksC::RecordTypeT & rectype,
58 HooksC::VaArgsT & args )
59 {
60 assert( m_writeRecHookMethods.size() > (uint32_t)rectype );
61 assert( m_writeRecHookMethods[rectype] != 0 );
62
63 ( this->*( m_writeRecHookMethods[rectype] ) )( args );
64 }
65
66 // vvvvvvvvvvvvvvvvvvvv HOOK METHODS vvvvvvvvvvvvvvvvvvvv
67
68 // initialization/finalization hooks
69 // (must be defined in inheriting hook classes)
70 //
71
72 virtual void initHook() = 0;
73 virtual void finalizeHook( const bool & error ) = 0;
74
75 // phase hooks
76 //
77
78 virtual void phaseHook_GetUnifyControls_pre() {}
79 virtual void phaseHook_GetUnifyControls_post() {}
80
81 virtual void phaseHook_UnifyDefinitions_pre() {}
82 virtual void phaseHook_UnifyDefinitions_post() {}
83
84 virtual void phaseHook_UnifyMarkers_pre() {}
85 virtual void phaseHook_UnifyMarkers_post() {}
86
87 virtual void phaseHook_UnifyStatistics_pre() {}
88 virtual void phaseHook_UnifyStatistics_post() {}
89
90 virtual void phaseHook_UnifyEvents_pre() {}
91 virtual void phaseHook_UnifyEvents_post() {}
92
93 virtual void phaseHook_WriteMasterControl_pre() {}
94 virtual void phaseHook_WriteMasterControl_post() {}
95
96 virtual void phaseHook_CleanUp_pre() {}
97 virtual void phaseHook_CleanUp_post() {}
98
99 // record hooks
100 //
101
102 // definition records
103
104 virtual void readRecHook_DefComment( HooksC::VaArgsT & args ) { (void)args; }
105 virtual void writeRecHook_DefComment( HooksC::VaArgsT & args ) { (void)args; }
106
107 virtual void readRecHook_DefCreator( HooksC::VaArgsT & args ) { (void)args; }
108 virtual void writeRecHook_DefCreator( HooksC::VaArgsT & args ) { (void)args; }
109
110 virtual void readRecHook_DefTimerResolution( HooksC::VaArgsT & args ) { (void)args; }
111 virtual void writeRecHook_DefTimerResolution( HooksC::VaArgsT & args ) { (void)args; }
112
113 virtual void readRecHook_DefTimeRange( HooksC::VaArgsT & args ) { (void)args; }
114 virtual void writeRecHook_DefTimeRange( HooksC::VaArgsT & args ) { (void)args; }
115
116 virtual void readRecHook_DefProcessGroup( HooksC::VaArgsT & args ) { (void)args; }
117 virtual void writeRecHook_DefProcessGroup( HooksC::VaArgsT & args ) { (void)args; }
118
119 virtual void readRecHook_DefProcessGroupAttributes( HooksC::VaArgsT & args ) { (void)args; }
120 virtual void writeRecHook_DefProcessGroupAttributes( HooksC::VaArgsT & args ) { (void)args; }
121
122 virtual void readRecHook_DefProcess( HooksC::VaArgsT & args ) { (void)args; }
123 virtual void writeRecHook_DefProcess( HooksC::VaArgsT & args ) { (void)args; }
124
125 virtual void readRecHook_DefSclFile( HooksC::VaArgsT & args ) { (void)args; }
126 virtual void writeRecHook_DefSclFile( HooksC::VaArgsT & args ) { (void)args; }
127
128 virtual void readRecHook_DefScl( HooksC::VaArgsT & args ) { (void)args; }
129 virtual void writeRecHook_DefScl( HooksC::VaArgsT & args ) { (void)args; }
130
131 virtual void readRecHook_DefFileGroup( HooksC::VaArgsT & args ) { (void)args; }
132 virtual void writeRecHook_DefFileGroup( HooksC::VaArgsT & args ) { (void)args; }
133
134 virtual void readRecHook_DefFile( HooksC::VaArgsT & args ) { (void)args; }
135 virtual void writeRecHook_DefFile( HooksC::VaArgsT & args ) { (void)args; }
136
137 virtual void readRecHook_DefFunctionGroup( HooksC::VaArgsT & args ) { (void)args; }
138 virtual void writeRecHook_DefFunctionGroup( HooksC::VaArgsT & args ) { (void)args; }
139
140 virtual void readRecHook_DefFunction( HooksC::VaArgsT & args ) { (void)args; }
141 virtual void writeRecHook_DefFunction( HooksC::VaArgsT & args ) { (void)args; }
142
143 virtual void readRecHook_DefCollOp( HooksC::VaArgsT & args ) { (void)args; }
144 virtual void writeRecHook_DefCollOp( HooksC::VaArgsT & args ) { (void)args; }
145
146 virtual void readRecHook_DefCounterGroup( HooksC::VaArgsT & args ) { (void)args; }
147 virtual void writeRecHook_DefCounterGroup( HooksC::VaArgsT & args ) { (void)args; }
148
149 virtual void readRecHook_DefCounter( HooksC::VaArgsT & args ) { (void)args; }
150 virtual void writeRecHook_DefCounter( HooksC::VaArgsT & args ) { (void)args; }
151
152 virtual void readRecHook_DefCounterAssignments( HooksC::VaArgsT & args ) { (void)args; }
153 virtual void writeRecHook_DefCounterAssignments( HooksC::VaArgsT & args ) { (void)args; }
154
155 virtual void readRecHook_DefKeyValue( HooksC::VaArgsT & args ) { (void)args; }
156 virtual void writeRecHook_DefKeyValue( HooksC::VaArgsT & args ) { (void)args; }
157
158 // summary records
159
160 virtual void readRecHook_FunctionSummary( HooksC::VaArgsT & args ) { (void)args; }
161 virtual void writeRecHook_FunctionSummary( HooksC::VaArgsT & args ) { (void)args; }
162
163 virtual void readRecHook_MessageSummary( HooksC::VaArgsT & args ) { (void)args; }
164 virtual void writeRecHook_MessageSummary( HooksC::VaArgsT & args ) { (void)args; }
165
166 virtual void readRecHook_CollOpSummary( HooksC::VaArgsT & args ) { (void)args; }
167 virtual void writeRecHook_CollOpSummary( HooksC::VaArgsT & args ) { (void)args; }
168
169 virtual void readRecHook_FileOpSummary( HooksC::VaArgsT & args ) { (void)args; }
170 virtual void writeRecHook_FileOpSummary( HooksC::VaArgsT & args ) { (void)args; }
171
172 // marker records
173
174 virtual void readRecHook_DefMarker( HooksC::VaArgsT & args ) { (void)args; }
175 virtual void writeRecHook_DefMarker( HooksC::VaArgsT & args ) { (void)args; }
176
177 virtual void readRecHook_MarkerSpot( HooksC::VaArgsT & args ) { (void)args; }
178 virtual void writeRecHook_MarkerSpot( HooksC::VaArgsT & args ) { (void)args; }
179
180 // event records
181
182 virtual void readRecHook_Enter( HooksC::VaArgsT & args ) { (void)args; }
183 virtual void writeRecHook_Enter( HooksC::VaArgsT & args ) { (void)args; }
184
185 virtual void readRecHook_Leave( HooksC::VaArgsT & args ) { (void)args; }
186 virtual void writeRecHook_Leave( HooksC::VaArgsT & args ) { (void)args; }
187
188 virtual void readRecHook_BeginFileOp( HooksC::VaArgsT & args ) { (void)args; }
189 virtual void writeRecHook_BeginFileOp( HooksC::VaArgsT & args ) { (void)args; }
190
191 virtual void readRecHook_EndFileOp( HooksC::VaArgsT & args ) { (void)args; }
192 virtual void writeRecHook_EndFileOp( HooksC::VaArgsT & args ) { (void)args; }
193
194 virtual void readRecHook_SendMsg( HooksC::VaArgsT & args ) { (void)args; }
195 virtual void writeRecHook_SendMsg( HooksC::VaArgsT & args ) { (void)args; }
196
197 virtual void readRecHook_RecvMsg( HooksC::VaArgsT & args ) { (void)args; }
198 virtual void writeRecHook_RecvMsg( HooksC::VaArgsT & args ) { (void)args; }
199
200 virtual void readRecHook_BeginCollOp( HooksC::VaArgsT & args ) { (void)args; }
201 virtual void writeRecHook_BeginCollOp( HooksC::VaArgsT & args ) { (void)args; }
202
203 virtual void readRecHook_EndCollOp( HooksC::VaArgsT & args ) { (void)args; }
204 virtual void writeRecHook_EndCollOp( HooksC::VaArgsT & args ) { (void)args; }
205
206 virtual void readRecHook_RMAPut( HooksC::VaArgsT & args ) { (void)args; }
207 virtual void writeRecHook_RMAPut( HooksC::VaArgsT & args ) { (void)args; }
208
209 virtual void readRecHook_RMAPutRemoteEnd( HooksC::VaArgsT & args ) { (void)args; }
210 virtual void writeRecHook_RMAPutRemoteEnd( HooksC::VaArgsT & args ) { (void)args; }
211
212 virtual void readRecHook_RMAGet( HooksC::VaArgsT & args ) { (void)args; }
213 virtual void writeRecHook_RMAGet( HooksC::VaArgsT & args ) { (void)args; }
214
215 virtual void readRecHook_RMAEnd( HooksC::VaArgsT & args ) { (void)args; }
216 virtual void writeRecHook_RMAEnd( HooksC::VaArgsT & args ) { (void)args; }
217
218 virtual void readRecHook_Counter( HooksC::VaArgsT & args ) { (void)args; }
219 virtual void writeRecHook_Counter( HooksC::VaArgsT & args ) { (void)args; }
220
221 virtual void readRecHook_EventComment( HooksC::VaArgsT & args ) { (void)args; }
222 virtual void writeRecHook_EventComment( HooksC::VaArgsT & args ) { (void)args; }
223
224 // generic hook
225 virtual void genericHook( const uint32_t & id, HooksC::VaArgsT & args ) { (void)args; }
226
227 // ^^^^^^^^^^^^^^^^^^^^ HOOK METHODS ^^^^^^^^^^^^^^^^^^^^
228
229 // vector of phase hook methods
230 std::vector<void ( HooksBaseC::* )( void )> m_phaseMethods;
231
232 // vector of record read hook methods
233 std::vector<void ( HooksBaseC::* )( HooksC::VaArgsT& )> m_readRecHookMethods;
234
235 // vector of record write hook methods
236 std::vector<void ( HooksBaseC::* )( HooksC::VaArgsT& )> m_writeRecHookMethods;
237
238 };
239
240 #endif // _VT_UNIFY_HOOKS_BASE_H_
HooksC
Definition: vt_unify_hooks.h:54
HooksBaseC
VampirTrace http://www.tu-dresden.de/zih/vampirtrace.
Definition: vt_unify_hooks_base.h:23
HooksBaseC::HooksBaseC
HooksBaseC()
VampirTrace http://www.tu-dresden.de/zih/vampirtrace.
Definition: vt_unify_hooks_base.cc:22