2011-07-27 07:17:02 -07:00
|
|
|
.\"***********************************************************************
|
|
|
|
.\"* *
|
|
|
|
.\"* OCaml *
|
|
|
|
.\"* *
|
|
|
|
.\"* Xavier Leroy, projet Cristal, INRIA Rocquencourt *
|
|
|
|
.\"* *
|
|
|
|
.\"* Copyright 1996 Institut National de Recherche en Informatique et *
|
|
|
|
.\"* en Automatique. All rights reserved. This file is distributed *
|
|
|
|
.\"* under the terms of the Q Public License version 1.0. *
|
|
|
|
.\"* *
|
|
|
|
.\"***********************************************************************
|
|
|
|
.\"
|
1996-05-10 06:27:26 -07:00
|
|
|
.TH OCAMLPROF 1
|
1995-11-02 08:54:37 -08:00
|
|
|
|
|
|
|
.SH NAME
|
2011-04-26 05:16:50 -07:00
|
|
|
ocamlprof \- The OCaml 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
|
|
|
[
|
2010-05-20 07:06:29 -07:00
|
|
|
.I options
|
1995-11-02 08:54:37 -08:00
|
|
|
]
|
|
|
|
.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
|
2011-04-26 05:16:50 -07:00
|
|
|
OCaml program instrumented with
|
1996-04-30 07:53:58 -07:00
|
|
|
.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,
|
2008-09-15 07:05:30 -07:00
|
|
|
|
|
|
|
.B ocamlprof foo.ml
|
|
|
|
|
1995-11-02 08:54:37 -08:00
|
|
|
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
|
2008-09-15 07:05:30 -07:00
|
|
|
.BI \-f \ dumpfile
|
1995-11-02 08:54:37 -08:00
|
|
|
Specifies an alternate dump file of profiling information.
|
|
|
|
.TP
|
|
|
|
.BI \-F \ string
|
|
|
|
Specifies an additional string to be output with profiling information.
|
|
|
|
By default,
|
2008-09-15 07:05:30 -07:00
|
|
|
.BR ocamlprof (1)
|
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
|
2008-09-15 07:25:42 -07:00
|
|
|
.BI \-F \ s
|
1995-11-02 08:54:37 -08:00
|
|
|
the annotation will be
|
2008-09-15 07:25:42 -07:00
|
|
|
.BI (* \ sn \ *)
|
2008-09-15 07:05:30 -07:00
|
|
|
.TP
|
|
|
|
.BI \-impl \ filename
|
|
|
|
Compile the file
|
|
|
|
.I filename
|
|
|
|
as an implementation file, even if its extension is not .ml.
|
|
|
|
.TP
|
|
|
|
.BI \-intf \ filename
|
|
|
|
Compile the file
|
|
|
|
.I filename
|
|
|
|
as an interface file, even if its extension is not .mli.
|
|
|
|
.TP
|
|
|
|
.B \-version
|
2010-05-20 07:06:29 -07:00
|
|
|
Print version string and exit.
|
|
|
|
.TP
|
|
|
|
.B \-vnum
|
|
|
|
Print short version number and exit.
|
2008-09-15 07:05:30 -07:00
|
|
|
.TP
|
|
|
|
.BR \-help \ or \ \-\-help
|
|
|
|
Display a short usage summary and exit.
|
1995-11-02 08:54:37 -08:00
|
|
|
|
|
|
|
.SH SEE ALSO
|
1996-04-30 07:53:58 -07:00
|
|
|
.BR ocamlcp (1).
|
1995-11-02 08:54:37 -08:00
|
|
|
.br
|
2011-04-26 05:16:50 -07:00
|
|
|
.IR "The OCaml user's manual" ,
|
1995-11-02 08:54:37 -08:00
|
|
|
chapter "Profiling".
|