cpython/Misc/NEWS.d/next
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
..
Build GH-142234: Allow --enable-wasm-dynamic-linking under WASI (GH-142235) 2025-12-05 23:27:16 +00:00
C_API gh-142225: Fix PyABIInfo_VAR macro (GH-142230) 2025-12-04 10:33:15 +01:00
Core_and_Builtins gh-142236: Fix incorrect keyword suggestions for syntax errors (#142328) 2025-12-06 21:09:35 +00:00
Documentation gh-141994: Warn of XXE vulnerability in documentation of SAX feature xml.sax.handler.feature_external_ges (GH-141996) 2025-11-28 23:08:17 -08:00
IDLE Python 3.15.0a1 2025-10-14 13:46:08 +03:00
Library gh-138122: Implement frame caching in RemoteUnwinder to reduce memory reads (#142137) 2025-12-06 22:37:34 +00:00
macOS Python 3.15.0a1 2025-10-14 13:46:08 +03:00
Security gh-142145: Remove quadratic behavior in node ID cache clearing (GH-142146) 2025-12-02 23:16:37 -08:00
Tests gh-140210: Make test_sysconfig.test_parse_makefile_renamed_vars ignore environment variables (#140213) 2025-11-27 10:00:02 -08:00
Tools-Demos Merge branch 'main' of https://github.com/python/cpython 2025-11-19 11:42:45 +02:00
Windows Python 3.15.0a2 2025-11-18 16:51:17 +02:00