cpython/Misc
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
..
mypy gh-131507: Add support for syntax highlighting in PyREPL (GH-133247) 2025-05-02 20:22:31 +02:00
NEWS.d gh-138122: Implement frame caching in RemoteUnwinder to reduce memory reads (#142137) 2025-12-06 22:37:34 +00:00
rhel7 gh-95957: Add instructions for Tcl/Tk and OpenSSL on RHEL/CentOS 7 (#95964) 2022-08-16 13:44:02 +02:00
ACKS gh-105836: Fix asyncio.run_coroutine_threadsafe leaving underlying cancelled asyncio task running (#141696) 2025-12-06 19:33:25 +00:00
externals.spdx.json gh-140849: Update bundled liblzma to 5.8.1 on Windows (#141022) 2025-11-07 22:28:01 -08:00
HISTORY gh-123492: Remove unnecessary :func: parentheses (#123493) 2024-08-30 14:34:09 +03:00
indent.pro
platform_triplet.c gh-132026: Ensure _MIPS_SIM has defined _ABI identifiers for comparison (GH-132027) 2025-04-27 21:56:00 +00:00
Porting
python-config.in bpo-45101: Add consistency in usage message IO between 2 versions of python-config (GH-28162) 2024-02-26 22:04:44 +02:00
python-config.sh.in gh-116622: Rename build variable MODULE_LDFLAGS back to LIBPYTHON (#122764) 2024-08-09 00:00:55 +02:00
python-embed.pc.in
python.man Manpage: -X gil is not related to PYTHON_HISTORY (#133753) 2025-05-09 17:11:21 +03:00
python.pc.in gh-116622: Rename build variable MODULE_LDFLAGS back to LIBPYTHON (#122764) 2024-08-09 00:00:55 +02:00
README gh-124457: Remove coverity from CPython repo (GH-124460) 2024-09-27 13:42:32 -07:00
README.AIX
README.valgrind
sbom.spdx.json gh-140120: Refresh HACL* to fix an hmac memory leak (GH-140188) 2025-10-16 05:25:51 +00:00
SpecialBuilds.txt GH-129763: Remove the LLTRACE macro (GH-129764) 2025-02-07 08:49:51 -08:00
stable_abi.toml gh-141909: Correct version where Py_mod_gil was added (GH-141979) 2025-11-26 14:45:06 +00:00
svnmap.txt
valgrind-python.supp gh-121096: Ignore dlopen() leaks in Valgrind suppression file (#121097) 2024-06-28 13:10:11 +02:00
vgrindefs

Python Misc subdirectory
========================

This directory contains files that wouldn't fit in elsewhere.  Some
documents are only of historic importance.

Files found here
----------------

ACKS                    Acknowledgements
HISTORY                 News from previous releases -- oldest last
indent.pro              GNU indent profile approximating my C style
NEWS                    News for this release (for some meaning of "this")
Porting                 Mini-FAQ on porting to new platforms
python-config.in        Python script template for python-config
python.man              UNIX man page for the python interpreter
python.pc.in            Package configuration info template for pkg-config
README                  The file you're reading now
README.AIX              Information about using Python on AIX
README.valgrind         Information for Valgrind users, see valgrind-python.supp
SpecialBuilds.txt       Describes extra symbols you can set for debug builds
svnmap.txt              Map of old SVN revs and branches to hg changeset ids,
                        help history-digging
valgrind-python.supp    Valgrind suppression file, see README.valgrind
vgrindefs               Python configuration for vgrind (a generic pretty printer)