1mlprof(1) General Commands Manual mlprof(1)
2
3
4
6 mlprof - display profiling information for a MLton-compiled executable
7
9 mlprof [option ...] a.out [mlmon.out ...]
10
12 mlprof extracts information from an executable compiled by MLton with
13 -profile alloc or -profile time and the resulting mlmon.out file pro‐
14 duced by running the executable.
15
16 The output of mlprof consists of an initial line indicating the total
17 amount of CPU time or bytes allocated. After this, source functions
18 are listed along with the percentage of this total that they used, in
19 decreasing order. If the program was compiled with -profile-stack
20 true, mlprof will display the time spent or bytes allocated while the
21 function was on the stack and in GC in addition to the time or bytes
22 that the function is directly responsible for.
23
24 With multiple mlmon.out files, mlprof will sum the profiling informa‐
25 tion.
26
27
29 -call-graph file
30 Write a call graph containing the table data to a dot file. See
31 the MLton User Guide for details.
32
33 -graph-title string
34 Set the call-graph title.
35
36 -gray {false|true}
37 Gray call-graph nodes according to stack %. This only makes
38 sense if the executable was compiled -profile-stack true.
39
40 -keep exp
41 Only show functions specified by exp. For details on the
42 allowed expressions, see the MLton User Guide. Multiple -keep
43 expressions are not allowed.
44
45 -mlmon file
46 Process the list of whitespace-separated mlmon.out files found
47 in the specified file.
48
49 -raw {false|true}
50 Show the raw counts in addition to the percentages.
51
52 -show-line {false|true}
53 Show the file and line for each function.
54
55 -split regexp
56 Treat duplicates of functions whose name matches regexp as dif‐
57 ferent functions.
58
59 -thresh x
60 An abbreviation for -keep '(thresh x)', which only prints infor‐
61 mation about functions whose percentage is greater than or equal
62 to x, where 0 <= x <= 100.0.
63
64 -tolerant {false|true}
65 Print a warning about broken mlmon.out files, but do not exit.
66
68 mlton(1) and the MLton Guide.
69
70
71
72 February 6, 2018 mlprof(1)