-
Notifications
You must be signed in to change notification settings - Fork 77
Profiling Scilla : Tips
Vaivaswatha N edited this page May 15, 2019
·
2 revisions
-
To profile and view the profiling data, you need to compile our codebase with debug (line number) info.
- To do that, you have to edit all the
dune
files in thesrc/
directory (recursively) of Scilla and add the line(ocamlopt_flags -g)
- See
src/cpp/dune
for where to add the line. (as an example. It hasc_flags
added similarly) thenmake clean; make
to build from scratch.
- To do that, you have to edit all the
-
You now have a build with debug info (line number info) in the executables.
- Now just run
valgrind --tool=callgrind -v ./bin/scilla-runner ...
. This will create profile outputs as described here http://kcachegrind.sourceforge.net/html/Usage.html. You can visualize that profiling data with kcachegrind. - In short, what
valgrind --tool=callgrind
does is to run the executable and sample frequently which parts/lines of the (Scilla) code is executing. At the end of it has a "database" of which lines where executed "how many times". That's pretty much what we want: where was most of our time spent.
- Now just run