Gaudi Framework, version v23r2

Home   Generated: Thu Jun 28 2012
Public Member Functions | Protected Member Functions | Private Attributes

Google::HeapProfiler Class Reference

Auditor based on the Google Heap Profiler. More...

#include <GoogleAuditor.cpp>

Inheritance diagram for Google::HeapProfiler:
Inheritance graph
[legend]
Collaboration diagram for Google::HeapProfiler:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 HeapProfiler (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor.

Protected Member Functions

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

Private Attributes

bool m_dumpProfileHeaps
bool m_printProfilesToLog

Detailed Description

Auditor based on the Google Heap Profiler.

See

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

For more details.

Author:
Chris Jones
Date:
18/04/2011

Definition at line 330 of file GoogleAuditor.cpp.


Constructor & Destructor Documentation

Google::HeapProfiler::HeapProfiler ( const std::string name,
ISvcLocator pSvcLocator 
) [inline]

Constructor.

Definition at line 336 of file GoogleAuditor.cpp.

      : AuditorBase( name, pSvcLocator )
    {
      declareProperty( "DumpHeapProfiles",    m_dumpProfileHeaps   = true  );
      declareProperty( "PrintProfilesToLog",  m_printProfilesToLog = false );
    }

Member Function Documentation

bool Google::HeapProfiler::alreadyRunning (  ) [inline, protected, virtual]

check if we are already running the tool

Implements Google::AuditorBase.

Definition at line 365 of file GoogleAuditor.cpp.

{ return IsHeapProfilerRunning(); }
void Google::HeapProfiler::google_after ( const std::string s ) [inline, protected, virtual]

stop the google tool

Implements Google::AuditorBase.

Definition at line 350 of file GoogleAuditor.cpp.

    {
      if ( m_dumpProfileHeaps )
      {
        HeapProfilerDump(s.c_str());
      }
      if ( m_printProfilesToLog )
      {
        const char * profile = GetHeapProfile();
        m_log << MSG::INFO << profile << endmsg;
        delete profile;
      }
      HeapProfilerStop();
    }
void Google::HeapProfiler::google_before ( const std::string s ) [inline, protected, virtual]

Start the google tool.

Implements Google::AuditorBase.

Definition at line 345 of file GoogleAuditor.cpp.

    {
      HeapProfilerStart(s.c_str());
    }

Member Data Documentation

Definition at line 369 of file GoogleAuditor.cpp.

Definition at line 370 of file GoogleAuditor.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Thu Jun 28 2012 23:27:53 for Gaudi Framework, version v23r2 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004