1OCAMLCP(1)                  General Commands Manual                 OCAMLCP(1)
2
3
4

NAME

6       ocamlcp - The Objective Caml profiling compiler
7
8

SYNOPSIS

10       ocamlcp [ ocamlc options ] [ -p flags ] filename ...
11
12

DESCRIPTION

14       The  ocamlcp  script  is  a front-end to ocamlc(1) that instruments the
15       source code, adding code to record how many times functions are called,
16       branches of conditionals are taken, ...  Execution of instrumented code
17       produces an execution profile in the file ocamlprof.dump, which can  be
18       read using ocamlprof(1).
19
20       ocamlcp accepts the same arguments and options as ocamlc(1).
21
22

OPTIONS

24       In  addition  to  the  ocamlc(1) options, ocamlcp accepts the following
25       option controlling the amount of profiling information:
26
27
28       -p letters
29              The letters following -p indicate which  parts  of  the  program
30              should be profiled:
31
32
33       a      all options
34
35       f      function  calls : a count point is set at the beginning of func‐
36              tion bodies
37
38       i      if... then... else: count points are set in both  "then"  branch
39              and "else" branch
40
41       l      while,  for  loops: a count point is set at the beginning of the
42              loop body
43
44       m      "match" branches: a count point is set at the beginning  of  the
45              body of each branch
46
47       t      try...with  branches:  a  count point is set at the beginning of
48              the body of each branch
49
50              For instance, compiling with ocamlcp  -pfilm  profiles  function
51              calls, if... then... else..., loops, and pattern matching.
52
53              Calling ocamlcp(1) without the -p option defaults to -p fm mean‐
54              ing that only function calls and pattern matching are profiled.
55
56

SEE ALSO

58       ocamlc(1), ocamlprof(1).
59       The Objective Caml user's manual, chapter "Profiling".
60
61
62
63                                                                    OCAMLCP(1)
Impressum