Repository navigation
Debugging Tool Strace
← Debugging Tools and Commands
strace is the quickest Linux check for a thread whose long interval may be inside a syscall. It timestamps calls and reports each call's elapsed duration, making futex, polling, sleep, device ioctl, and file-I/O waits visible.
| Property | Details |
|---|---|
| Supported OS | Linux. |
| Install | Distribution package strace; SteamOS 3.8.16 includes /usr/bin/strace. |
| Verify |
strace --version and a short controlled trace. |
| Primary output | Timestamped text log or aggregate syscall summary. |
Use strace after thread identification and before adding xemu logging when the suspected interval could be:
-
futex/condition/mutex waiting; -
poll,ppoll, orepoll_wait; -
clock_nanosleep; - a graphics-driver
ioctl; - file/cache/configuration I/O;
- a failed or repeatedly retried syscall.
It cannot see CPU work between syscalls and does not decode the internal meaning of a Vulkan driver request.
pgrep -n -x xemu
ps -L -p 12345 -o pid,tid,psr,pcpu,stat,wchan:32,comm
sudo timeout --signal=INT 10s \
strace \
-ttT \
-p 12346 \
-e trace=futex,poll,ppoll,epoll_wait,ioctl,clock_nanosleep \
-o strace-thread.logReplace 12345 with the xemu PID and 12346 with the selected thread's TID.
Important fields:
-
-ttrecords wall-clock timestamps with microseconds; -
-Tappends elapsed time inside each syscall; -
-p TIDattaches to the selected thread; -
-e trace=...limits overhead and output; -
-okeeps raw output instead of relying on a terminal screenshot.
If the selected user owns xemu and ptrace policy permits attachment, sudo may not be needed. Record whether elevation was used.
When call frequency matters more than event order:
sudo timeout --signal=INT 10s \
strace \
-c \
-p 12346 \
-e trace=futex,poll,ppoll,epoll_wait,ioctl,clock_nanosleep \
-o strace-summary.txtThe aggregate summary reports calls, errors, and time attributed inside the selected syscalls. It loses individual timing/order, so retain an event trace when correlating with a frame hitch.
futex(...) <0.013482>
ioctl(...) <0.017931>
ppoll(...) <0.019421>
These mean the traced thread remained inside that syscall for the shown elapsed time. They do not by themselves establish:
- which other thread or GPU operation satisfied the wait;
- whether the wait was expected pacing;
- whether shortening the syscall itself is possible;
- whether the interval overlapped the guest-visible hitch.
Continue with perf sched or BCC/Perfetto for waker and scheduler attribution. For a long graphics ioctl, inspect Vulkan submission/fence state and GPU evidence before calling it a driver stall.
- Use a bounded timeout and verify
stracedetached. - Do not use
-funless child/thread coverage is required; it can greatly increase perturbation and log volume. - Avoid dumping buffers, paths, or network payloads unless necessary; logs can contain private data.
- Preserve the exit status and attach errors. An empty log caused by denied ptrace is not a clean result.
- Do not kill xemu merely to stop the tracer.
The checked SteamOS 3.8.16 appliance included strace 6.15. No system modification is needed for the basic workflow. Attachment may still require sudo depending on ownership and ptrace policy.
Because strace stops the target briefly at syscall entry/exit, it can change timing in a syscall-heavy thread. Use a narrow filter, reproduce the dependency more than once, and perform final acceptance without it.
-
strace --version, kernel version, privilege state, and ptrace errors; - executable hash and selected PID/TID/name;
- exact syscall filter, capture interval, and workload anchor;
- raw event log and optional aggregate summary;
- comparison with scheduler or guest-progress evidence.
DSP tooling guide and navigation updated November 2, 2026 for experimental PR #384, source 8f51d237. Capture/replay usage and limits.
The earlier wiki-wide review was published November 1, 2026. Emulator source: b7140848. Reviewed wiki content: 1d2b671. Current status · Release availability · Publication process.
- Home
- Current status
- Stable versus main
- Implemented mechanisms
- Controls and defaults
- Measured results and limits
- Complete change register
- System
- CPU and vCPU
- Memory and DMA
- Graphics / NV2A
- APU and audio
- Timing and timers
- Platform and I/O
- Hardware observations
- Fidelity boundaries
- Methodology
- PGR2 routes
- Debugging lag / hot paths
- Tools and commands
- DSP capture, replay and fuzzing
- HLE readiness and public XISO proof
- Concurrent DSP shadow and OpenAL proof
- DSP HLE operation inventory
- DSP HLE fix examples and testing
- Development
- Upstream shortlist
- Wiki maintenance
- Research / retired work
- Optimization catalog
- Hot-path shortcuts
- Researched experiments
- Unproven proposal directory
- PR lessons
- September26 snapshot
Repository · PRs · Issues