Skip to content
Snippets Groups Projects

Gaudi service for Jemalloc profiling (JemallocProfileSvc)

Merged Ben Couturier requested to merge (removed):LBCORE-1012 into master
+ 333
1
Compare changes
  • Side-by-side
  • Inline
Files
@@ -18,7 +18,10 @@ A Gaudi algorithm has also been developped to perform memory heap dumps at vario
and is configured using the StartFromEventN, StopAtEventN and DumpPeriod, as described
in the example below.
Run
A Gaudi service is also available to provide the same functionality, with the advantage
of being able to profile without modifying the algorithm sequence.
Running with the JemallocProfile algorithm
--------------------------------------------------------------------------------
### Change Options File
@@ -47,6 +50,36 @@ Please note the the `--profilerName=jemalloc` to enbale the profiling, and the `
a file containing information useful to interpret the results (process id of the Gaudi job, and the absolute path
of the executable, necessary to run the pprof analysis tool).
Running with the JemallocProfileSvc service
--------------------------------------------------------------------------------
### Change Options File
Simple example of using the JemallocProfileSvc service in a Gaudi configurable:
~~~~~~~{.py}
#!/usr/bin/env gaudirun.py
from Configurables import JemallocProfileSvc
#...
ApplicationMgr().ExtSvc += { "JemallocProfileSvc" }
JemallocProfileSvc().StartFromEventN=3
JemallocProfileSvc().StopAtEventN=7
JemallocProfileSvc().OutputLevel=DEBUG
~~~~~~~
It is also possible to trigger the profiling using incidents:
~~~~~~~{.py}
from Configurables import JemallocProfileSvc
ApplicationMgr().ExtSvc += { "JemallocProfileSvc" }
JemallocProfileSvc().StartFromIncidents= [ "MyStartIncident1", "MyStartIncident2" ]
JemallocProfileSvc().StopAtIncidents= [ "MyStopIncident" ]
~~~~~~~
### Run the job
This is identical as for the algorithm version.
Analyze
--------------------------------------------------------------------------------
### With text output
Loading