Commit Graph

79 Commits

Author SHA1 Message Date
flow a17301ab3d gh-135953: Properly obtain main thread identifier in Gecko Collector (#146045) 2026-03-22 18:53:00 +00:00
Hugo van Kemenade 104cae039a gh-142927: Move hotspots up flamegraph sidebar (#145428) 2026-03-16 23:01:41 +00:00
Hugo van Kemenade 368a26777a gh-142927: Detect system theme in flame graph like in heatmap (#144885) 2026-03-10 13:38:48 +02:00
Hugo van Kemenade 2e2109d224 gh-142927: Tachyon: Fix singular and plurals (#145329) 2026-02-28 01:48:35 +00:00
Maurycy Pawłowski-Wieroński be4ee8ee42 gh-144342: Use time.sleep in profiling.sampling (#144343) 2026-01-30 15:13:21 +00:00
Divyanshu Choudhury 5f57f6970b gh-143423: Fix free-threaded build detection in sampling profiler (#143426) 2026-01-30 00:35:30 +00:00
László Kiss Kollár ef3b8829e4 gh-142927: Clarify pstats file output in docs and CLI (#143388)
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.
2026-01-03 21:16:29 +00:00
Pablo Galindo Salgado 09ce592499 gh-142927: Hide _sync_coordinator frames from profiler output (#143337) 2026-01-02 12:09:36 +00:00
Pablo Galindo Salgado 6b9a6c6ec3 gh-138122: Move local imports to module level in sampling profiler (#143257) 2026-01-02 02:31:39 +00:00
Pablo Galindo Salgado e5ad7b7694 gh-138122: Integrate live profiler TUI with _colorize theming system (#142360)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-01-01 21:10:52 +00:00
Pablo Galindo Salgado 513ae175bb gh-142927: Fix heatmap caller navigation for interior lines (#143180) 2026-01-01 19:05:59 +00:00
ivonastojanovic 5d133351c6 gh-142927: Auto-open HTML output in browser after generation (#143178) 2026-01-01 19:05:45 +00:00
Marta Gómez Macías 9d92ac1225 gh-143040: Exit taychon live mode gracefully and display profiled script errors (#143101) 2025-12-27 00:36:15 +00:00
László Kiss Kollár 888d101445 gh-138122: Remove default duration for statistical profiling (#143174)
Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2025-12-25 19:21:16 +00:00
Hugo van Kemenade ea3fd785cb gh-142927: Tachyon: Fix contrast ratio in top panel (#142936) 2025-12-25 18:28:13 +00:00
ivonastojanovic 59ede34c8c gh-138122: Convert GIL/GC/exception stats from tiles to progress bars (#143177) 2025-12-25 18:22:54 +00:00
Pablo Galindo Salgado 7c44f37170 gh-138122: Extend binary profiling format with full source location and opcode (#143088)
Co-authored-by: Stan Ulbrych <stan@ulbrych.org>
2025-12-24 16:15:11 +00:00
László Kiss Kollár d4dc3dd9aa gh-138122: Replace --interval with --sampling-rate (#143085) 2025-12-24 13:46:33 +00:00
Pablo Galindo Salgado 81c8eb85e1 gh-138122: Add blocking mode for accurate stack traces in Tachyon (#142998) 2025-12-23 10:49:47 +00:00
Pablo Galindo Salgado 9e51301234 gh-138122: Allow tachyon to write and read binary output (#142730) 2025-12-22 23:57:20 +00:00
Hugo van Kemenade ff7f62eb23 gh-142927: Tachyon: Comma separate thousands and fix singular/plurals (#142934) 2025-12-22 14:15:57 +00:00
Hugo van Kemenade 5b5263648f gh-142927: Tachyon: Start with user's default light/dark theme (#142987) 2025-12-20 02:36:09 +01:00
ivonastojanovic cbc0851ada gh-138122: Improve bytecode panel (#142910)
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.
2025-12-18 11:43:39 +00:00
Keming d4095f25e8 gh-142654: show the clear error message when sampling on an unknown PID in tachyon (#142655)
Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2025-12-17 14:15:22 +00:00
ivonastojanovic 8c87bcd7f2 gh-138122: Update Tachyon dark theme colors (#142841) 2025-12-16 20:58:56 +00:00
Pablo Galindo Salgado 6658e2cb07 gh-138122: Add --subprocesses flag to profile child processes in tachyon (#142636) 2025-12-15 12:11:40 +00:00
Savannah Ostrowski f893e8f256 GH-142591: Tachyon does not handle non-existent file/module (#142592)
Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2025-12-14 04:58:40 +00:00
Pablo Galindo Salgado 52daab111b gh-138122: Fix sample counting for filtered profiling modes (#142677) 2025-12-14 03:31:51 +00:00
Savannah Ostrowski 3e36d37535 GH-142646: Update Tachyon to use backtick formatting in CLI help (#142647) 2025-12-13 05:20:28 +00:00
Stan Ulbrych 40ac3a9343 gh-138122: Tachyon Flamegraph: Make toggle keyboard accesible and adjust sidebar collapse CSS (#142638) 2025-12-12 17:27:12 +00:00
Stan Ulbrych 340a684674 gh-138122: Add docs button to Tachyon heatmap and flamegraph (#142614) 2025-12-12 15:06:28 +00:00
Pablo Galindo Salgado 519bee474b gh-138122: Add code examples to the profiling.sampling ddocs (#142609) 2025-12-12 01:37:47 +00:00
ivonastojanovic 3b3838823a gh-138122: Add inverted flamegraph (#142288)
Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2025-12-12 01:36:28 +00:00
Pablo Galindo Salgado 1356fbed7b gh-142374: Fix recursive function cumulative over-counting in sampling profiler (#142378) 2025-12-12 00:50:17 +00:00
Stan Ulbrych b1c9582ebe gh-138122: Tachyon heatmap: Make toggle switches keyboard accessible (#142601) 2025-12-11 21:58:09 +00:00
Stan Ulbrych 2eca80ffab gh-138122: Make Tachyon flamegraph and heatmap output more similar (#142590) 2025-12-11 21:28:42 +00:00
Pablo Galindo Salgado 6a0135a392 gh-138122: Add exception profiling mode to the sampling profiler (#142561) 2025-12-11 20:46:34 +00:00
Stan Ulbrych 0dd83111ab Tachyon: Fix heatmap line highlight animation overriding heat colors (#142522) 2025-12-11 04:30:16 +00:00
Pablo Galindo Salgado 5b19c75b47 gh-138122: Make the tachyon profiler opcode-aware (#142394) 2025-12-11 03:41:47 +00:00
Stan Ulbrych 2db9573e23 Tachyon: Set favicon for heatmap pages (#142493) 2025-12-10 14:10:23 +00:00
Stan Ulbrych b5576d8146 Tachyon: Remove spurious CSS for stat-card (#142487) 2025-12-09 19:13:54 +00:00
Stan Ulbrych 9b4ce3c429 Tachyon: Make "Tachyon" in navbar link to index.html (#142486) 2025-12-09 18:51:57 +00:00
Stan Ulbrych 09d6bf20b6 Tachyon: Fix unesecarry plural when there is a single file/sample (#142478) 2025-12-09 17:45:52 +00:00
Pablo Galindo Salgado 4279785b31 gh-140727: Restructure profiling documentation for PEP 799 (#142373)
* 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.
2025-12-09 12:55:04 +00:00
Stan Ulbrych 726e8e8def Tachyon: Fix html output sidebar cards hidden behind section headers on hover (#142428) 2025-12-08 21:10:48 +00:00
Hugo van Kemenade 3fa1425bfb gh-142363: Improve Tachyon flamegraph contrast (#142377) 2025-12-08 00:51:51 +00:00
Pablo Galindo Salgado 572c780aa8 gh-138122: Implement frame caching in RemoteUnwinder to reduce memory reads (#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.
2025-12-06 22:37:34 +00:00
Savannah Ostrowski 332da6295f GH-142363: Contrast and gradient CSS fixes for Tachyon flamegraph (#142364) 2025-12-06 22:09:10 +00:00
ivonastojanovic c91c373ef6 gh-140677 Improve heatmap colors (#142241)
Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2025-12-06 20:27:16 +00:00
Savannah Ostrowski 56a442d0d8 GH-141565: Add async code awareness to Tachyon (#141533)
Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2025-12-06 19:31:40 +00:00