PR#3915 update man pages

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9024 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2008-09-11 16:34:57 +00:00
parent 7034f03311
commit 4b8877a422
3 changed files with 43 additions and 23 deletions

View File

@ -1,3 +1,5 @@
\" $Id$
.TH OCAML 1 .TH OCAML 1
.SH NAME .SH NAME

View File

@ -528,10 +528,11 @@ overriding of instance variables
.B Y .B Y
unused variables that are bound with unused variables that are bound with
.BR let \ or \ as , .BR let \ or \ as ,
and don't start with underscore and don't start with an underscore (_) character
.TP .TP
.B Z .B Z
all other cases of unused variables that don't start with underscore all other cases of unused variables that don't start with an
underscore (_) character
.TP .TP
.B X .B X
warnings that don't fit in the above categories warnings that don't fit in the above categories
@ -559,6 +560,14 @@ The default setting is
.TP .TP
.B \-where .B \-where
Print the location of the standard library, then exit. Print the location of the standard library, then exit.
.TP
.BI \- \ file
Process
.I file
as a file name, even if it starts with a dash (-) character.
.TP
.BR \-help \ or \ \-\-help
Display a usage summary and exit.
.SH SEE ALSO .SH SEE ALSO
.BR ocamlopt (1), \ ocamlrun (1), \ ocaml (1). .BR ocamlopt (1), \ ocamlrun (1), \ ocaml (1).

View File

@ -16,7 +16,7 @@ ocamlcp \- The Objective Caml profiling compiler
.SH DESCRIPTION .SH DESCRIPTION
The The
.B ocamlcp .B ocamlcp
script is a front-end to command is a front-end to
.BR ocamlc (1) .BR ocamlc (1)
that instruments the source code, adding code to record how many times that instruments the source code, adding code to record how many times
functions are called, branches of conditionals are taken, ... functions are called, branches of conditionals are taken, ...
@ -36,49 +36,58 @@ options,
.B ocamlcp .B ocamlcp
accepts the following option controlling the amount of profiling accepts the following option controlling the amount of profiling
information: information:
.TP .TP
.BR \-p \ letters .BI \-p \ letters
The letters following The
.B -p .I letters
indicate which parts of the program should be profiled: indicate which parts of the program should be profiled:
.TP .TP
.B a .B a
all options all options
.TP .TP
.B f .B f
function calls : a count point is set at the beginning of function bodies function calls : a count point is set at the beginning of each function body
.TP .TP
.B i .B i
if... then... else: count points are set in .BR if \ ... \ then \ ... \ else :
both "then" branch and "else" branch count points are set in both
.BR then \ and \ else
branches
.TP .TP
.B l .B l
while, for loops: a count point is set at the beginning of \BR while , \ for
the loop body loops: a count point is set at the beginning of the loop body
.TP .TP
.B m .B m
"match" branches: a count point is set at the beginning of the .B match
body of each branch branches: a count point is set at the beginning of the
body of each branch of a pattern-matching
.TP .TP
.B t .B t
try...with branches: a count point is set at the .BR try \ ... \ with
beginning of the body of each branch branches: a count point is set at the beginning of the body of each
branch of an exception catcher
For instance, compiling with .PP
For instance, compiling with
.B ocamlcp \-pfilm .B ocamlcp \-pfilm
profiles function calls, if... then... else..., loops, and pattern profiles function calls,
matching. \BR if \ ... \ then \ ... \ else \ ... ,
loops, and pattern matching.
Calling Calling
.BR ocamlcp (1) .BR ocamlcp (1)
without the without the
.B \-p .B \-p
option defaults to option defaults to
.B \-p fm .B \-p fm
meaning meaning that only function calls and pattern matching are profiled.
that only function calls and pattern matching are profiled.
Note: due to the implementation of streams and stream patterns as
syntactic sugar, it is hard to predict what parts of stream expressions
and patterns will be profiled by a given flag. To profile a program with
streams, we recommend using
.BR ocamlcp\ \-p\ a .
.SH SEE ALSO .SH SEE ALSO
.BR ocamlc (1), .BR ocamlc (1),