8 #include "GaudiKernel/Auditor.h"
9 #include "GaudiKernel/IAuditorSvc.h"
10 #include "GaudiKernel/GaudiException.h"
11 #include "GaudiKernel/MsgStream.h"
12 #include "GaudiKernel/IIncidentListener.h"
13 #include "GaudiKernel/IIncidentSvc.h"
15 #include "GaudiAlg/GaudiSequencer.h"
16 #include "GaudiAlg/Sequencer.h"
18 #include "boost/assign/list_of.hpp"
20 #include "google/heap-profiler.h"
21 #include "google/heap-checker.h"
22 #include "google/profiler.h"
99 return ( dynamic_cast<GaudiSequencer*>(i) != NULL ||
100 dynamic_cast<Sequencer*>(i) != NULL );
119 const std::string& name )
const
121 std::ostringstream t;
122 t << name <<
"-" <<
type;
123 if ( type ==
"Execute" ) t <<
"-Event" <<
m_nEvts;
187 std::ostringstream t;
200 <<
"Starting Auditor for " << s <<
":" << type
208 <<
"Auditor already running. Cannot be started for " << s
218 std::ostringstream t;
234 std::ostringstream t;
309 , m_log ( msgSvc() , name )
312 , m_sampleEventCount( 0 )
313 , m_inFullAudit ( false )
317 const std::vector<std::string> tmp =
318 boost::assign::list_of
329 "List of phases to activate the Auditoring during" );
331 "List of component names to disable the auditing for" );
334 "The frequence to audit events. -1 means all events" );
336 "If true, instead of individually auditing components, the full event (or events) will be audited in one go" );
338 "The number of events to include in a full event audit, if enabled" );
340 "Number of events to skip before activating the auditing" );
342 "If true, auditing will be skipped for Sequencer objects." );
375 HeapProfilerStart(s.c_str());
382 HeapProfilerDump(s.c_str());
386 const char * profile = GetHeapProfile();
436 const char * HEAPCHECK = getenv(
"HEAPCHECK");
440 <<
"Environment variable HEAPCHECK must be set to 'local'"
444 if ( std::string(HEAPCHECK) !=
"local" )
447 <<
"Environment variable HEAPCHECK is set to " << HEAPCHECK
448 <<
" Partial Program Heap Checking is disabled"
462 m_checker =
new HeapLeakChecker(s.c_str());
518 ProfilerStart((s+
".prof").c_str());