A collection of tools for tracing, visualizing and debugging deoptimization in Node.js/v8.
npm i -g @e18e/deopt
# or just npx it
npx @e18e/deopt foo.jsRun a script, then open the deoptimization visualization in your browser:
# run a script under the current node
npx @e18e/deopt app.js
# pass arguments to your script
npx @e18e/deopt app.js --some-flag
# use a specific runtime and/or node flags
npx @e18e/deopt node --allow-natives-syntax app.js
npx @e18e/deopt /path/to/node app.js
npx @e18e/deopt d8 app.jsOpen an existing v8 log without running anything:
npx @e18e/deopt v8.logYou can produce such a log yourself by running node with the relevant v8 logging flags:
node --log-ic --log-deopt --log-code --logfile=v8.log --no-logfile-per-isolate app.jsPass options to deopt itself before a -- separator:
npx @e18e/deopt <options> -- app.js --some-flagRun npx @e18e/deopt --help for the full list of options.
This was originally forked from deoptigate and heavily reworked. Huge thanks to @thlorenz for the original work and inspiration.
MIT