1996-05-10 06:27:26 -07:00
|
|
|
.TH OCAMLPROF 1
|
1995-11-02 08:54:37 -08:00
|
|
|
|
|
|
|
.SH NAME
|
1996-04-30 07:53:58 -07:00
|
|
|
ocamlprof \- The Objective Caml profiler
|
1995-11-02 08:54:37 -08:00
|
|
|
|
|
|
|
.SH SYNOPSIS
|
1996-04-30 07:53:58 -07:00
|
|
|
.B ocamlprof
|
1995-11-02 08:54:37 -08:00
|
|
|
[
|
|
|
|
.BI \-f \ dump-file
|
|
|
|
]
|
|
|
|
[
|
|
|
|
.BI \-F \ text
|
|
|
|
]
|
|
|
|
.I filename ...
|
|
|
|
|
|
|
|
.SH DESCRIPTION
|
|
|
|
The
|
1996-04-30 07:53:58 -07:00
|
|
|
.B ocamlprof
|
1995-11-02 08:54:37 -08:00
|
|
|
command prints execution counts gathered during the execution of a
|
1996-04-30 07:53:58 -07:00
|
|
|
Objective Caml program instrumented with
|
|
|
|
.BR ocamlcp (1).
|
1995-11-02 08:54:37 -08:00
|
|
|
|
|
|
|
It produces a source listing of the program modules given as arguments
|
|
|
|
where execution counts have been inserted as comments. For instance,
|
|
|
|
.P
|
1996-04-30 07:53:58 -07:00
|
|
|
ocamlprof foo.ml
|
1995-11-02 08:54:37 -08:00
|
|
|
.P
|
|
|
|
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.
|
|
|
|
|
|
|
|
.SH OPTIONS
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.BI \-f \ dumpfile
|
|
|
|
Specifies an alternate dump file of profiling information.
|
1996-04-30 07:53:58 -07:00
|
|
|
The default is the file ocamlprof.dump in the current directory.
|
1995-11-02 08:54:37 -08:00
|
|
|
.TP
|
|
|
|
.BI \-F \ string
|
|
|
|
Specifies an additional string to be output with profiling information.
|
|
|
|
By default,
|
1996-04-30 07:53:58 -07:00
|
|
|
.B ocamlprof
|
2004-07-13 05:25:21 -07:00
|
|
|
will annotate programs with comments of the form
|
1995-11-02 08:54:37 -08:00
|
|
|
.BI (* \ n \ *)
|
|
|
|
where
|
|
|
|
.I n
|
|
|
|
is the counter value for a profiling point. With option
|
|
|
|
.BI \-F \ string
|
|
|
|
the annotation will be
|
|
|
|
.BI (* \ s\ n \ *)
|
|
|
|
|
|
|
|
.SH SEE ALSO
|
1996-04-30 07:53:58 -07:00
|
|
|
.BR ocamlcp (1).
|
1995-11-02 08:54:37 -08:00
|
|
|
.br
|
1996-04-30 07:53:58 -07:00
|
|
|
.I The Objective Caml user's manual,
|
1995-11-02 08:54:37 -08:00
|
|
|
chapter "Profiling".
|