Is anybody aware of programs for profiling OCaml code apart from using the -p option while compilation and then using gprof? I am asking this question in order to check if the sampling time of 0.01 second can be lowered further?
相关问题
- Writing an interpreter in OCaml [closed]
- Using Core.Std.List.fold_left without label
- See if key exists in a String Map
- How do I connect to a Java command-line tool with
- Passing a string to a C library from OCaml using C
相关文章
- Profiling Django with PyCharm
- How to hide miniprofiler?
- ocaml %identity function
- Profiling the Performance of a Google App Script
- Functors in Ocaml
- Visual Studio Profiler showing “[broken]” as funct
- What is the easiest way to add an element to the e
- saving cProfile results to readable external file
Never used it but ocamlviz is another option.
poorman's profiler is perfectly applicable for OCaml programs. The same idea works out for profiling allocations as well.
Adding to the list of useful answers: this OCamlPro post mentions performance profiling (not memory profiling) of native code on Linux using
perf
(installed via packagelinux-tools
in Debian-like distributions).Basically, you just need to run:
To produce a
perf.data
file containing profiling data, and then runTo see the results.
It works better when using an OCaml release with frame pointers enabled (e.g.
4.02.1+fp
instead of4.02.1
on OPAM).You can also use ocaml-memprof, a compiler patch (3.12.0 and 3.12 1) written by Fabrice Le Fessant, that adds memory profiling features to ocaml programs.
EDIT
Now you have
ocp-memprof
, an OCaml Memory Profiler that you can use online. It is available on http://memprof.typerex.org.