Import Debian changes 20180207-1
[hcoop/debian/mlton.git] / doc / guide / localhost / Profiling
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>Profiling</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>Profiling</h1>
27 </div>
28 <div id="content">
29 <div id="preamble">
30 <div class="sectionbody">
31 <div class="paragraph"><p>With MLton and <span class="monospaced">mlprof</span>, you can profile your program to find out
32 bytes allocated, execution counts, or time spent in each function. To
33 profile you program, compile with <span class="monospaced">-profile <em>kind</em></span>, where <em>kind</em>
34 is one of <span class="monospaced">alloc</span>, <span class="monospaced">count</span>, or <span class="monospaced">time</span>. Then, run the executable,
35 which will write an <span class="monospaced">mlmon.out</span> file when it finishes. You can then
36 run <span class="monospaced">mlprof</span> on the executable and the <span class="monospaced">mlmon.out</span> file to see the
37 performance data.</p></div>
38 <div class="paragraph"><p>Here are the three kinds of profiling that MLton supports.</p></div>
39 <div class="ulist"><ul>
40 <li>
41 <p>
42 <a href="ProfilingAllocation">ProfilingAllocation</a>
43 </p>
44 </li>
45 <li>
46 <p>
47 <a href="ProfilingCounts">ProfilingCounts</a>
48 </p>
49 </li>
50 <li>
51 <p>
52 <a href="ProfilingTime">ProfilingTime</a>
53 </p>
54 </li>
55 </ul></div>
56 </div>
57 </div>
58 <div class="sect1">
59 <h2 id="_next_steps">Next steps</h2>
60 <div class="sectionbody">
61 <div class="ulist"><ul>
62 <li>
63 <p>
64 <a href="CallGraph">CallGraph</a>s to visualize profiling data.
65 </p>
66 </li>
67 <li>
68 <p>
69 <a href="HowProfilingWorks">HowProfilingWorks</a>
70 </p>
71 </li>
72 <li>
73 <p>
74 <a href="MLmon">MLmon</a>
75 </p>
76 </li>
77 <li>
78 <p>
79 <a href="MLtonProfile">MLtonProfile</a> to selectively profile parts of your program.
80 </p>
81 </li>
82 <li>
83 <p>
84 <a href="ProfilingTheStack">ProfilingTheStack</a>
85 </p>
86 </li>
87 <li>
88 <p>
89 <a href="ShowProf">ShowProf</a>
90 </p>
91 </li>
92 </ul></div>
93 </div>
94 </div>
95 </div>
96 <div id="footnotes"><hr></div>
97 <div id="footer">
98 <div id="footer-text">
99 </div>
100 <div id="footer-badges">
101 </div>
102 </div>
103 </body>
104 </html>