9. Debug switches and measurement

Rosetta 2. The runtime reads switches such as ROSETTA_PRINT_IR, which prints each block with its flag liveness, and ROSETTA_PRINT_SEGMENTS (Champollion part 2).

ScarletNX now. tests/native_bench.c times six assembly kernels (integer, FP, SIMD, crypto, tricks, calls) with no native or QEMU baseline, and no doc records its numbers. At exit the log gives the AOT variant hits and misses and the JIT batch statistics (jit_report in guest_jit.c, SnxJitStats in jit_service.h). The Windows sampler, Tracy and gdb_jit exist. AOT functions carry F_<address> names in the module's symbol table (ir_codegen.c, link_elf.c), so Linux perf names them, but it cannot name JIT code. tests/native_qemu_differential.c checks samples of every row of the A64 decoder against qemu-aarch64 -cpu max, one instruction at a time.

Every gain this plan claims needs these items first.

T1 Native baselines for the benchmarks

T2 Counters in the runtime

T3 Statistics from the recompile, and a dump switch

T4 JIT code in Linux profilers

T5 A block-level differential fuzzer

T6 Bring the docs up to date

Fix the docs and comments listed under Docs and comments that are out of date before the plan's changes pile more on top. S, P0.


Made from docs/layers/cpu/plan.md at 69237645142c. GPL-3.0-or-later.