Closed Bug 1869365 Opened 2 years ago Closed 2 years ago

Add shell function to print MIR/LIR of wasm function

Categories

(Core :: JavaScript: WebAssembly, task, P3)

task

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: rhunt, Assigned: rhunt)

References

Details

Attachments

(1 file)

It's already possible to print the MIR/LIR by using the IonFlags envvar and grepping through logs for your specific function. I personally end up avoiding that because it's a bit tedious.

I prototyped a quick patch which will take wasm bytecode and a func index, and return a JS String with the MIR/LIR dump. It's similar to our wasmDis function, which I use more often.

Assignee: nobody → rhunt

Usage:
wasmDumpIon(bytecode, funcIndex, "mir" | "lir" | "opt-mir");

Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/013c01e9b424 wasm: Add shell function to dump MIR/LIR of wasm function. r=jseward
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: