Proposal and Motivation
Currently, viztracer relies on GDB or LLDB to attach to processes and hack their address space via loading a dynamic library. However, this approach has limitations as it's unavailable on Win32 platforms and Apple Silicon macOS systems. With Python 3.14 introducing a new remote_exec function in the sys module, we now have a standardized solution that offers equivalent functionality to viztracer's current implementation. This official API not only provides better compatibility across Windows and Unix systems but also offers a more lightweight solution. By adopting remote_exec, we can enhance viztracer's process attachment capabilities.
Co-existing Solutions
Since sys.remote_exec is only available in Python 3.14+, viztracer will maintain both implementations for backward compatibility:
- Python ≥ 3.14: Use the native
sys.remote_exec API.
- Python < 3.14: Fall back to the existing GDB/LLDB-based approach.
If you're open to this idea, we can discuss the implementation in detail.
Proposal and Motivation
Currently, viztracer relies on GDB or LLDB to attach to processes and hack their address space via loading a dynamic library. However, this approach has limitations as it's unavailable on Win32 platforms and Apple Silicon macOS systems. With Python 3.14 introducing a new
remote_execfunction in thesysmodule, we now have a standardized solution that offers equivalent functionality to viztracer's current implementation. This official API not only provides better compatibility across Windows and Unix systems but also offers a more lightweight solution. By adoptingremote_exec, we can enhance viztracer's process attachment capabilities.Co-existing Solutions
Since
sys.remote_execis only available in Python 3.14+, viztracer will maintain both implementations for backward compatibility:sys.remote_execAPI.If you're open to this idea, we can discuss the implementation in detail.