feat: wasmer perfmap profiling #1714
Open
+450
−217
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[Runtime] Add Wasmer PerfMap Profiling for WASM Stack Traces in Flamegraphs
Description
Adds Wasmer PerfMap profiling to show WASM function names in CPU flamegraphs instead of
[perf-<PID>.map]entries. This enables symbolization of JIT-compiled WASM code during profiling.Changes:
wasmer-compiler-craneliftas optional dependency withprofilingfeatureENABLE_WASMER_PROFILING=trueDependencies:
wasmer-compiler-cranelift = "4.2.5"(optional, only for profiling builds)calimero-runtime/profilingTest Plan
CI Testing:
fuzzy-load-test.ymlto run on PRs with 5-minute duration (temporary for testing)Documentation Update
Note
Introduces PerfMap-based WASM stack symbolization and upgrades Wasmer across the workspace.
wasmerto6.1.0and add optionalwasmer-compiler-cranelift; update runtime to newwasmer::sysAPIsprofilingfeature incalimero-runtimeandcalimero-context; runtime uses Cranelift andenable_perfmap()whenENABLE_WASMER_PROFILING=trueTrapCode::UncaughtExceptionand set tunables only for sys enginesperf-<pid>.mapfor WASM symbolization; flamegraph generation restored from saved mapscalimero-context/profiling; fuzzy load tests trigger on PRs and temporarily run for 5 minutes; image tag logic extends wait time for profiling buildsWritten by Cursor Bugbot for commit fc9df34. This will update automatically on new commits. Configure here.