tooling: add a measured progress dashboard #140
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/141"
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 R0Y00/Xbox2Windows. Originally posted by Kha73k on 2026-11-21T17:01:32Z.
Measures instruction-form coverage from a CTest run. This PR holds only the measurement and its tests; README graphics would be a separate, later PR.
This is not a measure of port completion: it counts which forms from a reference list appear in a source-built fixture whose translation test passed.
tools/form_coverage.py out/test-results.xml [--json …](stdlib only). A fixture's forms count only when its test passed. Skipped or failed tests add nothing; forms held back only by a skip are listed separately.docs/coverage/, built bytools/form_reference.py: 948 x64 mnemonics Zen 2 runs in user mode (iced-x86), 1,968 gfx1013 and 1,863 gfx1030 forms (LLVM 15's generated AMDGPU syntax docs).tests/form_coverage_check.py(Linux Python job) checks the denominators, the example below, and the pass/skip/fail rules.Example:
tests/cpu/branch.asmcontainsmov cmp jb jae add jmp sub ret(jaeis theINVERT_BRANCHbuild). These are 8 Integer forms, covered whencpu_leaf_aot_branchespasses; when it is skipped, 0 are covered and the 8 are listed as held back.Run at
3f1e504(Windows 10, RTX 3070 Ti; 66 passed, 12 skipped): x64 34/948, gfx1013 34/1968, gfx1030 34/1863. Ifpixel_aot_warpandpixel_aot_hardwarewere skipped, gfx1013 would drop to 0 with 34 held back.🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T17:17:54Z.
Please separate the measurement tool and its source/denominator tests from the generated README graphics. For the first review, include one fixture-to-instruction example and show how a skipped test affects the count. Keep instruction-form coverage separate from a percentage of overall port completion.
Imported from R0Y00/Xbox2Windows. Originally posted by Kha73k on 2026-11-21T17:22:36Z.
Thanks, done in
06c874a:tools/form_coverage.py), its denominators (docs/coverage/*.tsv,tools/form_reference.py) andtests/form_coverage_check.py. The renderer, generated dashboard, badges and README change are removed.branch.asmgivesmov cmp jb jae add jmp sub ret, 8 Integer forms, covered only whilecpu_leaf_aot_branchespasses. The test also checks the denominators (x64 regenerated from iced-x86, gfx encodings and the doc parser).cpu_leaf_aot_branchesskipped the example covers 0 and lists 8 held back, and with bothpixel_aot_*skipped gfx1013 drops from 34 to 0.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T17:26:51Z.
The split and skipped-test example address the dashboard review. Linux CI on
06c874anow stops withClassify the new CPU fixture switch.asm in CPU_FIXTURES. Please classify the merged #86 fixture and verify that a skipped jump-table run contributes zero covered forms. Job.Imported from R0Y00/Xbox2Windows. Originally posted by Kha73k on 2026-11-21T17:30:05Z.
Done in the latest commits: main is merged in, and the CI conflict is resolved by keeping both Python check lines.
switch.asmmaps tocpu_aot_jump_tables.two_imports.asmruns unchanged underpe_map, so its forms are known but never covered.check_jump_tables()pins switch.asm's 18 forms. Passed, they cover 18. Skipped, they cover 0 and all 18 are listed as held back. Skipped next to a passingcpu_leaf_aot_branches, only branch.asm's 8 count.cpu_aot_jump_tablesmarked skipped it falls to 34, andneg not sar shrare listed as held back.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T17:57:57Z.
The switch.asm mapping and the zero-coverage case for skipped jump-table tests address the previous review. Two merged changes now affect this test on main. #157 added tests/cpu/bink_descriptors.asm, which is missing from CPU_FIXTURES and triggers the unclassified-fixture exit. #129 expanded branch.asm with additional conditional branches, while check_example still expects eight forms. Please cover both fixtures on current main and rerun tests/form_coverage_check.py, including the skip cases.
Imported from R0Y00/Xbox2Windows. Originally posted by Kha73k on 2026-11-21T18:06:54Z.
Done, and the check no longer depends on fixtures that change on main:
bink_descriptors.asm(#157) maps tocpu_bink_descriptors.rdna2_tools_check.pycontains gfx text and is classified as non-translation input.CPU_FIXTURES/SHADER_FIXTURESno longer exits. It is never counted and is listed as "Not counted until classified". A new fixture on main can no longer break this check or raise the numbers.form_coverage_check.pymeasures small fixtures written inside the test (in a temporarytests/tree) instead of the livebranch.asmandswitch.asm, so edits like #129 do not change its expectations. The cases are the same: branch passed gives 8 covered, skipped gives 0 with 8 held back, failed gives 0 with none held back. A skipped jump-table run gives 0, alone and next to a passing fixture. A new case checks that unclassified CPU and gfx fixtures add 0 even when every test passes.a352292; Windows 10 19045, RTX 3070 Ti driver 32.0.16.2124; 102 tests: 86 passed, 15 skipped, 1 failed): x64 40/948, gfx1013 42/1968, gfx1030 42/1863, nothing unclassified.cpu_bink_descriptorsandcpu_leaf_aot_branchespass. Marking either one skipped drops x64 to 39, holding backintandjberespectively.pixel_aot_warpincheck_predicate_draws(thepredicates.casedraw exits 1) on the Windows 10 inbox WARP, driver 10.0.19041.7811.pixel_aot_hardwarepasses, and this PR does not touch the pixel files. Since no pixel test passed, markingpixel_aot_hardwareskipped drops gfx1013 to 0 with 42 held back.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T18:11:58Z.
The independent CPU fixtures and unclassified-file control address the previous review. One measurable overcount remains at
a3522920:gfx_mnemonicscollects all Python string constants inpixel_aot_check.py, includings_nop 0, which is supplied tomust_reject. A passing WARP run consequently creditss_nopas covered although that case was rejected. Please count the successful translation inputs, and add a regression where a rejection-only opcode stays out ofcovered.Imported from R0Y00/Xbox2Windows. Originally posted by Kha73k on 2026-11-21T18:25:22Z.
Fixed in
4e90a61(on current main,7232663): gfx coverage now counts only programs the translator accepted.pixel_aot_check.pywrapspixel_aot.lowerand records the first word of each line of every program that lowered without an error. A program given tomust_rejectraises before it is recorded. At exit the record goes toFORM_COVERAGE_RECORD, which CMake sets forpixel_aot_warpandpixel_aot_hardware. The string scan of test files is removed.form_coverage.pycounts a record only when its test passed in the JUnit run, and only if the record was written inside that run's time window (timestamp+time), so a record and a status always come from the same run.form_coverage_check.py:assembly(False)withs_nop 0in place ofs_waitcnt lgkmcnt(0)is rejected and leaves nothing recorded.s_nopto the record raises covered by exactly one form.check_controls()never recordss_nop.lowerreturns.pixel_aot_check.py, on the same run:s_nop,s_branch,v_cmp_class_f32andv_cmpx_ge_f32_e64drop out; they only reachmust_reject.v_cmp_<predicate>_f32forms built bypredicate_group()f-strings are now counted.neighborinchained.asmandBinkSetMemoryinbink_heap.asm. Both contain onlymovandret, which lifted code also covers.cpu_repeat_droppedvariant only removes an instruction.repeat_call.asmandworking_set_delta.asmare now classified.4e90a61(Windows 10 19045, RTX 3070 Ti driver 32.0.16.2124; 107 tests: 91 passed, 15 skipped, 1 failed):pixel_aot_hardwareskipped gives gfx1013 0 with 57 held back.pixel_aot_warpincheck_predicate_drawson the Windows 10 inbox WARP (10.0.19041.7811), unchanged by this PR.pixel_aot_hardwarepasses.