Skip to content

feat(diag): hitch flight recorder and non-blocking log (#361) - #362

Merged
Maxaubert merged 2 commits into
mainfrom
feat/361-hitch-recorder
Oct 4, 2026
Merged

Maxaubert merged 2 commits into
mainfrom
feat/361-hitch-recorder

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

Closes #361. First step of the hitch logging review: today Wind can say a hitch happened, not why.

  • Non-blocking log. wind::Log pushes into a lock-free queue (src/log_queue.h); a below-normal writer thread writes, flushes on Warn/Error and rotates. No caller waits on the disk, an EDR scan or another thread. Lines gain the QPC ms (the PresentMon/ETW clock) and the thread id.
  • Hitch recorder. Every tick records dt, the pacing wait and how late it returned (timer, composite pulse, DwmFlush), its wall and thread CPU time, and spans (track, color, present, txwrite, ix, sprite, activate). A long zoomed frame logs one classified hitch line (late-wake, compositor-late, pulse-thread-late, blocked/busy in X, flush-wait, loop-other) plus a per-minute summary. Pure logic in src/hitch_record.*, unit-tested.
  • Zoom-out teardown timed per step in the txsession session end line.
  • DiagLog and the txTrace dump no longer write from the tick thread. Threads are named for WPR.
  • New keys: hitchLog=1, hitchThresholdPct=150. Version 0.23.0.

Tests: build.bat test 569/569 pass; build.bat and build.bat config build clean (pre-existing warnings only). The deployed signed UIAccess build starts and logs in the new format; hands-on zoom data not collected yet. Unsigned in CI as usual.

Follow-ups: compositor watch after zoom-out, system context sampler, ETW markers plus a WPR capture script.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KPUNAWcwghXdHCApcKKjSG

Maxaubert and others added 2 commits October 4, 2026 05:00
Log() now pushes into a lock-free queue and a below-normal writer thread does
the disk I/O, so no thread waits on the disk or an EDR scan. Lines carry the
QPC ms and thread id. Every tick records its wait, wake lateness, work, CPU
time and spans; a long zoomed frame logs a classified hitch line plus a
per-minute summary. Zoom-out teardown is timed per step. DiagLog and the
txTrace dump no longer write from the tick thread. Threads are named.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KPUNAWcwghXdHCApcKKjSG
… shape spans

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KPUNAWcwghXdHCApcKKjSG
@Maxaubert
Maxaubert merged commit 0a7c1fa into main Oct 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hitch flight recorder: non-blocking log, per-tick spans, hitch lines

1 participant