nx_enginelab_analysis.nx
buildroot/runtime/nx_enginelab_analysis.nx
about
nx_enginelab_analysis.nx -- EL2 replay, EL4 shader binding, EL5 stack sampling, EL6 call tree.
WHY A FOURTH MODULE AND NOT MORE OF THE SPINE. Two lanes built the same rung inside one hour today
and the collision was caught by the LINKER rather than by either lane looking first. The cheap
structural answer is that a lane writes in files it owns and declares what it is taking BEFORE it
writes: these four rungs are declared to the sibling lane, and event kinds 9 and 10 are claimed
explicitly, because a silently reused KIND value is worse than a duplicate name -- the linker
cannot catch it, and every analyzer would read the record as a valid one of the wrong type.
EVERYTHING HERE IS PURE BUFFER. No path, no descriptor, no syscall beyond allocation. The spine
stays adoptable by a wasm world and so does this.
license_tier: ORIGINAL No hardware writes (Rule 26).
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_enginelab_lib.nx
imported by: nx_enginelab_analysis_gate.nx
structs
| none |
consts
| 17 | const EL_K_BIND: i64 = 9 // EL_F_A = shader id, EL_F_B = pipeline stage |
| 18 | const EL_K_SAMPLE: i64 = 10 // a periodic stack sample: EL_F_TS is the only thing that matters |
| 26 | const EL_RP_DIGEST: i64 = 0 |
| 27 | const EL_RP_DRAWS: i64 = 1 |
| 28 | const EL_RP_SLOTS: i64 = 2 |
| 134 | const EL_SM_INTERVAL_US_DEFAULT: i64 = 1000 |
| 135 | const EL_SM_ATTRIB: i64 = 0 |
| 136 | const EL_SM_TOTAL: i64 = 1 |
| 137 | const EL_SM_UNZONED: i64 = 2 // samples that landed in no zone at all -- reported, never dropped |
| 138 | const EL_SM_INTERVAL: i64 = 3 |
| 139 | const EL_SM_HORIZON: i64 = 4 // anything shorter than this can be missed entirely |
| 140 | const EL_SM_SLOTS: i64 = 5 |
| 197 | const EL_FL_ROOTINCL: i64 = 0 |
| 198 | const EL_FL_ALLSELF: i64 = 1 |
| 199 | const EL_FL_NODES: i64 = 2 |
| 200 | const EL_FL_ROOTS: i64 = 3 |
| 201 | const EL_FL_OPEN: i64 = 4 |
| 202 | const EL_FL_SLOTS: i64 = 5 |
| 264 | const EL_FL_MAXDEPTH: i64 = EL_STACK_MAX |
| 265 | const EL_FL_SEMI: i64 = 59 |
| 266 | const EL_FL_SPACE: i64 = 32 |
| 267 | const EL_FL_NEWLINE: i64 = 10 |
functions
| 30 | func ela_fold(h: i64, v: i64) -> i64 { return (h * EL_HASH_MUL + v) % EL_HASH_MOD } called by 1: ela_draw_digest |
| 32 | func ela_draw_digest(st: *i64, r: i64, h: i64) -> i64 |
| 39 | func el_replay(st: *i64, out: *i64) -> i64 |
| 58 | func el_replay_diverge(a: *i64, b: *i64, out: *i64) -> i64 |
| 87 | func el_bind_shader(st: *i64, ts: i64, tid: i64, shader: i64, stage: i64) -> i64 |
| 94 | func el_shader_dump(st: *i64, ord: i64, stage: i64, out: *i64) -> i64 |
| 142 | func el_sample_stack(st: *i64, ts: i64, tid: i64) -> i64 |
| 148 | func ela_innermost(st: *i64, ts: i64, tid: i64) -> i64 |
| 172 | func el_sample_attribute(st: *i64, name: i64, interval_us: i64, out: *i64) -> i64 |
| 204 | func el_flame_totals(st: *i64, out: *i64) -> i64 |
| 233 | func ela_parent(st: *i64, idx: i64) -> i64 |
| 272 | func el_flame_emit(st: *i64, buf: *u8, cap: i64) -> i64 |