From 4307b5a4a73a6413a2848198d2a155b446cc3096 Mon Sep 17 00:00:00 2001 From: Ben Frederickson Date: Sat, 26 Oct 2019 20:52:18 -0700 Subject: [PATCH] Update CHANGELOG/README for v0.3.0 --- CHANGELOG.md | 6 ++++++ README.md | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bbd6e6f..3f685d4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v0.3.0 + +* Add ability to profile subprocesses [#124](https://github.com/benfred/py-spy/issues/124) +* Fix overflow issue with linux symbolication [#183](https://github.com/benfred/py-spy/issues/183) +* Fixes for printing local variables [#180](https://github.com/benfred/py-spy/pull/180) + ## v0.2.2 * Add ability to show local variables when dumping out stack traces [#77](https://github.com/benfred/py-spy/issues/77) diff --git a/README.md b/README.md index 14873a89..c8ec59a3 100755 --- a/README.md +++ b/README.md @@ -51,8 +51,7 @@ You can change the file format to generate [speedscope](https://github.com/jlfwong/speedscope) profiles or raw data with the ```--format``` parameter. See ```py-spy record --help``` for information on other options including changing the sampling rate, filtering to only include threads that hold the GIL, profiling native C extensions, -showing thread-ids and more. - +showing thread-ids, profiling subprocesses and more. ### top @@ -132,6 +131,15 @@ noting for Cython programs is that py-spy needs the generated C or C++ file in o numbers of the original .pyx file. Read the [blog post](https://www.benfrederickson.com/profiling-native-python-extensions-with-py-spy/) for more information. +### How can I profile subprocesses? + +By passing in the ```--subprocesses``` flag to either the record or top view, py-spy will also include +the output from any python process that is a child process of the target program. This is useful +for profiling applications that use multiprocessing or gunicorn worker pools. py-spy will monitor +for new processes being created, and automatically attach to them and include samples from them in +the output. The record view will include the PID and cmdline of each program in the callstack, +with subprocesses appearing as children of their parent processes. + ### When do you need to run as sudo? py-spy works by reading memory from a different python process, and this might not be allowed for security reasons depending on