Add the option --script-after-fork to athenaHLT.py
A simple adaptation of atlas-tdaq-software/HLTMPPU!30 (merged) to athenaHLT.py
.
From the original MR description:
Another new feature to facilitate debugging and profiling. Allow to execute an arbitrary script in the python runner just after forking. The script may contain a format string {pid}
which will be replaced with the PID of the corresponding process. There are three options to execute: for the mother process, for the first fork, or for each fork in a sequence. The script process is started in the background and its outputs are redirected to files.
Potential use cases:
# profile memory in one fork
athenaHLT.py --script-after-fork "firstFork:heaptrack -p {pid}" <other-args>
# run vtune collection for one fork
athenaHLT.py --script-after-fork "firstFork:vtune -collect hotspots -target-pid {pid}" <other-args>
# run perf collection for all forks
athenaHLT.py --script-after-fork "allForks:perf record -o perf_{pid}.data -p {pid}" <other-args>
Plus anything you can imagine.