|
ATLAS Offline Software
|
#include <ValgrindSvc.h>
Definition at line 31 of file ValgrindSvc.h.
◆ ValgrindSvc() [1/2]
ValgrindSvc::ValgrindSvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Constructor with parameters:
Definition at line 35 of file ValgrindSvc.cxx.
45 "List of profiled algorithms" );
48 "Intervals to profile (e.g. 'MyAlg.initialize:MyAlg.finalize'" );
51 "Dump separate profile after each event" );
54 "Dump separate profile after each interval in ProfiledIntervals" );
57 "List of incidents on which to dump a profile");
60 "Do not profile the first N events");
◆ ~ValgrindSvc()
ValgrindSvc::~ValgrindSvc |
( |
| ) |
|
|
virtual |
◆ ValgrindSvc() [2/2]
ValgrindSvc::ValgrindSvc |
( |
| ) |
|
|
private |
◆ callgrindDumpStats()
void ValgrindSvc::callgrindDumpStats |
( |
std::ostream & |
out | ) |
|
|
virtual |
◆ callgrindStartInstrumentation()
void ValgrindSvc::callgrindStartInstrumentation |
( |
| ) |
|
|
virtual |
◆ callgrindStopInstrumentation()
void ValgrindSvc::callgrindStopInstrumentation |
( |
| ) |
|
|
virtual |
◆ callgrindToggleCollect()
void ValgrindSvc::callgrindToggleCollect |
( |
| ) |
|
|
virtual |
◆ finalize()
StatusCode ValgrindSvc::finalize |
( |
| ) |
|
◆ handle()
void ValgrindSvc::handle |
( |
const Incident & |
incident | ) |
|
incident service handle for Begin/EndEvent
Definition at line 144 of file ValgrindSvc.cxx.
150 if ( inc.type() == IncidentType::BeginEvent ) {
153 ATH_MSG_DEBUG (
"[BeginEvent] Callgrind instrumentation ON.");
160 if ( useEventIncident ) {
177 <<
" after incident [" << inc.type() <<
"].");
◆ initialize()
StatusCode ValgrindSvc::initialize |
( |
| ) |
|
Gaudi Service Implementation.
Definition at line 73 of file ValgrindSvc.cxx.
77 ATH_MSG_INFO (
"My process ID is [" << System::procID() <<
"]");
79 const bool insideValgrind =
static_cast<bool>(RUNNING_ON_VALGRIND);
80 if ( insideValgrind ) {
81 ATH_MSG_INFO (
"=== Running from inside Valgrind ! Hi there! ===");
92 makeAuditor(
"ValgrindAuditor",auditorSvc()).ignore();
94 if ((auditorSvc()==0) || auditorSvc()->getAuditor(
"ValgrindAuditor")==0) {
96 return StatusCode::FAILURE;
106 incSvc->addListener(
this, IncidentType::BeginEvent );
107 incSvc->addListener(
this, IncidentType::EndEvent );
110 incSvc->addListener(
this, incident );
113 return StatusCode::SUCCESS;
◆ interfaceID()
const InterfaceID & ValgrindSvc::interfaceID |
( |
| ) |
|
|
inlinestatic |
◆ makeAuditor()
StatusCode ValgrindSvc::makeAuditor |
( |
const std::string & |
audName, |
|
|
IAuditorSvc * |
audSvc |
|
) |
| |
|
private |
helper method to create auditors
Definition at line 224 of file ValgrindSvc.cxx.
229 return StatusCode::FAILURE;
232 if ( 0 != audSvc->getAuditor( audName ) ) {
234 << audName <<
"]... good.");
235 return StatusCode::SUCCESS;
238 const std::string
propName =
"Auditors";
239 IProperty * audSvcProp =
dynamic_cast<IProperty*
>(audSvc);
241 if ( 0 == audSvcProp ) {
242 ATH_MSG_ERROR (
"Could not dyn-cast IAuditorSvc to an IProperty !!");
243 return StatusCode::FAILURE;
246 StringArrayProperty audNames;
247 audNames.assign( audSvcProp->getProperty(
propName) );
248 std::vector<std::string> updatedNames( audNames.value() );
249 updatedNames.push_back( audName );
250 audNames.set( updatedNames );
252 if ( !audSvcProp->setProperty( audNames ).isSuccess() ) {
254 (
"Could not add [" << audName
255 <<
"] to the list of auditors of [AuditorSvc] !!"
257 << audSvcProp->getProperty(
propName));
258 return StatusCode::FAILURE;
262 if ( 0 == audSvc->getAuditor( audName ) ) {
264 << audName <<
"] !!");
265 return StatusCode::FAILURE;
269 return StatusCode::SUCCESS;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ profileCount()
virtual unsigned int ValgrindSvc::profileCount |
( |
| ) |
|
|
inlinevirtual |
◆ queryInterface()
StatusCode ValgrindSvc::queryInterface |
( |
const InterfaceID & |
riid, |
|
|
void ** |
ppvInterface |
|
) |
| |
|
virtual |
Definition at line 124 of file ValgrindSvc.cxx.
130 return AthService::queryInterface(riid, ppvInterface);
133 return StatusCode::SUCCESS;
◆ valgrindDoLeakCheck()
void ValgrindSvc::valgrindDoLeakCheck |
( |
| ) |
|
|
virtual |
◆ SvcFactory< ValgrindSvc >
◆ m_algs
std::vector<std::string> ValgrindSvc::m_algs |
|
private |
List of algorithms to profile If list is empty, profile between begin/end event.
Definition at line 113 of file ValgrindSvc.h.
◆ m_dumpAfterEachEvent
bool ValgrindSvc::m_dumpAfterEachEvent |
|
private |
Dump separate profile after each event.
Definition at line 120 of file ValgrindSvc.h.
◆ m_dumpAfterEachInterval
bool ValgrindSvc::m_dumpAfterEachInterval |
|
private |
Dump separate profile after each interval.
Definition at line 123 of file ValgrindSvc.h.
◆ m_dumpAfterIncident
std::vector<std::string> ValgrindSvc::m_dumpAfterIncident |
|
private |
List of incidents on which to create a profile dump.
Definition at line 129 of file ValgrindSvc.h.
◆ m_eventCounter
unsigned int ValgrindSvc::m_eventCounter |
|
private |
Internal event counter for BeginEvent incident.
Definition at line 132 of file ValgrindSvc.h.
◆ m_ignoreFirstNEvents
unsigned int ValgrindSvc::m_ignoreFirstNEvents |
|
private |
Don't profile on the first N events.
Definition at line 126 of file ValgrindSvc.h.
◆ m_intervals
std::vector<std::string> ValgrindSvc::m_intervals |
|
private |
List of auditor intervals to profile Syntax: "MessageSvc.initialize:MessageSvc.finalize".
Definition at line 117 of file ValgrindSvc.h.
◆ m_profileCounter
unsigned int ValgrindSvc::m_profileCounter |
|
private |
The documentation for this class was generated from the following files:
std::vector< std::string > m_dumpAfterIncident
List of incidents on which to create a profile dump.
std::string find(const std::string &s)
return a remapped string
unsigned int m_eventCounter
Internal event counter for BeginEvent incident.
virtual void callgrindStopInstrumentation()
Stop callgrind instrumentation.
virtual void callgrindDumpStats(std::ostream &out)
Dump callgrind profiling stats.
#define ATH_MSG_VERBOSE(x)
virtual unsigned int profileCount()
Number of created callgrind profiles.
std::vector< std::string > m_intervals
List of auditor intervals to profile Syntax: "MessageSvc.initialize:MessageSvc.finalize".
StatusCode makeAuditor(const std::string &audName, IAuditorSvc *audSvc)
helper method to create auditors
bool m_dumpAfterEachInterval
Dump separate profile after each interval.
unsigned int m_ignoreFirstNEvents
Don't profile on the first N events.
virtual void callgrindStartInstrumentation()
Start callgrind instrumentation.
Abstract interface for ValgrindSvc. FIXME.
bool m_dumpAfterEachEvent
Dump separate profile after each event.
std::vector< std::string > m_algs
List of algorithms to profile If list is empty, profile between begin/end event.
unsigned int m_profileCounter
Counter of created profiles.
#define ATH_MSG_WARNING(x)
static const InterfaceID & interfaceID()