Google::CPUProfiler Class Reference

Auditor using the Google CPU Profiler. More...

#include <GoogleAuditor.cpp>

Inheritance diagram for Google::CPUProfiler:
Collaboration diagram for Google::CPUProfiler:

Public Member Functions

 CPUProfiler (const std::string &name, ISvcLocator *pSvcLocator)
 
- Public Member Functions inherited from Google::AuditorBase
 AuditorBase (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor. More...
 
virtual ~AuditorBase ()
 Destructor. More...
 
StatusCode initialize ()
 Initialize the auditor base. More...
 
StatusCode finalize ()
 Finalize the auditor base. More...
 
void handle (const Incident &incident)
 Implement the handle method for the Incident service. More...
 
void before (StandardEventType type, INamedInterface *i)
 
void before (CustomEventTypeRef type, INamedInterface *i)
 
void before (StandardEventType type, const std::string &s)
 
void before (CustomEventTypeRef type, const std::string &s)
 
void after (StandardEventType type, INamedInterface *i, const StatusCode &sc)
 
void after (CustomEventTypeRef type, INamedInterface *i, const StatusCode &sc)
 
void after (StandardEventType type, const std::string &s, const StatusCode &sc)
 
void after (CustomEventTypeRef type, const std::string &s, const StatusCode &)
 
void beforeInitialize (INamedInterface *i)
 
void beforeReinitialize (INamedInterface *i)
 
void beforeExecute (INamedInterface *i)
 
void beforeBeginRun (INamedInterface *i)
 
void beforeEndRun (INamedInterface *i)
 
void beforeFinalize (INamedInterface *i)
 
void afterInitialize (INamedInterface *i)
 
void afterReinitialize (INamedInterface *i)
 
void afterExecute (INamedInterface *i, const StatusCode &s)
 
void afterBeginRun (INamedInterface *i)
 
void afterEndRun (INamedInterface *i)
 
void afterFinalize (INamedInterface *i)
 
- Public Member Functions inherited from extends< BASE, Interfaces >
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::string > getInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
 ~extends () override=default
 Virtual destructor. More...
 
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::string > getInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
 ~extends () override=default
 Virtual destructor. More...
 
- Public Member Functions inherited from extend_interfaces< Interfaces...>
 ~extend_interfaces () override=default
 Virtual destructor. More...
 
 ~extend_interfaces () override=default
 Virtual destructor. More...
 

Protected Member Functions

void google_before (const std::string &s)
 Start the google tool. More...
 
void google_after (const std::string &)
 stop the google tool More...
 
bool alreadyRunning ()
 check if we are already running the tool More...
 

Private Attributes

bool m_running
 

Additional Inherited Members

- Public Types inherited from extends< BASE, Interfaces >
typedef extends base_class
 Typedef to this class. More...
 
typedef extend_interfaces< Interfaces...> extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef extends base_class
 Typedef to this class. More...
 
typedef extend_interfaces< Interfaces...> extend_interfaces_base
 Typedef to the base of this class. More...
 
- Public Types inherited from extend_interfaces< Interfaces...>
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type
 take union of the ext_iids of all Interfaces... More...
 
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type
 take union of the ext_iids of all Interfaces... More...
 
- Protected Attributes inherited from Google::AuditorBase
MsgStream m_log
 Messaging object. More...
 

Detailed Description

Auditor using the Google CPU Profiler.

See

http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html

For more details on usage.

Author
Chris Jones
Date
18/04/2011

Definition at line 507 of file GoogleAuditor.cpp.

Constructor & Destructor Documentation

Google::CPUProfiler::CPUProfiler ( const std::string &  name,
ISvcLocator pSvcLocator 
)
inline

Definition at line 512 of file GoogleAuditor.cpp.

513  : AuditorBase ( name, pSvcLocator ),
514  m_running ( false )
515  { }
AuditorBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.

Member Function Documentation

bool Google::CPUProfiler::alreadyRunning ( )
inlineprotectedvirtual

check if we are already running the tool

Implements Google::AuditorBase.

Definition at line 537 of file GoogleAuditor.cpp.

537 { return m_running; }
void Google::CPUProfiler::google_after ( const std::string &  s)
inlineprotectedvirtual

stop the google tool

Implements Google::AuditorBase.

Definition at line 528 of file GoogleAuditor.cpp.

529  {
530  if ( m_running )
531  {
532  ProfilerStop();
533  m_running = false;
534  }
535  }
void Google::CPUProfiler::google_before ( const std::string &  s)
inlineprotectedvirtual

Start the google tool.

Implements Google::AuditorBase.

Definition at line 519 of file GoogleAuditor.cpp.

520  {
521  if ( !m_running )
522  {
523  m_running = true;
524  ProfilerStart((s+".prof").c_str());
525  }
526  }
string s
Definition: gaudirun.py:246

Member Data Documentation

bool Google::CPUProfiler::m_running
private

Definition at line 541 of file GoogleAuditor.cpp.


The documentation for this class was generated from the following file: