boot_trace: summarize Vulkan pipeline waits and compilation #2369
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2369"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by plamea on 2026-11-26T16:14:03Z.
Claimed as BOOT-TRACE-PIPELINE-TIMING in the coordination issue.
Summary
LEONIDA_TRACE_PIPELINE_COMPILE=1is used in a D3D12 trace.--counts-onlywithout pipeline keys or shader names. Existing traces without pipeline diagnostics keep their previous summary shape.Verification
AI-assisted with Codex. The traces used to verify this change came from synthetic tests.
Imported from ubiquitarianism/leonida. Originally posted by KushGene on 2026-11-26T16:17:24Z.
Independent verification on Linux (Ubuntu/Fedora host, Python 3.15.2, CPU only, no game files), tested in a clean detached worktree at
main246791612with PR #2369 headd04d24796:git apply --check/git applyapplied cleanly with zero conflicts.main):python3 -I tests/test_boot_trace.py -v-> 35 run, 34 ok, 1 failed (test_pipeline_timing_counts_overlapping_compiles_and_waits:AssertionError: 6 != 0onignored_lines).python3 -I tests/test_boot_trace.py -v-> 35/35 passed.python3 -I tests/test_docs_links.py-> 17/17 passed.python3 -I tests/test_ci_registration.py-> 16/16 passed.python3 -I tests/test_text_write_line_endings.py-> 3/3 passed.python3 -m compileall -q make_game.py tools tests-> exit 0.python3 -I scripts/check_no_game_data.py docs/first_run_ui.md tests/test_boot_trace.py tools/boot_trace.py-> exit 0.git diff --check-> clean.Code review notes:
pipeline_timingis omitted when no pipeline events appear (preserving the existing JSON schema),--counts-onlyincludes only integer counters without leakingkeyorshadersnames, and_record_pipeline_timinghandles PowerShell<exe> :prefixes and overlapping start/complete tracking cleanly. No issues found.AI-assisted: yes (Antigravity)
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-26T18:02:04Z.
Review: COMMENTED
Windows 11: all 35 boot trace tests passed, including pipeline wait and compiler output summaries. Synthetic logs only. No findings.
AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-26T18:40:51Z.
Review: COMMENTED
macOS arm64 check of #2369 (pipeline waits in boot_trace). A Python log parser plus its test; no GPU needed.
Tested head
d04d24796with its diff applied to a copy ofmainbdbc7e923(branch 17 commits behind;git apply/git merge-treeclean).Environment: Apple M3 Pro, arm64, macOS 27.2.1, CPython 3.15.2.
Result
python -I tests/test_boot_trace.py: 35 tests, OK.tools/boot_trace.pyput back tomain's): 1 failure,test_pipeline_timing_counts_overlapping_compiles_and_waits- the parser ignores the[rt] pipeline-*lines, so the summary has nopipeline_timing. The other 34 tests stay green, so the change does not disturb the D3D12/startup parsing.python -I scripts/run_semantic_tests.py tests/semantic: 500 files / 6,367 tests / 0 failed, same asmain.Format cross-check
The three regexes match the producer in
runtime/shims/d3d12_pipeline_compile.hfield for field:pipeline-use(line 79):trigger tid us ready end_ms;pipeline-compile-begin(line 97):trigger tid bytes variant begin_ms key shaders;pipeline-compile(line 122):trigger tid start_us us hit bytes variant result end_ms key shaders.The optional
(?:.+ : )?prefix matches the PowerShell error-record wrapping the file already handles. Good.Review
(tid, trigger, variant, key)are counted with a stack (active[key] += 1on begin, decrement on end), and a completion with no begin is counted separately instead of being paired with an unrelated start; the test covers overlapping compiles.starts_without_completionis computed from the live map at EOF, so a truncated log reports the open builds; theif started or completed or logged_waitsguard keepspipeline_timingout of logs that never enabled the trace, which preserves the existing text report for those.counts_only()copies the timing dict, and the text report prints it only when present; theother [rt] diagnostics are not summarizedwording is now accurate.One observation, not a defect: the runtime prints
pipeline-useonly whenelapsed >= 1000µs (d3d12_pipeline_compile.h:78), sologged_waitsis a subset of the waits; the report's "logged" wording is right, but a reader could take "longest wait" as the longest wait overall. A parenthetical "(only uses over 1 ms are logged)" in the text line or the docs would prevent that.No game files. AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T08:05:09Z.
Merged into
main(merge commit6de34615a), approved by DadaCap (maintainer). Thanks!Checked before merging: Tested in our local release candidate (main + 41 PRs): translator suite 512 files / 6,442 tests clean, Python suite with no new failure versus main, and 360 s game runs on an RTX 5080 with no regression. The merge was pinned to the head commit that was tested (
d04d24796).AI-assisted (Claude Code), posted for DadaCap.