1 .\"**************************************************************************
2 .\"* *
3 .\"* OCaml *
4 .\"* *
5 .\"* Xavier Leroy, projet Cristal, INRIA Rocquencourt *
6 .\"* *
7 .\"* Copyright 1996 Institut National de Recherche en Informatique et *
8 .\"* en Automatique. *
9 .\"* *
10 .\"* All rights reserved. This file is distributed under the terms of *
11 .\"* the GNU Lesser General Public License version 2.1, with the *
12 .\"* special exception on linking described in the file LICENSE. *
13 .\"* *
14 .\"**************************************************************************
15 .\"
16 .TH OCAMLPROF 1
17
18 .SH NAME
19 ocamlprof \- The OCaml profiler
20
21 .SH SYNOPSIS
22 .B ocamlprof
23 [
24 .I options
25 ]
26 .I filename ...
27
28 .SH DESCRIPTION
29 The
30 .B ocamlprof
31 command prints execution counts gathered during the execution of a
32 OCaml program instrumented with
33 .BR ocamlcp (1).
34
35 It produces a source listing of the program modules given as arguments
36 where execution counts have been inserted as comments. For instance,
37
38 .B ocamlprof foo.ml
39
40 prints the source code for the foo module, with comments indicating
41 how many times the functions in this module have been called. Naturally,
42 this information is accurate only if the source file has not been modified
43 since the profiling execution took place.
44
45 .SH OPTIONS
46
47 .TP
48 .BI \-f \ dumpfile
49 Specifies an alternate dump file of profiling information.
50 .TP
51 .BI \-F \ string
52 Specifies an additional string to be output with profiling information.
53 By default,
54 .BR ocamlprof (1)
55 will annotate programs with comments of the form
56 .BI (* \ n \ *)
57 where
58 .I n
59 is the counter value for a profiling point. With option
60 .BI \-F \ s
61 the annotation will be
62 .BI (* \ sn \ *)
63 .TP
64 .BI \-impl \ filename
65 Compile the file
66 .I filename
67 as an implementation file, even if its extension is not .ml.
68 .TP
69 .BI \-intf \ filename
70 Compile the file
71 .I filename
72 as an interface file, even if its extension is not .mli.
73 .TP
74 .B \-version
75 Print version string and exit.
76 .TP
77 .B \-vnum
78 Print short version number and exit.
79 .TP
80 .BR \-help \ or \ \-\-help
81 Display a short usage summary and exit.
82
83 .SH SEE ALSO
84 .BR ocamlcp (1).
85 .br
86 .IR "The OCaml user's manual" ,
87 chapter "Profiling".
88