-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix profiling when python symbols aren't available. (#718)
Since python 3.10 - we haven't been able to profile python interpreters that have been compiled without symbols. This is because cpython changed where the 'PyRuntime' global is stored in python 3.10, from being in the BSS section into being in its own named section in the binary. This especially affected profiling on windows, where you'd have to install python symbols to be able to use py-spy. Fix by reading in the address/size of the the PyRuntime section from the elf/mach/pe binaries and using that to scan python interpreters when symbols aren't available.
- Loading branch information
Showing
2 changed files
with
87 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters