| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

JemallocProfileSvc.h
Go to the documentation of this file.
1 #ifndef JEMALLOC_JEMALLOCPROFILESVC_H
2 #define JEMALLOC_JEMALLOCPROFILESVC_H 1
3
4 // Include files
5 #include "GaudiKernel/Service.h"
6 #include "GaudiKernel/IIncidentListener.h"
7
18 class JemallocProfileSvc : public extends<Service,
19 IIncidentListener> {
20
21 public:
23 JemallocProfileSvc(const std::string &name, ISvcLocator *svcLoc);
24
26 StatusCode initialize();
27
29 StatusCode finalize();
30
31 // Handler for incident
32 void handle(const Incident &incident);
33
35 virtual ~JemallocProfileSvc();
36
37 protected:
38 void handleBegin();
39 void handleEnd();
40 void startProfiling();
41 void stopProfiling();
42 void dumpProfile();
43
44
45 private:
47 int m_nStartFromEvent; // Event to start profiling at
48 int m_nStopAtEvent; // Event to stop profiling at
49 int m_dumpPeriod; // Period at which to dump the heap
50 int m_eventNumber; // Current event number
51 std::vector<std::string> m_startFromIncidents; // Incidents to use as trigger
52 std::vector<std::string> m_stopAtIncidents; // Incidents to use as trigger
53 bool m_hasStartIncident;
54 bool m_hasStopIncident;
55
56
58 bool m_profiling;
59
61 SmartIF<IIncidentSvc> m_incidentSvc;
62 };
63 #endif // JEMALLOC_JEMALLOCPROFILESVC_H
SmartIF< IIncidentSvc >
JemallocProfileSvc::initialize
StatusCode initialize()
Initializer.
Definition: JemallocProfileSvc.cpp:59
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
JemallocProfileSvc::startProfiling
void startProfiling()
Utility method to start profiling with jemalloc.
Definition: JemallocProfileSvc.cpp:200
JemallocProfileSvc::finalize
StatusCode finalize()
Finalizer.
Definition: JemallocProfileSvc.cpp:105
JemallocProfileSvc
Service that enables the Jemalloc profiler on demand.
Definition: JemallocProfileSvc.h:18
JemallocProfileSvc::m_stopAtIncidents
std::vector< std::string > m_stopAtIncidents
Definition: JemallocProfileSvc.h:52
JemallocProfileSvc::~JemallocProfileSvc
virtual ~JemallocProfileSvc()
Definition: JemallocProfileSvc.cpp:233
JemallocProfileSvc::m_hasStopIncident
bool m_hasStopIncident
Definition: JemallocProfileSvc.h:54
JemallocProfileSvc::handleBegin
void handleBegin()
Definition: JemallocProfileSvc.cpp:165
std::string
STL class.
JemallocProfileSvc::m_eventNumber
int m_eventNumber
Definition: JemallocProfileSvc.h:50
Service.h
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:319
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
JemallocProfileSvc::m_nStopAtEvent
int m_nStopAtEvent
Definition: JemallocProfileSvc.h:48
JemallocProfileSvc::stopProfiling
void stopProfiling()
Utility method to stop profiling with jemalloc.
Definition: JemallocProfileSvc.cpp:211
JemallocProfileSvc::m_hasStartIncident
bool m_hasStartIncident
Definition: JemallocProfileSvc.h:53
JemallocProfileSvc::m_dumpPeriod
int m_dumpPeriod
Definition: JemallocProfileSvc.h:49
std::vector< std::string >
JemallocProfileSvc::m_startFromIncidents
std::vector< std::string > m_startFromIncidents
Definition: JemallocProfileSvc.h:51
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
Incident
Base class for all Incidents (computing events).
Definition: Incident.h:17
JemallocProfileSvc::dumpProfile
void dumpProfile()
Utility method to dump profile with jemalloc.
Definition: JemallocProfileSvc.cpp:220
JemallocProfileSvc::handleEnd
void handleEnd()
Definition: JemallocProfileSvc.cpp:177
JemallocProfileSvc::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Pointer to the incident service.
Definition: JemallocProfileSvc.h:61
IIncidentListener.h
JemallocProfileSvc::JemallocProfileSvc
JemallocProfileSvc(const std::string &name, ISvcLocator *svcLoc)
Standard constructor.
Definition: JemallocProfileSvc.cpp:28
JemallocProfileSvc::m_nStartFromEvent
int m_nStartFromEvent
Start, End event and counter.
Definition: JemallocProfileSvc.h:47
JemallocProfileSvc::handle
void handle(const Incident &incident)
Destructor.
Definition: JemallocProfileSvc.cpp:120
JemallocProfileSvc::m_profiling
bool m_profiling
Status of the profiling.
Definition: JemallocProfileSvc.h:58