Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / localhost / MLmon
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>MLmon</title>
7 <link rel="stylesheet" href="./asciidoc.css" type="text/css">
8 <link rel="stylesheet" href="./pygments.css" type="text/css">
9
10
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
13 /*<![CDATA[*/
14 asciidoc.install();
15 /*]]>*/
16 </script>
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
18 </head>
19 <body class="article">
20 <div id="banner">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
23 </div>
24 </div>
25 <div id="header">
26 <h1>MLmon</h1>
27 </div>
28 <div id="content">
29 <div id="preamble">
30 <div class="sectionbody">
31 <div class="paragraph"><p>An <span class="monospaced">mlmon.out</span> file records dynamic <a href="Profiling">profiling</a> counts.</p></div>
32 </div>
33 </div>
34 <div class="sect1">
35 <h2 id="_file_format">File format</h2>
36 <div class="sectionbody">
37 <div class="paragraph"><p>An <span class="monospaced">mlmon.out</span> file is a text file with a sequence of lines.</p></div>
38 <div class="ulist"><ul>
39 <li>
40 <p>
41 The string "<span class="monospaced">MLton prof</span>".
42 </p>
43 </li>
44 <li>
45 <p>
46 The string "<span class="monospaced">alloc</span>", "<span class="monospaced">count</span>", or "<span class="monospaced">time</span>", depending on the kind
47 of profiling information, corresponding to the command-line argument
48 supplied to <span class="monospaced">mlton -profile</span>.
49 </p>
50 </li>
51 <li>
52 <p>
53 The string "<span class="monospaced">current</span>" or "<span class="monospaced">stack</span>" depending on whether profiling
54 data was gathered for only the current function (the top of the stack)
55 or for all functions on the stack. This corresponds to whether the
56 executable was compiled with <span class="monospaced">-profile-stack false</span> or <span class="monospaced">-profile-stack
57 true</span>.
58 </p>
59 </li>
60 <li>
61 <p>
62 The magic number of the executable.
63 </p>
64 </li>
65 <li>
66 <p>
67 The number of non-gc ticks, followed by a space, then the number of
68 GC ticks.
69 </p>
70 </li>
71 <li>
72 <p>
73 The number of (split) functions for which data is recorded.
74 </p>
75 </li>
76 <li>
77 <p>
78 A line for each (split) function with counts. Each line contains an
79 integer count of the number of ticks while the function was current.
80 In addition, if stack data was gathered (<span class="monospaced">-profile-stack true</span>), then
81 the line contains two additional tick counts:
82 </p>
83 <div class="ulist"><ul>
84 <li>
85 <p>
86 the number of ticks while the function was on the stack.
87 </p>
88 </li>
89 <li>
90 <p>
91 the number of ticks while the function was on the stack and a GC
92 was performed.
93 </p>
94 </li>
95 </ul></div>
96 </li>
97 <li>
98 <p>
99 The number of (master) functions for which data is recorded.
100 </p>
101 </li>
102 <li>
103 <p>
104 A line for each (master) function with counts. The lines have the
105 same format and meaning as with split-function counts.
106 </p>
107 </li>
108 </ul></div>
109 </div>
110 </div>
111 </div>
112 <div id="footnotes"><hr></div>
113 <div id="footer">
114 <div id="footer-text">
115 </div>
116 <div id="footer-badges">
117 </div>
118 </div>
119 </body>
120 </html>