-
Notifications
You must be signed in to change notification settings - Fork 239
Add option to profile child processes #67
Comments
When the python process spawns another 10 processes, then it's hard to profile them. |
If there is a patch I will merge it. I think it should be optional via a flag, analogous to how What needs to be done:
|
I looked at this a little bit, and I'm confused at how to use the POSIX APIs correctly. Right now there's a loop in PtraceDeatch(pid);
std::this_thread::sleep_for(interval);
PtraceAttach(pid); The On Linux there's a method called I did this, set up my mask to get status>>8 == (SIGTRAP | (PTRACE_EVENT_FORK<<8)) We have a
This does not match the definition from the I pushed a branch called |
I fixed a bunch of bugs in this branch, and I got far enough to get a I looked at the Linux kernel code, and the ptrace event is normally put into the Fortunately there are a lot of alternatives: I can play around with |
I've hit a few use cases where it would be handy to profile a process and its children (multiprocessing, forking web servers, PySpark). Would there be interest in a patch implementing this?
The text was updated successfully, but these errors were encountered: