Profile cold unit module loading

This commit is contained in:
udo
2026-07-16 19:57:40 +00:00
parent 91074ccec9
commit 11025ab8b3
5 changed files with 83 additions and 6 deletions
+4
View File
@@ -137,6 +137,10 @@ own import vector, memory/table-base globals, GOT globals and function-table
slots, then runs relocations, constructors, and request-pointer binding. This
removes repeated Wasmtime import-type traversal without sharing request state or
changing core-first, unit-load-order symbol resolution.
`request_perf()` reports worker module-cache hits and misses and divides a miss
into artifact lookup, wasm read, custom-section parse, serialized-module
deserialization or wasm compilation, and immutable import classification. This
keeps cold-worker module latency distinguishable without exposing source paths.
Cold module compilation and deserialization are host work, so `load_unit()`
refreshes the epoch deadline before its first guest call. Otherwise a component
whose compilation outlasted the guest CPU budget would immediately trap in the