-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way to monitor "cycles" #5
Comments
The profiler could listen to signals sent by the program when to start and stop profiling. E.g. Would that fit your needs? |
I was about to propose something similar. What about some communication channel (pipe?) sleepy could be listening to, to which a running process could send a token, telling to start profiling, and then to stop? |
The debug string option seems best to me, as other than the debug lines, it wouldn't need any other code changes. Some use cases I can imagine:
|
How would Very Sleepy "listen" for debug output from the target process? |
If you're only polling, and not truly waiting indefinitely, will you miss an event that happened in between waits? |
I think polling should work, otherwise there would be no way to reliably receive all debug events. I suppose the implementation (OS) might block the debuggee process until the debugger reads the pending debug event(s). |
Note that we already have a debugger thread which calls |
e.g. some standard way we can expose a counter in the code being profiled, and an option to profile for N iterations, or until a particular variable gets a given value.
This would make it simpler to compare subsequent runs over the same code (e.g. optimising loops)
The text was updated successfully, but these errors were encountered: