With XENORA_DBT_BENCH_COMPARE=<baseline.json>,<candidate.json> set,
dbt_bench reads two documents written through XENORA_DBT_BENCH_JSON and
compares them instead of running. For the interpreter and cold and warm
DBT it prints both medians, the change, and whether the change exceeds
the larger recorded IQR, and it lists changed cold DBT counters.
It refuses, with exit status 1 and the differing field named, to compare
runs whose CPU, OS or architecture differ or are unknown, or whose
workload, sample or warmup counts, debug assertions or build label
differ. The new optional XENORA_DBT_BENCH_BUILD_LABEL records build
settings the benchmark cannot observe, such as LTO; version 1 documents
without it count as unlabelled.
The documents are read by a small RFC 8259 reader in the bench file, so
no dependency is added. Unit tests cover the reader, reading back an
exported document, the report lines, and every refusal rule.
Signed-off-by: Bartosz Szczepański <bartosz.szczepanski@hotmail.com>
The decoder refused FNINIT (DB E3), which the mingw-w64 C runtime runs
once before main. Guest state gains the x87 control, status and tag
words, and FNINIT sets them to the Intel SDM values 037F, 0 and FFFF.
Both engines run the shared semantics.
The registry gains a form key, rm, that pins a register-only form to one
ModRM byte: the other bytes of DB /4 are different instructions. No other
x87 instruction is added and CPUID still reports no FPU.
Part of Gate A2.
Signed-off-by: zachdoxsee <zachdoxsee36@gmail.com>
Address review feedback from zachdoxsee on PR #369: replace index-only XMM range loops with iterator-based loops so strict clippy passes on Rust 1.100.
Signed-off-by: Arthur Lacoste <arthurlacoste@users.noreply.github.com>
Covers byte to qword widths, SIB and displacement forms, imm32 sign extension, register forms and store faults. Both engines already agree.
Signed-off-by: Arths17 <Atharvranjan8@gmail.com>
dbt_bench printed its results only as text. With
XENORA_DBT_BENCH_JSON=<path> set it now also writes one JSON document:
host CPU, OS and architecture, git revision and dirty state, debug
assertions, the workload and sample counts, median, min, max, p95, p99,
IQR and MIPS for the interpreter and cold and warm DBT, and the cold
DBT counters. Values the benchmark cannot determine are null.
The statistics are computed once in a Summary that feeds both the text
line and the JSON, so the two cannot disagree. The text output and the
timed work are unchanged, and no dependency is added.
Unit tests cover string escaping, null handling, the whole document for
fixed inputs and the text line format.
Signed-off-by: Bartosz Szczepański <bartosz.szczepanski@hotmail.com>
Brings in #356, which is merged first, along with main. Conflicts:
CHANGELOG.md, where every entry is kept, and crates/loader/src/tls.rs,
where the new read_callbacks function and the TLS_ARRAY_SIZE constant
were added at the same place; both are kept.
Signed-off-by: zachdoxsee <zachdoxsee36@gmail.com>
Each cached block keeps the guest bytes it was translated from and is compared with the current executable bytes on every lookup.
Signed-off-by: Arths17 <Atharvranjan8@gmail.com>
stock macOS does not provide the timeout command used by scripts/test-gpu.sh. Add a Python 3 fallback that preserves duration parsing, process-group termination and exit status 124, while continuing to use GNU timeout when it is available.
Signed-off-by: Vedant Dadhich <vedantdadhich21@gmail.com>
Review re-measurement on Apple M5 showed warm DBT about 2% slower
under fat LTO with one codegen unit in four of four alternating runs.
The entry said it was unchanged.
Signed-off-by: Bartosz Szczepański <bartosz.szczepanski@hotmail.com>