ATLAS Offline Software
|
a Module implementing a simple leak checker More...
#include <LeakCheckModule.h>
Public Member Functions | |
virtual StatusCode | postFirstEvent (ModuleData &data) override |
action after processing first event More... | |
virtual StatusCode | onWorkerEnd (ModuleData &data) override |
action at the end of the worker job More... | |
virtual StatusCode | postFinalize (ModuleData &data) override |
actions after algorithms have been finalized More... | |
virtual StatusCode | firstInitialize (ModuleData &data) |
action at the the very beginning of the worker job More... | |
virtual StatusCode | preFileInitialize (ModuleData &data) |
action before opening the first file in the worker job More... | |
virtual StatusCode | onInitialize (ModuleData &data) |
action just before algorithms are initialized More... | |
virtual StatusCode | processInputs (ModuleData &data, IInputModuleActions &actions) |
process all input files More... | |
virtual StatusCode | onNewInputFile (ModuleData &data) |
actions after opening a new input file More... | |
virtual StatusCode | onCloseInputFile (ModuleData &data) |
actions before closing an input file More... | |
virtual StatusCode | postCloseInputFile (ModuleData &data) |
actions after CloseInputFile is called on the algorithms More... | |
virtual StatusCode | onFileExecute (ModuleData &data) |
actions just before fileExecute is called on algorithms More... | |
virtual StatusCode | onExecute (ModuleData &data) |
actions just before execute is called on algorithms More... | |
virtual StatusCode | onFinalize (ModuleData &data) |
actions just before algorithms are finalized More... | |
virtual StatusCode | postFileClose (ModuleData &data) |
action at end of the worker job More... | |
virtual void | reportInputFailure (ModuleData &data) |
report that we failed to open our input file More... | |
Private Member Functions | |
Long_t | memIncreaseResident () const |
Resident memory leak/increase during the job. More... | |
Long_t | memIncreaseVirtual () const |
Virtual memory leak/increase during the job. More... | |
Private Attributes | |
uint64_t | m_skippedEvents = 0 |
number of skipped events More... | |
Long_t | m_initMemResident = -1 |
Amount of resident memory used after initialisation in kB. More... | |
Long_t | m_initMemVirtual = -1 |
Amount of virtual memory used after initialisation in kB. More... | |
Long_t | m_finMemResident = -1 |
Amount of resident memory used after finalisation in kB. More... | |
Long_t | m_finMemVirtual = -1 |
Amount of virtual memory used after finalisation in kB. More... | |
a Module implementing a simple leak checker
Definition at line 24 of file LeakCheckModule.h.
|
virtualinherited |
action at the the very beginning of the worker job
This gets called as early as possible in the worker initialization. Essentially all that should happen before this is to load all the modules. The main purpose is to start any benchmarks that are meant to capture the initialization process as well.
Reimplemented in EL::Detail::MemoryMonitorModule, EL::Detail::AlgorithmMemoryModule, EL::Detail::AlgorithmTimerModule, and EL::Detail::StopwatchModule.
Definition at line 25 of file Module.cxx.
|
private |
Resident memory leak/increase during the job.
The idea here is that the worker captures the amount of memory used by the job during initialisation and finalisation, so that a rough estimate could be made about the memory leak behaviour of the user's code.
This function returns the number of kilobytes by which the used resident memory changed between initialisation and finalisation. If the function is called at an incorrect point in time, it throws an exception.
Definition at line 140 of file LeakCheckModule.cxx.
|
private |
Virtual memory leak/increase during the job.
The idea here is that the worker captures the amount of memory used by the job during initialisation and finalisation, so that a rough estimate could be made about the memory leak behaviour of the user's code.
This function returns the number of kilobytes by which the used virtual memory changed between initialisation and finalisation. If the function is called at an incorrect point in time, it throws an exception.
Definition at line 153 of file LeakCheckModule.cxx.
|
virtualinherited |
actions before closing an input file
Reimplemented in EL::Detail::AlgorithmStateModule, and EL::Detail::TreeCacheModule.
Definition at line 43 of file Module.cxx.
|
virtualinherited |
actions just before execute
is called on algorithms
For now that is mostly used to point input modules to the right event
Reimplemented in EL::Detail::TEventModule, EL::Detail::AlgorithmStateModule, EL::Detail::MemoryMonitorModule, and EL::Detail::GridReportingModule.
Definition at line 71 of file Module.cxx.
|
virtualinherited |
actions just before fileExecute
is called on algorithms
Reimplemented in EL::Detail::AlgorithmStateModule, EL::Detail::FileExecutedModule, and EL::Detail::StopwatchModule.
Definition at line 65 of file Module.cxx.
|
virtualinherited |
actions just before algorithms are finalized
Reimplemented in EL::Detail::AlgorithmStateModule, and EL::Detail::MemoryMonitorModule.
Definition at line 89 of file Module.cxx.
|
virtualinherited |
action just before algorithms are initialized
This is typically used for any setup that this module needs to do.
Reimplemented in EL::Detail::TEventModule, EL::Detail::AlgorithmStateModule, EL::Detail::MemoryMonitorModule, EL::Detail::FileExecutedModule, EL::Detail::FactoryPreloadModule, and EL::Detail::WorkerConfigModule.
Definition at line 77 of file Module.cxx.
|
virtualinherited |
actions after opening a new input file
Reimplemented in EL::Detail::TEventModule, EL::Detail::AlgorithmStateModule, EL::Detail::GridReportingModule, and EL::Detail::TreeCacheModule.
Definition at line 37 of file Module.cxx.
|
overridevirtual |
action at the end of the worker job
This is mostly meant/used to print job summary statements at the very end of worker job, and actually have them show up at or at least near the end of any log file.
Reimplemented from EL::Detail::Module.
Definition at line 82 of file LeakCheckModule.cxx.
|
virtualinherited |
actions after CloseInputFile
is called on the algorithms
Right now that is only used to disconnect the TEvent
object from the input file.
Reimplemented in EL::Detail::TEventModule.
Definition at line 49 of file Module.cxx.
|
virtualinherited |
action at end of the worker job
Executed just right before worker exit successfully at this stage all outputs have been created
Reimplemented in EL::Detail::GridReportingModule, and EL::Detail::PostClosedOutputsModule.
Definition at line 107 of file Module.cxx.
|
overridevirtual |
actions after algorithms have been finalized
This is usually used to calculate some job summary information that is to be stored it in the histogram output file.
Reimplemented from EL::Detail::Module.
Definition at line 50 of file LeakCheckModule.cxx.
|
overridevirtual |
action after processing first event
This is mostly meant to set up benchmarks that record per-event performance. While a lot of initialization happens during initialize()
there is a fair amount of initialization that happens on the first event, so when recording per-event performance the first event is sort of "special" and may need to be omitted.
Reimplemented from EL::Detail::Module.
Definition at line 31 of file LeakCheckModule.cxx.
|
virtualinherited |
action before opening the first file in the worker job
This is mostly meant to allow loading the dictionaries before any files and associated information is loaded.
Definition at line 31 of file Module.cxx.
|
virtualinherited |
process all input files
This deviates slightly from the usual pattern for module functions in that I pass in the possible actions as an argument. See IInputModuleActions for details.
Reimplemented in EL::Detail::BatchInputModule, and EL::Detail::DirectInputModule.
Definition at line 83 of file Module.cxx.
|
virtualinherited |
report that we failed to open our input file
Reimplemented in EL::Detail::GridReportingModule.
Definition at line 61 of file Module.cxx.
|
private |
Amount of resident memory used after finalisation in kB.
Definition at line 58 of file LeakCheckModule.h.
|
private |
Amount of virtual memory used after finalisation in kB.
Definition at line 62 of file LeakCheckModule.h.
|
private |
Amount of resident memory used after initialisation in kB.
Definition at line 50 of file LeakCheckModule.h.
|
private |
Amount of virtual memory used after initialisation in kB.
Definition at line 54 of file LeakCheckModule.h.
|
private |
number of skipped events
Definition at line 46 of file LeakCheckModule.h.