Skip to content

Instantly share code, notes, and snippets.

@lukego
Created September 23, 2015 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukego/5081087c3e6a70b92df3 to your computer and use it in GitHub Desktop.
Save lukego/5081087c3e6a70b92df3 to your computer and use it in GitHub Desktop.
counter2 module jit.p vs traceprof
$ sudo ./snabb snsh -jdump=+rs,x -jp=vi1 counter2.lua
100% TRACE 3 ->loop counter2.lua:5
$ sudo ./snabb snsh -jdump=+rs,x -jtprof counter2.lua
traceprof report (recorded 10567/10567 samples):
62% TRACE 3 counter2.lua:5
26% TRACE 4 (3/5) counter2.lua:9
10% TRACE 3:LOOP counter2.lua:5
@lukego
Copy link
Author

lukego commented Sep 23, 2015

Here is an updated version that includes cross-trace linkage in traceprof too:

traceprof report (recorded 10572/10572 samples):
 63% TRACE   3               ->loop    counter2.lua:5
 25% TRACE   4      (3/5)    ->3       counter2.lua:9
 11% TRACE   3:LOOP          ->loop    counter2.lua:5

I am really happy with this output. I think it clearly shows that time is being burned in rerunning the initial (non-loop) part of trace 3 due to repeated entries from trace 4.

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