.TH mlprof 1 "February 6, 2018" .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.