summaryrefslogtreecommitdiffstats
path: root/Lib/profiling/sampling
Commit message (Collapse)AuthorAgeFilesLines
* gh-142927: Clarify pstats file output in docs and CLI (#143388)László Kiss Kollár13 days1-2/+2
| | | | | | | | | When running the `profiling.sampling` module in pstats mode, the output can be emitted in two different ways: text to stdout or a binary file when the `--output` argument is set. The current documentation and help text is confusing as it does not distinguish between these two output formats so it may be surprising to the user to get different formats depending whether `--output` is set or not.
* gh-142927: Hide _sync_coordinator frames from profiler output (#143337)Pablo Galindo Salgado2026-01-023-3/+36
|
* gh-138122: Move local imports to module level in sampling profiler (#143257)Pablo Galindo Salgado2026-01-027-26/+26
|
* gh-138122: Integrate live profiler TUI with _colorize theming system (#142360)Pablo Galindo Salgado2026-01-014-85/+82
| | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-142927: Fix heatmap caller navigation for interior lines (#143180)Pablo Galindo Salgado2026-01-011-3/+34
|
* gh-142927: Auto-open HTML output in browser after generation (#143178)ivonastojanovic2026-01-011-0/+41
|
* gh-143040: Exit taychon live mode gracefully and display profiled script ↵Marta Gómez Macías2025-12-274-36/+62
| | | | errors (#143101)
* gh-138122: Remove default duration for statistical profiling (#143174)László Kiss Kollár2025-12-252-23/+24
| | | | Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
* gh-142927: Tachyon: Fix contrast ratio in top panel (#142936)Hugo van Kemenade2025-12-253-12/+26
|
* gh-138122: Convert GIL/GC/exception stats from tiles to progress bars (#143177)ivonastojanovic2025-12-253-90/+110
|
* gh-138122: Extend binary profiling format with full source location and ↵Pablo Galindo Salgado2025-12-241-1/+1
| | | | | | opcode (#143088) Co-authored-by: Stan Ulbrych <stan@ulbrych.org>
* gh-138122: Replace --interval with --sampling-rate (#143085)László Kiss Kollár2025-12-249-46/+101
|
* gh-138122: Add blocking mode for accurate stack traces in Tachyon (#142998)Pablo Galindo Salgado2025-12-232-11/+58
|
* gh-138122: Allow tachyon to write and read binary output (#142730)Pablo Galindo Salgado2025-12-2210-121/+568
|
* gh-142927: Tachyon: Comma separate thousands and fix singular/plurals (#142934)Hugo van Kemenade2025-12-225-46/+64
|
* gh-142927: Tachyon: Start with user's default light/dark theme (#142987)Hugo van Kemenade2025-12-205-53/+40
|
* gh-138122: Improve bytecode panel (#142910)ivonastojanovic2025-12-183-10/+91
| | | | | | | | The bytecode panel appears when a user generates a heatmap with --opcodes and clicks the button to unfold a line and display the bytecode instructions. Currently, an empty space appears on the left where the line number, self, and total columns are displayed. This area should instead extend those columns, rather than leaving a gap.
* gh-142654: show the clear error message when sampling on an unknown PID in ↵Keming2025-12-174-31/+72
| | | | | | tachyon (#142655) Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
* gh-138122: Update Tachyon dark theme colors (#142841)ivonastojanovic2025-12-162-9/+21
|
* gh-138122: Add --subprocesses flag to profile child processes in tachyon ↵Pablo Galindo Salgado2025-12-152-45/+421
| | | | (#142636)
* GH-142591: Tachyon does not handle non-existent file/module (#142592)Savannah Ostrowski2025-12-142-21/+107
| | | | Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
* gh-138122: Fix sample counting for filtered profiling modes (#142677)Pablo Galindo Salgado2025-12-142-21/+9
|
* GH-142646: Update Tachyon to use backtick formatting in CLI help (#142647)Savannah Ostrowski2025-12-131-16/+12
|
* gh-138122: Tachyon Flamegraph: Make toggle keyboard accesible and adjust ↵Stan Ulbrych2025-12-124-22/+35
| | | | sidebar collapse CSS (#142638)
* gh-138122: Add docs button to Tachyon heatmap and flamegraph (#142614)Stan Ulbrych2025-12-128-12/+87
|
* gh-138122: Add code examples to the profiling.sampling ddocs (#142609)Pablo Galindo Salgado2025-12-121-0/+0
|
* gh-138122: Add inverted flamegraph (#142288)ivonastojanovic2025-12-125-113/+341
| | | Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
* gh-142374: Fix recursive function cumulative over-counting in sampling ↵Pablo Galindo Salgado2025-12-124-43/+55
| | | | profiler (#142378)
* gh-138122: Tachyon heatmap: Make toggle switches keyboard accessible (#142601)Stan Ulbrych2025-12-114-4/+13
|
* gh-138122: Make Tachyon flamegraph and heatmap output more similar (#142590)Stan Ulbrych2025-12-116-34/+67
|
* gh-138122: Add exception profiling mode to the sampling profiler (#142561)Pablo Galindo Salgado2025-12-1110-7/+73
|
* Tachyon: Fix heatmap line highlight animation overriding heat colors (#142522)Stan Ulbrych2025-12-111-1/+0
|
* gh-138122: Make the tachyon profiler opcode-aware (#142394)Pablo Galindo Salgado2025-12-1118-135/+1980
|
* Tachyon: Set favicon for heatmap pages (#142493)Stan Ulbrych2025-12-101-0/+15
|
* Tachyon: Remove spurious CSS for `stat-card` (#142487)Stan Ulbrych2025-12-091-16/+0
|
* Tachyon: Make "Tachyon" in navbar link to `index.html` (#142486)Stan Ulbrych2025-12-092-1/+4
|
* Tachyon: Fix unesecarry plural when there is a single file/sample (#142478)Stan Ulbrych2025-12-091-2/+7
|
* gh-140727: Restructure profiling documentation for PEP 799 (#142373)Pablo Galindo Salgado2025-12-097-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add profiling module documentation structure PEP 799 introduces a new `profiling` package that reorganizes Python's profiling tools under a unified namespace. This commit adds the documentation structure to match: a main entry point (profiling.rst) that helps users choose between profilers, detailed docs for the tracing profiler (profiling-tracing.rst), and separated pstats documentation. The tracing profiler docs note that cProfile remains as a backward-compatible alias, so existing code continues to work. The pstats module gets its own page since it's used by both profiler types and deserves focused documentation. * Add profiling.sampling documentation The sampling profiler is new in Python 3.15 and works fundamentally differently from the tracing profiler. It observes programs from outside by periodically capturing stack snapshots, which means zero overhead on the profiled code. This makes it practical for production use where you can attach to live servers. The docs explain the key concepts (statistical vs deterministic profiling), provide quick examples upfront, document all output formats (pstats, flamegraph, gecko, heatmap), and cover the live TUI mode. The defaults table helps users understand what happens without any flags. * Wire profiling docs into the documentation tree Add the new profiling module pages to the Debugging and Profiling toctree. The order places the main profiling.rst entry point first, followed by the two profiler implementations, then pstats, and finally the deprecated profile module last. * Convert profile.rst to deprecation stub The pure Python profile module is deprecated in 3.15 and scheduled for removal in 3.17. Users should migrate to profiling.tracing (or use the cProfile alias which continues to work). The page now focuses on helping existing users migrate: it shows the old vs new import style, keeps the shared API reference since both modules have the same interface, and preserves the calibration docs for anyone still using the pure Python implementation during the transition period. * Update CLI module references for profiling restructure Point cProfile to profiling.tracing docs and add profiling.sampling to the list of modules with CLI interfaces. The old profile-cli label no longer exists after the documentation restructure. * Update whatsnew to link to profiling module docs Enable cross-references to the new profiling module documentation and update the CLI examples to use the current syntax with the attach subcommand. Also reference profiling.tracing instead of cProfile since that's the new canonical name.
* Tachyon: Fix html output sidebar cards hidden behind section headers on ↵Stan Ulbrych2025-12-081-1/+0
| | | | hover (#142428)
* gh-142363: Improve Tachyon flamegraph contrast (#142377)Hugo van Kemenade2025-12-082-3/+3
|
* gh-138122: Implement frame caching in RemoteUnwinder to reduce memory reads ↵Pablo Galindo Salgado2025-12-061-10/+102
| | | | | | | | | | | (#142137) This PR implements frame caching in the RemoteUnwinder class to significantly reduce memory reads when profiling remote processes with deep call stacks. When cache_frames=True, the unwinder stores the frame chain from each sample and reuses unchanged portions in subsequent samples. Since most profiling samples capture similar call stacks (especially the parent frames), this optimization avoids repeatedly reading the same frame data from the target process. The implementation adds a last_profiled_frame field to the thread state that tracks where the previous sample stopped. On the next sample, if the current frame chain reaches this marker, the cached frames from that point onward are reused instead of being re-read from remote memory. The sampling profiler now enables frame caching by default.
* GH-142363: Contrast and gradient CSS fixes for Tachyon flamegraph (#142364)Savannah Ostrowski2025-12-061-7/+7
|
* gh-140677 Improve heatmap colors (#142241)ivonastojanovic2025-12-065-151/+117
| | | | Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
* GH-141565: Add async code awareness to Tachyon (#141533)Savannah Ostrowski2025-12-066-82/+213
| | | | Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
* Remove unused imports (#142320)Victor Stinner2025-12-061-1/+1
|
* gh-142318: Fix typing `'q'` at interactive help screen exiting Tachyon (#142319)Stan Ulbrych2025-12-051-1/+3
|
* gh-140677 Add heatmap visualization to Tachyon sampling profiler (#140680)Pablo Galindo Salgado2025-12-0215-326/+3279
| | | | Co-authored-by: Ivona Stojanovic <stojanovic.i@hotmail.com>
* gh-138122: Small fixes to the new tachyon UI (#142157)Pablo Galindo Salgado2025-12-012-2/+4
|
* gh-138122: New Tachyon UI (#142116)László Kiss Kollár2025-12-015-1007/+1969
| | | | Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
* gh-141999: Handle KeyboardInterrupt when sampling in the new tachyon ↵yihong2025-11-301-41/+47
| | | | profiler (#142000)