From c2ee8e729ad53b781093790ce987e7c514655ec2 Mon Sep 17 00:00:00 2001 From: maurycy <5383+maurycy@users.noreply.github.com> Date: Fri, 8 May 2026 13:35:46 +0200 Subject: [PATCH 1/3] eh? --- Modules/_remote_debugging/frames.c | 2 +- Modules/_remote_debugging/threads.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/_remote_debugging/frames.c b/Modules/_remote_debugging/frames.c index bbdfce3f7201d9..7e56576392737b 100644 --- a/Modules/_remote_debugging/frames.c +++ b/Modules/_remote_debugging/frames.c @@ -197,7 +197,7 @@ parse_frame_object( char frame[SIZEOF_INTERP_FRAME]; *address_of_code_object = 0; - Py_ssize_t bytes_read = _Py_RemoteDebug_PagedReadRemoteMemory( + Py_ssize_t bytes_read = _Py_RemoteDebug_ReadRemoteMemory( &unwinder->handle, address, SIZEOF_INTERP_FRAME, diff --git a/Modules/_remote_debugging/threads.c b/Modules/_remote_debugging/threads.c index 4daa5e5f92bcd9..31d83f561a8ddf 100644 --- a/Modules/_remote_debugging/threads.c +++ b/Modules/_remote_debugging/threads.c @@ -303,7 +303,7 @@ unwind_stack_for_thread( StackChunkList chunks = {0}; char ts[SIZEOF_THREAD_STATE]; - int bytes_read = _Py_RemoteDebug_PagedReadRemoteMemory( + int bytes_read = _Py_RemoteDebug_ReadRemoteMemory( &unwinder->handle, *current_tstate, (size_t)unwinder->debug_offsets.thread_state.size, ts); if (bytes_read < 0) { set_exception_cause(unwinder, PyExc_RuntimeError, "Failed to read thread state"); From 7606bb1fffe758777a7bbfb5a85f6f3c927120da Mon Sep 17 00:00:00 2001 From: maurycy <5383+maurycy@users.noreply.github.com> Date: Fri, 8 May 2026 13:37:59 +0200 Subject: [PATCH 2/3] eh! --- Modules/_remote_debugging/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_remote_debugging/module.c b/Modules/_remote_debugging/module.c index 172f8711a2a2a0..f034fbbf15fbc9 100644 --- a/Modules/_remote_debugging/module.c +++ b/Modules/_remote_debugging/module.c @@ -537,7 +537,7 @@ _remote_debugging_RemoteUnwinder_get_stack_trace_impl(RemoteUnwinderObject *self while (current_interpreter != 0) { // Read interpreter state to get the interpreter ID char interp_state_buffer[INTERP_STATE_BUFFER_SIZE]; - if (_Py_RemoteDebug_PagedReadRemoteMemory( + if (_Py_RemoteDebug_ReadRemoteMemory( &self->handle, current_interpreter, INTERP_STATE_BUFFER_SIZE, From 43f0dc56072acbebc6ac00c3fca624d683962c2a Mon Sep 17 00:00:00 2001 From: maurycy <5383+maurycy@users.noreply.github.com> Date: Sat, 9 May 2026 01:30:18 +0200 Subject: [PATCH 3/3] blurp --- .../next/Library/2026-05-09-01-30-13.gh-issue-149584.yqz8x3.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2026-05-09-01-30-13.gh-issue-149584.yqz8x3.rst diff --git a/Misc/NEWS.d/next/Library/2026-05-09-01-30-13.gh-issue-149584.yqz8x3.rst b/Misc/NEWS.d/next/Library/2026-05-09-01-30-13.gh-issue-149584.yqz8x3.rst new file mode 100644 index 00000000000000..491d98eeb333ec --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-05-09-01-30-13.gh-issue-149584.yqz8x3.rst @@ -0,0 +1,2 @@ +Improve the performance of the Tachyon profiler by avoiding full page reads +of remote process memory. Patch by Maurycy Pawłowski-Wieroński.