Skip to content

Conversation

@WillRosen
Copy link

Hello!

The main reasoning behind this change is the following issue:
#561

This changes the thread that checks for new subprocesses, and calls a new ‘should_spy_process’ function to determine if the subprocess should be spied on. It currently checks if the process name if within the whitelist, if no whitelist is provided then it reverts to the old behaviour.

It is important this check happens before checking the symbols, so it will reduce the CPU usage as mentioned in the issue above.
Example usage:
py-spy.exe record -o speedscope.json -f speedscope --pid x --subprocesses --whitelist=python,pythonw,ect

Let me know what your thoughts are, many thanks!
William Rosen

WillRosen and others added 5 commits June 30, 2023 11:50
If used, this will limit the subprocesses we monitor to the whitelist
This backs out before doing an expensive check of the symbols
Also rename and neaten should_spy_process function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant