]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/contrib/man/ocamlprof.m
update
[l4.git] / l4 / pkg / ocaml / contrib / man / ocamlprof.m
1 \" $Id: ocamlprof.m 9027 2008-09-15 14:25:42Z doligez $
2 .TH OCAMLPROF 1
3
4 .SH NAME
5 ocamlprof \- The Objective Caml profiler
6
7 .SH SYNOPSIS
8 .B ocamlprof
9 [
10 .BI \-f \ dump-file
11 ]
12 [
13 .BI \-F \ text
14 ]
15 .I filename ...
16
17 .SH DESCRIPTION
18 The
19 .B ocamlprof
20 command prints execution counts gathered during the execution of a
21 Objective Caml program instrumented with
22 .BR ocamlcp (1).
23
24 It produces a source listing of the program modules given as arguments
25 where execution counts have been inserted as comments. For instance,
26
27 .B ocamlprof foo.ml
28
29 prints the source code for the foo module, with comments indicating
30 how many times the functions in this module have been called. Naturally,
31 this information is accurate only if the source file has not been modified
32 since the profiling execution took place.
33
34 .SH OPTIONS
35
36 .TP
37 .BI \-f \ dumpfile
38 Specifies an alternate dump file of profiling information.
39 .TP
40 .BI \-F \ string
41 Specifies an additional string to be output with profiling information.
42 By default,
43 .BR ocamlprof (1)
44 will annotate programs with comments of the form
45 .BI (* \ n \ *)
46 where
47 .I n
48 is the counter value for a profiling point. With option
49 .BI \-F \ s
50 the annotation will be
51 .BI (* \ sn \ *)
52 .TP
53 .BI \-impl \ filename
54 Compile the file
55 .I filename
56 as an implementation file, even if its extension is not .ml.
57 .TP
58 .BI \-intf \ filename
59 Compile the file
60 .I filename
61 as an interface file, even if its extension is not .mli.
62 .TP
63 .B \-version
64 Print the version number of ocamlprof and exit.
65 .TP
66 .BR \-help \ or \ \-\-help
67 Display a short usage summary and exit.
68
69 .SH SEE ALSO
70 .BR ocamlcp (1).
71 .br
72 .IR "The Objective Caml user's manual" ,
73 chapter "Profiling".