Login or Register to Ask a Question and Join Our Community

Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ocamlcp(1) [centos man page]

OCAMLCP(1)						      General Commands Manual							OCAMLCP(1)

NAME
ocamlcp, ocamloptp - The OCaml profiling compilers SYNOPSIS
ocamlcp [ ocamlc options ] [ -P flags ] filename ... ocamloptp [ ocamlopt options ] [ -P flags ] filename ... DESCRIPTION
The ocamlcp and ocamloptp commands are front-ends to ocamlc(1) and ocamlopt(1) that instrument the source code, adding code to record how many times functions are called, branches of conditionals are taken, etc. Execution of instrumented code produces an execution profile in the file ocamlprof.dump, which can be read using ocamlprof(1). ocamlcp accepts the same arguments and options as ocamlc(1) and ocamloptp accepts the same arguments and options as ocamlopt(1). There is only one exception: in both cases, the -pp option is not supported. If you need to preprocess your source files, you will have to do it separately before calling ocamlcp or ocamloptp. OPTIONS
In addition to the ocamlc(1) or ocamlopt(1) options, ocamlcp and ocamloptp accept one option to control the kind of profiling information, the -P letters option. The letters indicate which parts of the program should be profiled: a all options f function calls : a count point is set at the beginning of each function body i if ... then ... else: count points are set in both then and else branches l while, for loops: a count point is set at the beginning of the loop body m match branches: a count point is set at the beginning of the body of each branch of a pattern-matching t try ... with branches: a count point is set at the beginning of the body of each branch of an exception catcher For instance, compiling with ocamlcp -P film profiles function calls, if ... then ... else ..., loops, and pattern matching. Calling ocamlcp(1) or ocamloptp(1) without the -P option defaults to -P fm, meaning that only function calls and pattern matching are pro- filed. Note: for compatibility with previous versions, ocamlcp(1) also accepts the option -p with the same argument and meaning as -P. SEE ALSO
ocamlc(1), ocamlopt(1), ocamlprof(1). The OCaml user's manual, chapter "Profiling". OCAMLCP(1)

Check Out this Related Man Page

ELIOMC(1)						      General Commands Manual							 ELIOMC(1)

NAME
eliomc, eliomcp, eliomopt, js_of_eliom, eliomdep - the eliom build tools SYNOPSIS
eliomc [options] files eliomcp [options] files eliomopt [options] files eliomdep [options] files js_of_eliom [options] files -o filename.js DESCRIPTION
eliomc, eliomcp and eliomopt are wrapper around the OCaml compiler that ease the compilation of the server part of projects based on the Eliom framework. They respectively accept the same set of option than the ocamlc(1),ocamlcp(1) and ocamlopt(1) compilers plus the specific ones described in the OPTIONS section. js_of_eliom is a wrapper around the OCaml and Js_of_ocaml compilers that ease the compilation of the client part of projects based on the Eliom framework. It accepts the same set of option than the ocamlc(1) compiler plus the specific ones described in the OPTIONS section. eliomdep is a wrapper around ocamldep(1) that handles dependencies of an .eliom source files. It accepts the same set of options plus the specific ones described in the OPTIONS section. Warnings: this tools is still limited and do not handle dependencies towards an .eliom files. COMPILING ELIOM SOURCE FILES
The compilation of files with a .eliom extension is achieved in three steps: infer the type of value sent by the server to the client; com- pile the server part of the code and compile the client part. The first two steps can be realised with eliomc and the last one with js_of_eliom. Both tools produce a .cmo file named as the original .eliom file. To avoid overwriting the .cmo representing the server part with .cmo of the client part, files generated by eliomc or eliomopt are stored by default in a subdirectory named _server and files generated by js_of_eliom are stored in a subdirectory named _client. Those default directories could be respectively overridden by the environment vari- ables ELIOM_SERVER_DIR and ELIOM_CLIENT_DIR. The types infered by eliomc for values sent by the server to the client are stored in an intermediate files named as the original .eliom file and whose extension is .type_mli. That file is required by js_of_eliom for compiling the client part of the .eliom file. The eliomdep tool correctly generate dependencies that intermediate file for the server .cmo and the client .cmo. OPTIONS
-dir <dir> Specify the target directory for generated files -package <name> This is the same option as the ocamlfind one. -predicates <p> This is the same option as the ocamlfind one. -ppopt <opt> Append <opt> to preprocessor invocation. -jsopt <opt> Append <opt> to js_of_ocaml invocation (js_of_eliom only). -infer <opt> For .eliom file, only generate the intermediate .type_mli file (eliomc and eliomopt only). -noinfer <opt> For .eliom file, do not generate the intermediate .type_mli file (eliomc and eliomopt only). -help or --help Display a short usage summary and exit. EXAMPLES
The compilation of an Eliom projects composed of a server specific file named server.ml, a client specific file named client.ml and two common files name base.eliom and main.eliom, could be achieved with the following commands: eliomc -a -o appl.cma server.ml base.eliom main.eliom js_of_eliom -o appl.js client.ml base.eliom main.eliom To avoid recompiling the whole project each times, this could be split in multiple steps: eliomc -c server.ml eliomc -c base.eliom eliomc -c main.eliom eliomc -a -o appl.cma _server/server.cmo _server/base.cmo _server/main.cmo js_of_eliom -c client.ml js_of_eliom -c base.eliom js_of_eliom -c main.eliom js_of_eliom -o appl.js _client/client.cmo _client/base.cmo _client/main.cmo SEE ALSO
ocamlc(1), ocamlopt(1), js_of_ocaml(1), ocamlfind(1), ocamlcp(1), ocamldep(1). AUTHOR
eliomc, js_of_eliom, eliomdep and eliomopt were written by Gregoire Henry <gregoire.henry@pps.jussieu.fr>. This manual page was written by Pierre Chambart <chambart@crans.org>. 2012-02-15 ELIOMC(1)
Man Page

Featured Tech Videos