12 int mallctl(
const char *
name,
void *oldp,
size_t *oldlenp,
void *newp,
size_t newlen);
30 :
GaudiAlgorithm ( name , pSvcLocator ), m_profiling(false), m_eventNumber (0)
33 declareProperty(
"StartFromEventN", m_nStartFromEvent = 1,
34 "After what event we start profiling. "
37 declareProperty(
"StopAtEventN", m_nStopAtEvent = 0,
38 "After what event we stop profiling. "
39 "If 0 than we also profile finalization stage. Default = 0."
42 declareProperty(
"DumpPeriod", m_dumpPeriod = 100,
43 "Period for dumping head to a file. Default=100"
61 int res =
mallctl(
"prof.active", NULL, NULL, &active,
sizeof(active));
82 info() <<
"Starting Jemalloc profile at event "
88 info() <<
"Jemalloc Dumping heap at event "
90 mallctl(
"prof.dump", NULL, NULL, NULL, 0);
96 info() <<
"Stopping Jemalloc profile at event "
98 mallctl(
"prof.dump", NULL, NULL, NULL, 0);
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
virtual StatusCode finalize()
Algorithm finalization.
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
StatusCode initialize() override
standard initialization method
bool isFailure() const
Test for a status code of FAILURE.
virtual StatusCode execute()
Algorithm execution.
This class is used for returning status codes from appropriate routines.
StatusCode finalize() override
standard finalization method
#define DECLARE_ALGORITHM_FACTORY(x)
The useful base class for data processing algorithms.
virtual StatusCode initialize()
Algorithm initialization.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
virtual ~JemallocProfile()
Destructor.
Algorithm to enable/disable the profiling of the head by Jemalloc.
int mallctl(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen)