Skip to content

Commit fb9a7d5

Browse files
committed
Add cmsDriver alloc_monitor option to use prefix env LD_PRELOAD=libPerfToolsAllocMonitorPreload.so
1 parent 1ecb732 commit fb9a7d5

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

Configuration/Applications/python/ConfigBuilder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ class Options:
7676
defaultOptions.profile = None
7777
defaultOptions.heap_profile = None
7878
defaultOptions.maxmem_profile = None
79+
defaultOptions.alloc_monitor = None
7980
defaultOptions.isRepacked = False
8081
defaultOptions.restoreRNDSeeds = False
8182
defaultOptions.donotDropOnInput = ''

Configuration/Applications/python/Options.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,11 +435,17 @@
435435
dest="heap_profile")
436436

437437
expertSettings.add_argument("--maxmem_profile",
438-
help="add the PerfTools/MaxMemoryPreload monitor",
438+
help="add the PerfTools/MaxMemoryPreload module",
439439
default=False,
440440
action="store_true",
441441
dest="maxmem_profile")
442442

443+
expertSettings.add_argument("--alloc_monitor",
444+
help="add the PerfTools/AllocMonitor module",
445+
default=False,
446+
action="store_true",
447+
dest="alloc_monitor")
448+
443449
expertSettings.add_argument("--io",
444450
help="Create a json file with io informations",
445451
default=None,

Configuration/Applications/python/cmsDriverOptions.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,12 @@ def OptionsFromItems(items):
256256
if options.maxmem_profile:
257257
if options.prefix:
258258
raise Exception("--maxmem_profile and --prefix are incompatible")
259-
options.prefix = "env LD_PRELOAD=libPerfToolsAllocMonitorPreload.so:libPerfToolsMaxMemoryPreload.so "
259+
options.prefix = "env LD_PRELOAD=libPerfToolsMaxMemoryPreload.so "
260+
261+
if options.alloc_monitor:
262+
if options.prefix:
263+
raise Exception("--alloc_monitor and --prefix are incompatible")
264+
options.prefix = "env LD_PRELOAD=libPerfToolsAllocMonitorPreload.so"
260265

261266
# If an "era" argument was supplied make sure it is one of the valid possibilities
262267
if options.era :

0 commit comments

Comments
 (0)