File: mlprof.1

package info (click to toggle)
mlton 20100608-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 34,980 kB
  • ctags: 69,089
  • sloc: ansic: 18,421; lisp: 2,879; makefile: 1,570; sh: 1,325; pascal: 256; asm: 97
file content (65 lines) | stat: -rw-r--r-- 2,323 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
.TH mlprof 1 "June 8, 2010"
.SH NAME
\fBmlprof\fP \- display profiling information for a MLton-compiled executable
.SH SYNOPSIS
\fBmlprof \fI[option ...] a.out [mlmon.out ...]\fR
.SH DESCRIPTION
.PP
\fBmlprof\fP extracts information from an executable compiled by
\fBMLton\fP with \fB-profile alloc\fP or \fB-profile time\fP and the
resulting \fBmlmon.out\fP file produced by running the executable.

The output of \fBmlprof\fP consists of an initial line indicating the
total amount of CPU time or bytes allocated.  After this, source
functions are listed along with the percentage of this total that they
used, in decreasing order.  If the program was compiled with
\fB-profile-stack true\fP, \fBmlprof\fP will display the time spent or
bytes allocated while the function was on the stack and in GC in
addition to the time or bytes that the function is directly
responsible for.

With multiple \fBmlmon.out\fP files, \fBmlprof\fP will sum the
profiling information.

.SH OPTIONS
.TP
\fB-call-graph \fIfile\fP
Write a call graph containing the table data to a dot file.  See the
\fBMLton User Guide\fP for details.
.TP
\fB-graph-title \fIstring\fP
Set the call-graph title.
.TP
\fB-gray \fI{\fBfalse\fP|\fBtrue\fP}\fP
Gray call-graph nodes according to stack %.  This only makes sense if
the executable was compiled \fB-profile-stack true\fP.
.TP
\fB-keep \fIexp\fP
Only show functions specified by \fIexp\fP.  For details on the
allowed expressions, see the \fBMLton User Guide\fP.  Multiple
\fB-keep\fP expressions are not allowed.
.TP
\fB-mlmon \fIfile\fP
Process the list of whitespace-separated \fBmlmon.out\fP files found
in the specified file.
.TP
\fB-raw \fI{\fBfalse\fP|\fBtrue\fP}\fP
Show the raw counts in addition to the percentages.
.TP
\fB-show-line \fI{\fBfalse\fP|\fBtrue\fP}\fP
Show the file and line for each function.
.TP
\fB-split \fIregexp\fP
Treat duplicates of functions whose name matches \fIregexp\fP as
different functions.
.TP
\fB-thresh \fIx\fP
An abbreviation for \fB-keep '(thresh x)'\fP, which only prints
information about functions whose percentage is greater than or equal
to \fBx\fP, where 0 <= \fBx\fP <= 100.0. 
.TP
\fB-tolerant \fI{\fBfalse\fP|\fBtrue\fP}\fP
Print a warning about broken \fBmlmon.out\fP files, but do not exit.
.SH "SEE ALSO"
.BR mlton (1)
and the \fBMLton Guide\fP.