numaprof
numaprof copied to clipboard
Start/Stop hook in apps
trafficstars
Add hook support to start and stop instrumentation to track only a sub-part of the application.
The patch should be quite easy.
It requires to :
- capture call to two functions to start/stop instrumentation which might be named numaprof_instr_start/numaprof_instr_stop. Can look on malloc/free/realloc instrumentation.
- Add an option to start numaprof in stop mode when running with this (or automatically enable if found usage of the two previous symbols)
- Do not instrument memory accesses in ThreadTracker if in stop mode.
To be seen if we keep analysis of first touch of not (if we place the if/return at beginning of function of if/set skip.
Work is mainly here :
- https://github.com/memtt/numaprof/blob/master/src/integration/pintool/numaprof.cpp#L989
- https://github.com/memtt/numaprof/blob/master/src/lib/core/ThreadTracker.cpp#L239
- https://github.com/memtt/numaprof/blob/master/src/lib/core/ProcessTracker.hpp