code wiki / _hdl_build / nx_search_census_gate.nx

nx_search_census_gate.nx

buildroot/runtime/_hdl_build/nx_search_census_gate.nx

11148 B168 linesdepth 23pulls 202 transitivereach 0 importersview sourcekind gate/prooftopic search
docsdependenciesstructsconstsfunctions

about

nx_search_census_gate.nx -- teeth for the G1 census's OUTCOME PARTITION and its window envelope. WHY IT EXISTS. nx_search_census shipped with prove=NO-GATE-FOUND UNPROVEN, and within an hour its own output nearly misled its author: it reported hostcap_defer_permil=927 over a window that turned out to span about 27 HOURS, while hand-sampled post-fix windows read ZERO. Both were right about their own span. A census whose numbers can be read as current when they are a day-long average needs its envelope PINNED, not just printed. SUBJECT: wc_throughput_census, one of the two contract symbols /compare/search watches. It takes a BUFFER, so these teeth drive it on a synthetic log built here -- no shard, no /tmp fixture, no fork, and nothing that touches the live index or the 129 MB outcome log. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_search_census.nx nx_gate_verdict.nx nx_search_census_gate.nx

imports: nx_search_census.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gsc_row sc_cat

structs

none

consts

16const GSC_BUF: i64 = 4096
17const GSC_SLOTS: i64 = 1024
20const GSC_FXBUF: i64 = 64
21const GSC_POBUF: i64 = 32
22const GSC_VBUF: i64 = 128
23const GSC_MAGIC_LEN: i64 = 4
24const GSC_U32: i64 = 4
25const GSC_NP_HDR: i64 = 1
26const GSC_FX_TERMS: i64 = 2
27const GSC_FX_RUNS: i64 = 3
28const GSC_RUNA_NP: i64 = 3
29const GSC_RUNB_NP: i64 = 1
30const GSC_RUNC_NP: i64 = 2
31const GSC_DELTA_ONE: i64 = 1
32const GSC_RUNB_DELTA: i64 = 5
33const GSC_FX_BADMAGIC: i64 = 77
34const GSC_CONF_CROSS: i64 = 10000000

functions

35func gsc_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
37func gsc_row(b: *u8, o: i64, epoch: *u8, cls: *u8, url: *u8) -> i64
called by 1: main calls 1: sc_cat
46func main(argc: i64, argv: *i64) -> i64
calls 2: gv_ctrgsc_row