| # Gaudi Framework, version v23r1 |

Home |  | Generated: Wed Feb 29 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:
[legend]
Collaboration diagram for Google::HeapProfiler:
[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

bool Google::HeapProfiler::m_dumpProfileHeaps`[private]`

Definition at line 369 of file GoogleAuditor.cpp.

bool Google::HeapProfiler::m_printProfilesToLog`[private]`

Definition at line 370 of file GoogleAuditor.cpp.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v23r1/GaudiProfiling/src/component/google/GoogleAuditor.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines