Repository navigation
heap_index_census: count verified paths across embedded data - #6072
kacper-serewis wants to merge 2 commits into
Conversation
|
The new To repeat on import sys, tracemalloc
from pathlib import Path
sys.path.insert(0, str(Path("tests").resolve()))
import test_heap_index_census as t
case = t.HeapIndexCensus()
case.setUp()
try:
case.embedded_listing("s_branch 1", "010082bf")
p = Path(case.work.root, "fssm", "ps_embedded.fssm")
original = p.stat().st_size
for extra in (0, 1 << 20, 8 << 20):
with p.open("r+b") as f:
f.truncate(original + extra)
tracemalloc.start()
report = t.hic.census(case.work.disasm)
peak = tracemalloc.get_traced_memory()[1]
tracemalloc.stop()
print(extra, peak, report["groups"]["ps sfi0=smp"]["sampler_load_provenance"])
finally:
case.tearDown()Please validate the declared range against the size of the open file, seek to the start, and read only the range. Subtract the range start when indexing the resulting buffer. All 21 heap census tests and 37 shader IR tests pass on Windows 11 with CPython 3.14.7. As a control, the branch-over-data test fails with the parent census implementation at AI-assisted. |
|
Tested
|
|
✅ Automated security review: CLEAN (commit
Scope: static analysis of added diff lines only; no code was executed. Please review findings manually. |
Coordination item 7101742835, D3D-329 follow-up.
Depends on: #5926
Use LLVM diagnostic columns to locate missing dwords, reconcile the printed instruction widths with the declared native code range, then use the translator's CFG traversal and native encoding checks. Feed the verified reachable instructions to the existing load-role and sampler-word analysis. Count an explicit refusal for ambiguous boundaries, encodings, or transfers.
Full private CPU cache comparison across all 26,503 listings in disjoint batches. The #5926 baseline skipped 1,473 for embedded data. This change admits 1,466 of them and refuses seven for uncertain control flow. Only aggregate counts are published.
Each sampler word position has 188,732 direct load tags after the change (121,899 before).
Verification on Windows. All 21 heap census tests and 37 shader IR tests passed. The synthetic census tests cover a branch over data, a reachable unknown word, an indirect transfer, an unresolved diagnostic column and an encoding mismatch. Python compileall, isolated build-script help, three text line-ending tests, changed-file game-data guard and whitespace checks passed. The translator semantic suite passed (6,150 tests, four skips, one expected failure). GPU and driver inapplicable (CPU only).
AI-assisted with Codex.