forked from retronetworking/yate
Added marker in Engine for runtime analyzers like callgrind to start collecting data.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4671 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
095fe9ae56
commit
ba66ef045b
|
@ -1111,6 +1111,7 @@ int Engine::run()
|
|||
install(new EngineHelp);
|
||||
loadPlugins();
|
||||
Debug(DebugAll,"Loaded %d plugins",plugins.count());
|
||||
internalStatisticsStart();
|
||||
if (s_super_handle >= 0) {
|
||||
install(new EngineSuperHandler);
|
||||
if (s_restarts)
|
||||
|
@ -1252,6 +1253,12 @@ int Engine::run()
|
|||
return s_haltcode;
|
||||
}
|
||||
|
||||
void Engine::internalStatisticsStart()
|
||||
{
|
||||
// This is here so runtime analyzers can start or reset statistics
|
||||
// after the cruft of module load + global objects initialization
|
||||
}
|
||||
|
||||
Engine* Engine::self()
|
||||
{
|
||||
if (!s_self)
|
||||
|
|
2
run.in
2
run.in
|
@ -40,7 +40,7 @@ fi
|
|||
if [ "$1" = "--callgrind" ]; then
|
||||
shift
|
||||
export LD_BIND_NOW=yes
|
||||
yate="valgrind --tool=callgrind --dump-instr=yes --simulate-cache=yes $1 $yate -Du"
|
||||
yate="valgrind --tool=callgrind --dump-instr=yes --simulate-cache=yes --zero-before=*TelEngine*Engine*internalStatisticsStart* $1 $yate -Du"
|
||||
shift
|
||||
fi
|
||||
|
||||
|
|
|
@ -1167,6 +1167,7 @@ protected:
|
|||
|
||||
private:
|
||||
Engine();
|
||||
void internalStatisticsStart();
|
||||
ObjList m_libs;
|
||||
MessageDispatcher m_dispatcher;
|
||||
static Engine* s_self;
|
||||
|
|
Loading…
Reference in New Issue