Skip to content

gh-149296: Add dump subcommand to sampling profiler for one-shot stack snapshots#149297

Open
pablogsal wants to merge 1 commit intopython:mainfrom
pablogsal:dump
Open

gh-149296: Add dump subcommand to sampling profiler for one-shot stack snapshots#149297
pablogsal wants to merge 1 commit intopython:mainfrom
pablogsal:dump

Conversation

@pablogsal
Copy link
Copy Markdown
Member

@pablogsal pablogsal commented May 2, 2026

Adds python -m profiling.sampling dump <pid>, which prints a single traceback-style snapshot of a running process's Python stack via the existing _remote_debugging unwinder. Supports per-thread status, source line highlighting, optional bytecode opcodes, and async-aware task reconstruction (--async-aware, default --async-mode=all).

@pablogsal pablogsal requested a review from ivonastojanovic May 2, 2026 18:12
@pablogsal pablogsal requested review from AA-Turner and hugovk as code owners May 2, 2026 18:12
@pablogsal pablogsal changed the title gh-149296: Add dump subcommand to sampling profiler for one-shot st… gh-149296: Add dump subcommand to sampling profiler for one-shot stack snapshots May 2, 2026
@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented May 2, 2026

…hot stack snapshots

Adds `python -m profiling.sampling dump <pid>`, which prints a single
traceback-style snapshot of a running process's Python stack via the
existing `_remote_debugging` unwinder. Supports per-thread status,
source line highlighting, optional bytecode opcodes, and async-aware
task reconstruction (`--async-aware`, default `--async-mode=all`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants