3 ms·
To be more precise, the Firefox addon that does this lets you select a specific function and view the assembly on demand, instead of getting a multi-gigabyte IR
by kevingadd 13y ago
To be more precise, the Firefox addon that does this lets you select a specific function and view the assembly on demand, instead of getting a multi-gigabyte IR/assembly dump from a debug build of the browser. That's what makes it useful.
I agree that in general users should not need to care about IR or disassembly. Unfortunately, I'm not sure we'll ever end up in that world.
- mraleph 13y agoI see, yes just printing a simple function on demand is indeed quite useful. IIRC V8 has Debug.disassemble(f), requires both a special build and mirror debugger exposed to the page. Prints disassembly to stdout. Can be tweaked to return disassembly as string, but that requires knowledge of V8. (I actually don't know who is the client of this function or why it was added). [side note: if you get function disassembly you can't really be completely sure that that's the code that was running 2 seconds ago, that's one of the reasons why V8 just dumps everything]
- andrewf 13y agoCould you point me at this extension? I was trying to get disassembly of asm.js compiled by IonMonkey a couple of months ago. I had to run SpiderMonkey under gdb and disassemble the JITted entry points. (Or maybe I didn't...)
- kevingadd 13y agohttps://addons.mozilla.org/en-us/firefox/addon/jit-inspector/ https://addons.mozilla.org/en-us/firefox/addon/jit-inspector... I don't know if this dumps the disassembly for asm.js. I suspect it can't, since asm.js modules are AOT compiled into a single big block of code - but maybe it'll work. Give it a try!