Skip to content

Commit 82618d9

Browse files
committed
Updated AllocMonitor README
1 parent 11ad172 commit 82618d9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

PerfTools/AllocMonitor/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ The monitor is owned by the registry and should not be deleted by any other code
2929
of the monitor, one can call `cms::perftools::AllocMonitorRegistry::deregisterMonitor` to have the monitor removed from
3030
the callback list and be deleted (again, without the deallocation causing any callbacks).
3131

32+
NOTE: Experience has shown that using thread_local within a call to `allocCalled` or `deallocCalled` can lead to unexpected behavior. Therefore if per thread information must be gathered it is recommended to make a system that uses thread ids.
33+
An example of such code can be found in the implementation of ModuleAllocMonitor.
34+
3235
## General usage
3336

3437
To use the facility, one needs to use LD_PRELOAD to load in the memory proxies before the application runs, e.g.
@@ -99,3 +102,16 @@ The output file contains the following information on each line
99102
- Number of calls made to deallocation functions
100103

101104
This service is multi-thread safe. Note that when run multi-threaded the maximum reported value will vary from job to job.
105+
106+
### ModuleAllocMonitor
107+
This service registers a monitor when the service is created (after python parsing is finished but before any modules
108+
have been loaded into cmsRun) and writes module related information to the specified file. The file name, an optional
109+
list of module names, and an optional number of initial events to skip are specified by setting parameters of the
110+
service in the configuration. The parameters are
111+
- filename: name of file to which to write reports
112+
- moduleNames: list of modules which should have their information added to the file. An empty list specifies all modules should be included.
113+
- nEventsToSkip: the number of initial events that must be processed before reporting happens.
114+
115+
The beginning of the file contains a description of the structure and contents of the file.
116+
117+
This service is multi-thread safe.

0 commit comments

Comments
 (0)