Manual Reference Pages - OCAMLCP (1)
ocamlcp, ocamloptp - The OCaml profiling compilers
ocamlc options ]
-P flags ]
ocamlopt options ]
-P flags ]
ocamloptp commands are front-ends to
that instrument the source code, adding code to record how many times
functions are called, branches of conditionals are taken, etc.
Execution of instrumented code produces an execution profile in the
file ocamlprof.dump, which can be read using
ocamlcp accepts the same arguments and options as
ocamloptp accepts the same arguments and options as
There is only one exception: in both cases, the
-pp option is not supported. If you need to preprocess your source files,
you will have to do it separately before calling
In addition to the
ocamloptp accept one option to control the kind of profiling information, the
-P letters option. The
letters indicate which parts of the program should be profiled:
For instance, compiling with
ocamlcp -P film profiles function calls,
if ... then ... else ..., loops, and pattern matching.
function calls : a count point is set at the beginning of each function body
if ... then ... else: count points are set in both
then and else branches
while, for loops: a count point is set at the beginning of the loop body
match branches: a count point is set at the beginning of the
body of each branch of a pattern-matching
try ... with branches: a count point is set at the beginning of the body of each
branch of an exception catcher
-P option defaults to
-P fm, meaning that only function calls and pattern matching are profiled.
Note: for compatibility with previous versions,
also accepts the option
-p with the same argument and meaning as
The OCaml users manual, chapter "Profiling".
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.