Currently, profiling can end because of two “triggers” (not considering errors):
- The target process exits
- It’s stopped explicitly (with CTRL+C)
Point 1.) is achieved with waiting on the target process’ HANDLE, and explicitly stopping the profiler, when the object gets signaled.
Point 2.) is dealt with using a Console Control Handler.
It would be useful to introduce another mechanism to end profiling: timeouts. E.g. a timeout of 10 minutes is given with a command line switch -–timeout=600, and after 10 minutes has passed, profiling will be stopped.
This might be useful in automated environments, when there is a chance that the profilee might get stuck in a (potentially busy) hang. This will also provide a safeguard in circumstances where we want to detect target processes ending using ETW events (dropped events might make that unreliable, see issue #5 ).
Currently, profiling can end because of two “triggers” (not considering errors):
Point 1.) is achieved with waiting on the target process’ HANDLE, and explicitly stopping the profiler, when the object gets signaled.
Point 2.) is dealt with using a Console Control Handler.
It would be useful to introduce another mechanism to end profiling: timeouts. E.g. a timeout of 10 minutes is given with a command line switch
-–timeout=600, and after 10 minutes has passed, profiling will be stopped.This might be useful in automated environments, when there is a chance that the profilee might get stuck in a (potentially busy) hang. This will also provide a safeguard in circumstances where we want to detect target processes ending using ETW events (dropped events might make that unreliable, see issue #5 ).