Skip to content

Instantly share code, notes, and snippets.

@mraleph
Last active June 18, 2017 10:54
Show Gist options
  • Select an option

  • Save mraleph/af0a600b1c3ee4a33c22fb2e4530628a to your computer and use it in GitHub Desktop.

Select an option

Save mraleph/af0a600b1c3ee4a33c22fb2e4530628a to your computer and use it in GitHub Desktop.
╭─ ~/src/node ‹master*›
╰─$ alias nodeir='node --trace-turbo                \
                       --trace-phase=Z              \
                       --trace-deopt                \
                       --code-comments              \
                       --hydrogen-track-positions   \
                       --redirect-code-traces       \
                       --print-opt-code'

Note: I don't pass --redirect-code-traces-to=code.asm to avoid squashing of all code traces into a single file. The benchmark harness is spawning node processes - so we need to ensure that code traces are redirected into different files (depending on their pid).

╭─ ~/src/node ‹master*›
╰─$ nodeir benchmark/http/create-clientrequest.js
Concurrent recompilation has been disabled for tracing.
Concurrent recompilation has been disabled for tracing.
http/create-clientrequest.js n=1000000 len=1: 649,332.1973534931
Concurrent recompilation has been disabled for tracing.
http/create-clientrequest.js n=1000000 len=1: 643,247.2537542669
Concurrent recompilation has been disabled for tracing.
http/create-clientrequest.js n=1000000 len=1: 659,452.0236851876
Concurrent recompilation has been disabled for tracing.
http/create-clientrequest.js n=1000000 len=1: 603,182.1917618861
╭─ ~/src/node ‹master*›
╰─$ ls -al {turbo-,code-}*
-rw-r--r--  1 vegorov  eng       436 Jun 18 12:42 code-84012-1.asm
-rw-r--r--  1 vegorov  eng       436 Jun 18 12:42 code-84182-1.asm
-rw-r--r--  1 vegorov  eng    446183 Jun 18 12:42 code-84185-1.asm
-rw-r--r--  1 vegorov  eng    445784 Jun 18 12:42 code-84188-1.asm
-rw-r--r--  1 vegorov  eng    446082 Jun 18 12:42 code-84200-1.asm
-rw-r--r--  1 vegorov  eng    446206 Jun 18 12:42 code-84203-1.asm
-rw-r--r--  1 vegorov  eng         0 Jun 18 12:42 turbo-84012-1.cfg
-rw-r--r--  1 vegorov  eng         0 Jun 18 12:42 turbo-84182-1.cfg
-rw-r--r--  1 vegorov  eng    873396 Jun 18 12:42 turbo-84185-1.cfg
-rw-r--r--  1 vegorov  eng    873317 Jun 18 12:42 turbo-84188-1.cfg
-rw-r--r--  1 vegorov  eng    873226 Jun 18 12:42 turbo-84200-1.cfg
-rw-r--r--  1 vegorov  eng    873326 Jun 18 12:42 turbo-84203-1.cfg

Now just load matching files code-⟨pid⟩-1.asm and turbo-⟨pid⟩-1.cfg into IRHydra and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment