You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 27, 2025. It is now read-only.
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 the src/ 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 has c_flags added similarly)
then make clean; make to build from scratch.
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.