Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | .TH mlprof 1 "February 6, 2018" |
2 | .SH NAME | |
3 | \fBmlprof\fP \- display profiling information for a MLton-compiled executable | |
4 | .SH SYNOPSIS | |
5 | \fBmlprof \fI[option ...] a.out [mlmon.out ...]\fR | |
6 | .SH DESCRIPTION | |
7 | .PP | |
8 | \fBmlprof\fP extracts information from an executable compiled by | |
9 | \fBMLton\fP with \fB-profile alloc\fP or \fB-profile time\fP and the | |
10 | resulting \fBmlmon.out\fP file produced by running the executable. | |
11 | ||
12 | The output of \fBmlprof\fP consists of an initial line indicating the | |
13 | total amount of CPU time or bytes allocated. After this, source | |
14 | functions are listed along with the percentage of this total that they | |
15 | used, in decreasing order. If the program was compiled with | |
16 | \fB-profile-stack true\fP, \fBmlprof\fP will display the time spent or | |
17 | bytes allocated while the function was on the stack and in GC in | |
18 | addition to the time or bytes that the function is directly | |
19 | responsible for. | |
20 | ||
21 | With multiple \fBmlmon.out\fP files, \fBmlprof\fP will sum the | |
22 | profiling information. | |
23 | ||
24 | .SH OPTIONS | |
25 | .TP | |
26 | \fB-call-graph \fIfile\fP | |
27 | Write a call graph containing the table data to a dot file. See the | |
28 | \fBMLton User Guide\fP for details. | |
29 | .TP | |
30 | \fB-graph-title \fIstring\fP | |
31 | Set the call-graph title. | |
32 | .TP | |
33 | \fB-gray \fI{\fBfalse\fP|\fBtrue\fP}\fP | |
34 | Gray call-graph nodes according to stack %. This only makes sense if | |
35 | the executable was compiled \fB-profile-stack true\fP. | |
36 | .TP | |
37 | \fB-keep \fIexp\fP | |
38 | Only show functions specified by \fIexp\fP. For details on the | |
39 | allowed expressions, see the \fBMLton User Guide\fP. Multiple | |
40 | \fB-keep\fP expressions are not allowed. | |
41 | .TP | |
42 | \fB-mlmon \fIfile\fP | |
43 | Process the list of whitespace-separated \fBmlmon.out\fP files found | |
44 | in the specified file. | |
45 | .TP | |
46 | \fB-raw \fI{\fBfalse\fP|\fBtrue\fP}\fP | |
47 | Show the raw counts in addition to the percentages. | |
48 | .TP | |
49 | \fB-show-line \fI{\fBfalse\fP|\fBtrue\fP}\fP | |
50 | Show the file and line for each function. | |
51 | .TP | |
52 | \fB-split \fIregexp\fP | |
53 | Treat duplicates of functions whose name matches \fIregexp\fP as | |
54 | different functions. | |
55 | .TP | |
56 | \fB-thresh \fIx\fP | |
57 | An abbreviation for \fB-keep '(thresh x)'\fP, which only prints | |
58 | information about functions whose percentage is greater than or equal | |
59 | to \fBx\fP, where 0 <= \fBx\fP <= 100.0. | |
60 | .TP | |
61 | \fB-tolerant \fI{\fBfalse\fP|\fBtrue\fP}\fP | |
62 | Print a warning about broken \fBmlmon.out\fP files, but do not exit. | |
63 | .SH "SEE ALSO" | |
64 | .BR mlton (1) | |
65 | and the \fBMLton Guide\fP. |