|
Gaudi Framework, version v23r2 |
| Home | Generated: Thu Jun 28 2012 |
Auditor using the Google Heap Checker. More...
#include <GoogleAuditor.cpp>


Public Member Functions | |
| HeapChecker (const std::string &name, ISvcLocator *pSvcLocator) | |
| Constructor. | |
| virtual | ~HeapChecker () |
| StatusCode | initialize () |
| Initialize the auditor base. | |
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_enabled |
| HeapLeakChecker * | m_checker |
Auditor using the Google Heap Checker.
See
http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html
For more details on usage.
Definition at line 387 of file GoogleAuditor.cpp.
| Google::HeapChecker::HeapChecker | ( | const std::string & | name, |
| ISvcLocator * | pSvcLocator | ||
| ) | [inline] |
Constructor.
Definition at line 393 of file GoogleAuditor.cpp.
: AuditorBase ( name, pSvcLocator ), m_enabled ( true ), m_checker ( NULL ) { }
| virtual Google::HeapChecker::~HeapChecker | ( | ) | [inline, virtual] |
Definition at line 399 of file GoogleAuditor.cpp.
{ delete m_checker; }
| bool Google::HeapChecker::alreadyRunning | ( | ) | [inline, protected, virtual] |
check if we are already running the tool
Implements Google::AuditorBase.
Definition at line 451 of file GoogleAuditor.cpp.
| void Google::HeapChecker::google_after | ( | const std::string & | s ) | [inline, protected, virtual] |
stop the google tool
Implements Google::AuditorBase.
Definition at line 438 of file GoogleAuditor.cpp.
| void Google::HeapChecker::google_before | ( | const std::string & | s ) | [inline, protected, virtual] |
Start the google tool.
Implements Google::AuditorBase.
Definition at line 430 of file GoogleAuditor.cpp.
| StatusCode Google::HeapChecker::initialize | ( | ) | [inline, virtual] |
Initialize the auditor base.
Reimplemented from Google::AuditorBase.
Definition at line 403 of file GoogleAuditor.cpp.
{
const StatusCode sc = AuditorBase::initialize();
if ( sc.isFailure() ) return sc;
const char * HEAPCHECK = getenv("HEAPCHECK");
if ( !HEAPCHECK )
{
m_log << MSG::FATAL
<< "Environment variable HEAPCHECK must be set to 'local'"
<< endmsg;
return StatusCode::FAILURE;
}
if ( std::string(HEAPCHECK) != "local" )
{
m_log << MSG::WARNING
<< "Environment variable HEAPCHECK is set to " << HEAPCHECK
<< " Partial Program Heap Checking is disabled"
<< endmsg;
m_enabled = false;
}
return sc;
}
HeapLeakChecker* Google::HeapChecker::m_checker [private] |
Definition at line 456 of file GoogleAuditor.cpp.
bool Google::HeapChecker::m_enabled [private] |
Definition at line 455 of file GoogleAuditor.cpp.