summaryrefslogtreecommitdiffstats
path: root/Python/remote_debug.h
Commit message (Collapse)AuthorAgeFilesLines
* gh-142627: Ignore anonymous mappings in Linux remote debugging (#142628)Victor Stinner2025-12-121-0/+5
|
* gh-138122: Implement frame caching in RemoteUnwinder to reduce memory reads ↵Pablo Galindo Salgado2025-12-061-0/+109
| | | | | | | | | | | (#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-138122: Split Modules/_remote_debugging_module.c into multiple files ↵Pablo Galindo Salgado2025-11-251-4/+4
| | | | | (#141934) gh-1381228: Split Modules/_remote_debugging_module.c into multiple files
* gh-139275: Fix compilation of Modules/_remote_debugging_module.c when the ↵Pablo Galindo Salgado2025-09-241-1/+1
| | | | system doesn't have process_vm_readv (#139307)
* gh-135953: Profile a module or script with sampling profiler (#136777)László Kiss Kollár2025-08-111-6/+28
|
* gh-135953: Implement sampling tool under profile.sample (#135998)László Kiss Kollár2025-07-101-1/+21
| | | | | | | | Implement a statistical sampling profiler that can profile external Python processes by PID. Uses the _remote_debugging module and converts the results to pstats-compatible format for analysis. Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* gh-91048: Revert the memory cache removal for remote debugging (#136440)Pablo Galindo Salgado2025-07-091-0/+78
| | | gh-91048: Reintroduce the memory cache for remote debugging
* gh-91048: Fix external inspection multi-threaded performance (#136005)Pablo Galindo Salgado2025-06-281-78/+0
|
* Fix warnings `set but not used [-Wunused-but-set-variable]` in ↵Chris Eibl2025-06-101-9/+0
| | | | remote_debug.h (#135290)
* Fix definition of `_Py_RemoteDebug_` symbols for static linking (#135146)Zanie Blue2025-06-101-2/+12
|
* gh-134876: Add fallback for when process_vm_readv fails with ENOSYS (#134878)Daniel Golding2025-06-071-0/+70
|
* gh-91048: Add better error messages for remote debugging for CI builds (#134682)Pablo Galindo Salgado2025-05-261-55/+212
|
* gh-91048: Correct Apple platform includes for iOS. (#134712)Russell Keith-Magee2025-05-261-8/+8
| | | Correct Apple platform includes for iOS.
* gh-91048: Refactor and optimize remote debugging module (#134652)Pablo Galindo Salgado2025-05-251-3/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completely refactor Modules/_remote_debugging_module.c with improved code organization, replacing scattered reference counting and error handling with centralized goto error paths. This cleanup improves maintainability and reduces code duplication throughout the module while preserving the same external API. Implement memory page caching optimization in Python/remote_debug.h to avoid repeated reads of the same memory regions during debugging operations. The cache stores previously read memory pages and reuses them for subsequent reads, significantly reducing system calls and improving performance. Add code object caching mechanism with a new code_object_generation field in the interpreter state that tracks when code object caches need invalidation. This allows efficient reuse of parsed code object metadata and eliminates redundant processing of the same code objects across debugging sessions. Optimize memory operations by replacing multiple individual structure copies with single bulk reads for the same data structures. This reduces the number of memory operations and system calls required to gather debugging information from the target process. Update Makefile.pre.in to include Python/remote_debug.h in the headers list, ensuring that changes to the remote debugging header force proper recompilation of dependent modules and maintain build consistency across the codebase. Also, make the module compatible with the free threading build as an extra :) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-91048: Chain some exceptions in _testexternalinspection.c (#132970)Sergey Miryanov2025-05-021-3/+14
|
* gh-91048: Fix _testexternalinspection.c on FreeBSD (#132945)Victor Stinner2025-04-251-3/+5
|
* gh-91048: Refactor _testexternalinspection and add Windows support (#132852)Pablo Galindo Salgado2025-04-251-0/+793