Commit Graph

15 Commits

Author SHA1 Message Date
Kumar Aditya b7d722547b gh-136669: build _asyncio as static module (#136670)
`_asyncio` is now built as a static module so that thread states can be accessed directly via registers and avoids the overhead of function call.
2025-07-16 22:09:08 +05:30
Petr Viktorin b44316a097 gh-136476: Remove creation of unused list (GH-136494) 2025-07-10 08:12:23 +00:00
Pablo Galindo Salgado ea45a2f97c gh-136476: Show the full stack in get_async_stack_trace in _remote_debugging (#136483) 2025-07-09 23:11:17 +00:00
Pablo Galindo Salgado 77d25e5b16 gh-91048: Revert the memory cache removal for remote debugging (#136440)
gh-91048: Reintroduce the memory cache for remote debugging
2025-07-09 00:31:17 +00:00
Pablo Galindo Salgado 5334732f9c gh-91048: Fix external inspection multi-threaded performance (#136005) 2025-06-28 14:11:31 +01:00
Bénédikt Tran 54e29ea4eb gh-111178: fix UBSan failures for RemoteUnwinderObject (#135539) 2025-06-15 21:00:58 +02:00
Pablo Galindo Salgado b9a1b04982 gh-135371: Clean tags from pointers in all cases in remote debugging module (#135534) 2025-06-15 18:32:32 +00:00
Pablo Galindo Salgado 028309fb47 gh-135371: Fix asyncio introspection output to include internal coroutine chains (#135436) 2025-06-14 13:48:25 +01:00
László Kiss Kollár 8e8786f898 gh-91048: Reorder result tuple of parse_code_object (#134898)
Reorder result tuple of parse_code_object

The standard followed by APIs like pstat.Stats is to take a file, line,
function triplet. The parse_code_object function (and callers exposing
this in Python like RemoteUnwinder.get_stack_trace) return function,
file, line triplets which requires the caller to reorder these when
using it in classes like pstat.Stats.
2025-05-31 00:32:36 +00:00
sobolevn 806107d7a2 gh-134693: Fix [-Wmaybe-uninitialized] warning in _remote_debugging_module.c (#134694) 2025-05-26 16:06:33 +01:00
Pablo Galindo Salgado 0909d6d8e8 gh-91048: Add better error messages for remote debugging for CI builds (#134682) 2025-05-26 15:31:47 +01:00
Pablo Galindo Salgado 42b25ad4d3 gh-91048: Refactor and optimize remote debugging module (#134652)
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>
2025-05-25 20:19:29 +00:00
Pablo Galindo Salgado d327159eb4 gh-91048: Fix error path result in _remote_debugging_module (#134347) 2025-05-20 19:54:09 -04:00
László Kiss Kollár c4ad92e155 Fix typo in get_stack_trace docstring (#134246) 2025-05-19 16:07:39 +00:00
Adam Turner 3f80165a26 GH-91048: Minor fixes for `_remotedebugging & rename to _remote_debugging` (#133398) 2025-05-05 02:30:14 +02:00