man-pages/man1/ocamlprof.1.html
2021-03-31 01:06:50 +01:00

133 lines
2.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of OCAMLPROF</TITLE>
</HEAD><BODY>
<H1>OCAMLPROF</H1>
Section: User Commands (1)<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<P>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
ocamlprof - The OCaml profiler
<P>
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>ocamlprof</B>
[
<I>options</I>
]
<I>filename ...</I>
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
The
<B>ocamlprof</B>
command prints execution counts gathered during the execution of a
OCaml program instrumented with
<B><A HREF="/cgi-bin/man/man2html?1+ocamlcp">ocamlcp</A></B>(1).
<P>
It produces a source listing of the program modules given as arguments
where execution counts have been inserted as comments. For instance,
<P>
<B>ocamlprof foo.ml</B>
<P>
prints the source code for the foo module, with comments indicating
how many times the functions in this module have been called. Naturally,
this information is accurate only if the source file has not been modified
since the profiling execution took place.
<P>
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<P>
<DL COMPACT>
<DT id="1"><B>-f</B><I>&nbsp;dumpfile</I>
<DD>
Specifies an alternate dump file of profiling information.
<DT id="2"><B>-F</B><I>&nbsp;string</I>
<DD>
Specifies an additional string to be output with profiling information.
By default,
<B><A HREF="/cgi-bin/man/man2html?1+ocamlprof">ocamlprof</A></B>(1)
will annotate programs with comments of the form
<B>(*</B><I>&nbsp;n</I><B>&nbsp;*)</B>
where
<I>n</I>
is the counter value for a profiling point. With option
<B>-F</B><I>&nbsp;s</I>
the annotation will be
<B>(*</B><I>&nbsp;sn</I><B>&nbsp;*)</B>
<DT id="3"><B>-impl</B><I>&nbsp;filename</I>
<DD>
Compile the file
<I>filename</I>
as an implementation file, even if its extension is not .ml.
<DT id="4"><B>-intf</B><I>&nbsp;filename</I>
<DD>
Compile the file
<I>filename</I>
as an interface file, even if its extension is not .mli.
<DT id="5"><B>-version</B>
<DD>
Print version string and exit.
<DT id="6"><B>-vnum</B>
<DD>
Print short version number and exit.
<DT id="7"><B>-help</B>&nbsp;or<B>&nbsp;--help</B>
<DD>
Display a short usage summary and exit.
<P>
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+ocamlcp">ocamlcp</A></B>(1).
<BR>
<I>The OCaml user's manual</I>,
chapter &quot;Profiling&quot;.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="8"><A HREF="#lbAB">NAME</A><DD>
<DT id="9"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="10"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="11"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="12"><A HREF="#lbAF">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:20 GMT, March 31, 2021
</BODY>
</HTML>