The ocamlprof command produces a source listing of the program modules where execution counts have been inserted as comments. For instance,
prints the source code for the foo module, with comments indicating how many times the functions in this module have been called. Naturally, this information is accurate only if the source file has not been modified since the profiling execution took place.
The following options are recognized by ocamlprof:
Specifies an alternate dump file of profiling information to be read.
Specifies an additional string to be output with profiling information. By default, ocamlprof will annotate programs with comments of the form (* n *) where n is the counter value for a profiling point. With option -F s, the annotation will be (* sn *).
Treat sourcefile as an implementation file (i.e. as if its name ended with .ml).
Treat sourcefile as an interface file (i.e. as if its name ended with .mli).
Print the version number of ocamlprof and exit.
These options are undocumented; they are used internally by ocamlcp.