ATLAS Offline Software
Loading...
Searching...
No Matches
ValgrindSvc.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6
7// ValgrindSvc.h
8// Header file for class ValgrindSvc
9// Author: S.Binet<binet@cern.ch>
11#ifndef ATHENASERVICES_VALGRINDSVC_H
12#define ATHENASERVICES_VALGRINDSVC_H 1
13
14// STL includes
15#include <string>
16#include <iosfwd>
17
18// FrameWork includes
20#include "GaudiKernel/IIncidentListener.h"
21
22// AthenaKernel includes
24
25// Forward declaration
26class ISvcLocator;
27class IAuditorSvc;
28
29class ValgrindSvc : public extends<AthService,
30 IValgrindSvc,
31 IIncidentListener>
32{
34 // Public methods:
36 public:
37
39 ValgrindSvc( const std::string& name, ISvcLocator* pSvcLocator );
40
42 virtual ~ValgrindSvc();
43
45
46 virtual StatusCode initialize() override;
47 virtual StatusCode finalize() override;
49
51 virtual void handle( const Incident& incident ) override;
52
54 virtual void callgrindStartInstrumentation() override;
55
57 virtual void callgrindStopInstrumentation() override;
58
60 virtual void callgrindDumpStats( std::ostream& out ) override;
61
63 virtual void callgrindToggleCollect() override;
64
66 virtual void valgrindDoLeakCheck() override;
67
69 virtual unsigned int profileCount() override { return m_profileCounter; }
70
71
73 // Private data:
75 private:
76
79 std::vector<std::string> m_algs;
80
83 std::vector<std::string> m_intervals;
84
87
90
93
95 std::vector<std::string> m_dumpAfterIncident;
96
98 unsigned int m_eventCounter;
99
101 unsigned int m_profileCounter;
102};
103
104#endif //> ATHENASERVICES_VALGRINDSVC_H
std::vector< std::string > m_intervals
List of auditor intervals to profile Syntax: "MessageSvc.initialize:MessageSvc.finalize".
Definition ValgrindSvc.h:83
virtual void callgrindDumpStats(std::ostream &out) override
Dump callgrind profiling stats.
virtual void callgrindStopInstrumentation() override
Stop callgrind instrumentation.
bool m_dumpAfterEachInterval
Dump separate profile after each interval.
Definition ValgrindSvc.h:89
std::vector< std::string > m_dumpAfterIncident
List of incidents on which to create a profile dump.
Definition ValgrindSvc.h:95
virtual ~ValgrindSvc()
Destructor:
virtual void valgrindDoLeakCheck() override
Do a leak check now.
bool m_dumpAfterEachEvent
Dump separate profile after each event.
Definition ValgrindSvc.h:86
virtual void handle(const Incident &incident) override
incident service handle for Begin/EndEvent
unsigned int m_eventCounter
Internal event counter for BeginEvent incident.
Definition ValgrindSvc.h:98
virtual void callgrindToggleCollect() override
Toggle callgrind event collection.
virtual void callgrindStartInstrumentation() override
Start callgrind instrumentation.
virtual StatusCode finalize() override
virtual unsigned int profileCount() override
Number of created callgrind profiles.
Definition ValgrindSvc.h:69
std::vector< std::string > m_algs
List of algorithms to profile If list is empty, profile between begin/end event.
Definition ValgrindSvc.h:79
ValgrindSvc(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
unsigned int m_ignoreFirstNEvents
Don't profile on the first N events.
Definition ValgrindSvc.h:92
unsigned int m_profileCounter
Counter of created profiles.
virtual StatusCode initialize() override
Gaudi Service Implementation.