]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-135953: Implement sampling tool under profile.sample (#135998)
authorLászló Kiss Kollár <kiss.kollar.laszlo@gmail.com>
Thu, 10 Jul 2025 17:44:24 +0000 (18:44 +0100)
committerGitHub <noreply@github.com>
Thu, 10 Jul 2025 17:44:24 +0000 (18:44 +0100)
commit59acdba820f75081cfb47ad6e71044d022854cbc
tree870d1dde8659c961ac4ca447d8fa22c312402b07
parent35e2c359703e076256c1249b74b87043972e04d6
gh-135953:  Implement sampling tool under profile.sample (#135998)

Implement a statistical sampling profiler that can profile external
Python processes by PID. Uses the _remote_debugging module and converts
the results to pstats-compatible format for analysis.

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
15 files changed:
Doc/library/profile.rst
Doc/whatsnew/3.15.rst
Lib/profile/__init__.py [new file with mode: 0644]
Lib/profile/__main__.py [new file with mode: 0644]
Lib/profile/collector.py [new file with mode: 0644]
Lib/profile/profile.py [moved from Lib/profile.py with 90% similarity]
Lib/profile/pstats_collector.py [new file with mode: 0644]
Lib/profile/sample.py [new file with mode: 0644]
Lib/profile/stack_collector.py [new file with mode: 0644]
Lib/pstats.py
Lib/test/test_external_inspection.py
Lib/test/test_sample_profiler.py [new file with mode: 0644]
Makefile.pre.in
Misc/NEWS.d/next/Library/2025-07-06-18-38-10.gh-issue-135953.Z29DCz.rst [new file with mode: 0644]
Python/remote_debug.h