원클릭으로
wasm-d8-perf
Use this skill to reproduce, profile, or analyze WebAssembly (Wasm) execution performance using d8 shell.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use this skill to reproduce, profile, or analyze WebAssembly (Wasm) execution performance using d8 shell.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Manages git task isolation and environment setup in V8. Use at the start of any new task or bug fix. Do not use for general C++ editing.
Use this when you need to minimize a complex or bloated JavaScript test case (e.g., from a fuzzer or external report) into a minimal, readable reproduction for debugging V8 issues.
Guides the initial analysis and impact assessment of a V8 security report, strictly excluding implementation or fixing.
Executes and interprets V8 tests. Use when running unittests, cctest, or mjsunit, or when debugging test failures. Do not use for building.
Use this skill when designing, writing, or minimizing regression tests (e.g., mjsunit) for V8 bug fixes
Workflow for issue-based debugging in V8. Use when tasked with debugging a specific issue, usually associated with a Buganizer ID or a specific reproduction script. Do not use for performance regressions.
| name | wasm-d8-perf |
| description | Use this skill to reproduce, profile, or analyze WebAssembly (Wasm) execution performance using d8 shell. |
Reproduce, profile, and analyze Wasm performance using the V8 developer shell
(d8).
release build (e.g., out/x64.release/d8)
for benchmarking.optdebug (e.g., out/x64.optdebug/d8) for disassembling/debugging
(preserves symbols).console.time()).
/usr/bin/time -v (Wall time, memory) and
perf stat -d (cycles, instructions, IPC, branch misses).
perf fails due to permissions (e.g.
kernel.perf_event_paranoid), notify the user to adjust settings or
switch to a PMU-enabled environment (gLinux/Cloudtop). Fall back to
d8 --prof if needed.--trace-gc to trace garbage collection pauses,
especially if WasmGC is used.d8 --liftoff-only script.jsd8 --no-liftoff script.js
--no-liftoff disables speculative inlining since it skips
Liftoff execution and thus doesn't collect feedback.Find where time is spent, what the hottest functions, loops, blocks, or instructions are, so we focus on that:
./tools/profiling/linux-perf-d8.py to get a profile with
JIT symbols resolved, then analyze with perf report.d8 --prof script.js and analyze v8.log with
./tools/linux-tick-processor.d8 --trace-wasm-compilation-times and d8 --turbo-stats-wasm.wami (tools/dev/gm.py x64.release wami) and
disassemble: out/x64.release/wami --single-wat=<func_index> <path_to_wasm>Unoptimized Wasm binary patterns can hurt V8 compilation and execution.
-O3/-Os).Perform deep dives on hot functions:
d8 --trace-turbo --trace-turbo-filter=<func_name>.
jq
programmatically:
jq '.phases[].name' turbo-*.jsonjq '.phases[] | {name: .name, node_count: (if (.data | type) == "object" and .data.nodes then (.data.nodes | length) else 0 end)}' turbo-*.jsonjq '.phases[] | select(.name == "TurboshaftTypeAssertionsPhase") | select((.data | type) == "object" and .data.nodes) | .data.nodes[] | select(.title | contains("BoundsCheck"))' turbo-*.jsonperf annotate -i file.perf.data.jitted --stdio
to map hot instructions to bytecode.
out/x64.optdebug/d8 --print-wasm-code-function-index=<idx> --code-comments.
> disasm.txt) to avoid
flooding the terminal.--trace-wasm-inlining, --trace-turbo-inlining--wasm-loop-peeling,
--wasm-loop-unrolling to see an effect of those optimizations.--turboshaft-trace-load-elimination,
--turboshaft-trace-peeling, --turboshaft-trace-unrolling--trace-wasm-typer--wasm-tiering-budget=<value>.--wasm-inlining-budget=<value>.d8 --help | grep -i <keyword> or by looking up definitions in
src/flags/flag-definitions.h and via grep. Refer to v8-commands skill
for general usage.Provide a clear report summarizing:
Only proceed to this step after your initial report and explicit approval by the user.
--no-wasm-loop-unrolling, --no-turboshaft-wasm-load-elimination,
--no-wasm-inlining, --no-turbo-inline-js-wasm-calls).
wasm-opt -O3 (or -Os) if
available on PATH, or ask the user to rebuild with different flags.