Parent: #459
Depends on: #461, #483
Related: #466, #467, #487, #495
Goal
Make generated JavaScript and WebAssembly code fully visible to host profilers, crash reporters, debuggers, and the zig-js inspector with exact native↔source↔bytecode attribution.
Current boundary
The saved macOS baseline profile sees hot anonymous MAP_JIT addresses as <unknown binary> because generated mappings have no native symbol table. #461 requires symbolized attribution and #483 includes debug/unwind metadata, but neither owns end-to-end profiler registration, native stack reconstruction, or lifecycle validation.
Scope
- Define artifact-owned symbols for functions, tiers, OSR regions, runtime stubs, Wasm functions, side exits, and retired generations.
- Publish native PC ranges to macOS sampling/crash tooling and Linux perf/jitdump/perf-map interfaces through owned writers and explicit platform APIs.
- Emit/register exact unwind metadata for every native frame, call stub, deopt/side exit, trap, and host transition on each ABI.
- Map native PC → artifact generation → optimizer/baseline/Wasm origin → bytecode/Wasm offset → source URL/line/column, including inlined frames.
- Reconstruct logical stacks across JS↔host↔Wasm, async continuations, generators, exceptions, proper-tail calls, deopt, and optimized-away frames where required.
- Deregister/retire symbols and unwind records only after the final executing reader leaves the artifact epoch.
- Measure registration, sampling, symbolization, memory, and disabled-path overhead.
No-workaround rules
- No permanent executable mapping retention for symbolization, stale/reused PC attribution, guessed stack scanning, profiler-only different codegen, unsafe unwind through Zig frames, or dependency on a third-party profiler library.
Acceptance
Foundation
Baseline dispatch profile; inspector/CPU-profile foundations under #139/#404.
Parent: #459
Depends on: #461, #483
Related: #466, #467, #487, #495
Goal
Make generated JavaScript and WebAssembly code fully visible to host profilers, crash reporters, debuggers, and the zig-js inspector with exact native↔source↔bytecode attribution.
Current boundary
The saved macOS baseline profile sees hot anonymous
MAP_JITaddresses as<unknown binary>because generated mappings have no native symbol table. #461 requires symbolized attribution and #483 includes debug/unwind metadata, but neither owns end-to-end profiler registration, native stack reconstruction, or lifecycle validation.Scope
No-workaround rules
Acceptance
Foundation
Baseline dispatch profile; inspector/CPU-profile foundations under #139/#404.