13 #ifndef _VT_UNIFY_HOOKS_PROF_H_
14 #define _VT_UNIFY_HOOKS_PROF_H_
17 #include "vt_unify_hooks_base.h"
36 FUNC_PROF_SORT_FLAG_DIR_UP = 0x1,
37 FUNC_PROF_SORT_FLAG_DIR_DOWN = 0x2,
38 FUNC_PROF_SORT_FLAG_FUNCNAME = 0x4,
39 FUNC_PROF_SORT_FLAG_COUNT = 0x8,
40 FUNC_PROF_SORT_FLAG_INCL = 0x10,
41 FUNC_PROF_SORT_FLAG_EXCL = 0x20,
42 FUNC_PROF_SORT_FLAG_INCL_CALL = 0x40,
43 FUNC_PROF_SORT_FLAG_EXCL_CALL = 0x80
53 : funcid( 0 ), count( 0.0 ), incl( 0 ), excl( 0 ) {}
56 : funcid( _funcid ), count( 0.0 ), incl( 0 ), excl( 0 ) {}
58 FuncProfS(
const uint32_t & _funcid,
const std::string & _funcname,
59 const double & _count,
const uint64_t & _incl,
60 const uint64_t & _excl )
61 : funcid( _funcid ), funcname( _funcname ), count( _count ),
62 incl( _incl ), excl( _excl ) {}
65 VT_MPI_INT getPackSize();
66 void pack(
char *& buffer,
const VT_MPI_INT & bufferSize,
67 VT_MPI_INT & bufferPos );
68 void unpack(
char *& buffer,
const VT_MPI_INT & bufferSize,
69 VT_MPI_INT & bufferPos );
73 inline bool operator==(
const FuncProfS & a )
const;
74 inline bool operator<(
const FuncProfS & a)
const;
91 static bool isEnabled() {
return true; }
101 void finalizeHook(
const bool & error );
106 void phaseHook_GetUnifyControls_post();
107 void phaseHook_UnifyStatistics_post();
112 void writeRecHook_DefTimerResolution( HooksC::VaArgsT & args );
113 void writeRecHook_DefProcess( HooksC::VaArgsT & args );
114 void writeRecHook_DefFunction( HooksC::VaArgsT & args );
115 void writeRecHook_FunctionSummary( HooksC::VaArgsT & args );
120 void processFuncStat(
const uint32_t & procId,
const uint32_t & funcId,
121 const uint64_t & count,
const uint64_t & incl,
122 const uint64_t & excl );
126 void getFuncProf( std::vector<FuncProfS> & funcProfs,
127 const uint32_t & procId = 0 );
131 bool printFuncProf(
const std::vector<FuncProfS> & funcProfs,
132 const std::string & outFile =
"" );
136 bool haveFuncProf(
const uint32_t & procId = 0 );
139 std::string getFuncNameById(
const uint32_t & funcId );
142 std::string shortName(
const std::string & longName, uint32_t len = 20 );
145 std::string formatTime(
const uint64_t & time );
150 void gatherFuncProfs();
156 std::map<uint32_t, std::string> m_funcId2Name;
160 std::vector<FuncProfS> m_sumFuncProfs;
163 std::map<uint32_t, std::map<uint32_t, FuncProfS> > m_procId2FuncProf;
173 #endif // _VT_UNIFY_HOOKS_PROF_H_
VampirTrace http://www.tu-dresden.de/zih/vampirtrace.
Definition: vt_unify_hooks_base.h:23
Definition: vt_unify_hooks_prof.h:50
VampirTrace http://www.tu-dresden.de/zih/vampirtrace.
Definition: vt_unify_hooks_prof.h:27
HooksProfC()
VampirTrace http://www.tu-dresden.de/zih/vampirtrace.
Definition: vt_unify_hooks_prof.cc:28