<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta name="robots" content="index,nofollow">



<title>Profiling - MLton Standard ML Compiler (SML Compiler)</title>
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="all" href="common.css">
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="screen" href="screen.css">
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="print" href="print.css">


<link rel="Start" href="Home">


</head>

<body lang="en" dir="ltr">

<table bgcolor = lightblue cellspacing = 0 style = "border: 0px;" width = 100%>
  <tr>
    <td style = "
		border: 0px;
		color: darkblue; 
		font-size: 150%;
		text-align: left;">
      <a class = mltona href="Home">MLton 20051202</a>
    <td style = "
		border: 0px;
		font-size: 150%;
		text-align: center;
		width: 50%;">
      Profiling
    <td style = "
		border: 0px;
		text-align: right;">
      <table cellspacing = 0 style = "border: 0px">
        <tr style = "vertical-align: middle;">
      </table>
  <tr style = "background-color: white;">
    <td colspan = 3
	style = "
		border: 0px;
		font-size:70%;
		text-align: right;">
      <a href = "Home">Home</a>
      &nbsp;<a href = "Index">Index</a>
      &nbsp;
</table>
<div id="content" lang="en" dir="ltr">
With MLton and <tt>mlprof</tt>, you can profile your program to find out bytes allocated, execution counts, or time spent in each function.  To profile you program, compile with <tt>-profile</tt> <em>kind</em>, where <em>kind</em> is one of <tt>alloc</tt>, <tt>count</tt>, or <tt>time</tt>.  Then, run the executable, which will write an <tt>mlmon.out</tt> file when it finishes.  You can then run <tt>mlprof</tt> on the executable and the <tt>mlmon.out</tt> file to see the performance data. <p>
Here are the three kinds of profiling that MLton supports. 
</p>

    <ul>

    <li>
<p>
 <a href="ProfilingAllocation">ProfilingAllocation</a> 
</p>
</li>
    <li>
<p>
 <a href="ProfilingCounts">ProfilingCounts</a> 
</p>
</li>
    <li>
<p>
 <a href="ProfilingTime">ProfilingTime</a> 
</p>
</li>

    </ul>


<p>
Going further 
</p>

    <ul>

    <li>
<p>
 <a href="CallGraph">CallGraph</a>s to visualize profiling data. 
</p>
</li>
    <li>
<p>
 <a href="ProfilingTheStack">ProfilingTheStack</a> 
</p>
</li>
    <li>
<p>
 <a href="MLtonProfile">MLtonProfile</a> to selectively profile parts of your program. 
</p>
</li>
    <li>
<p>
 <a href="HowProfilingWorks">HowProfilingWorks</a>. 
</p>
</li>
</ul>

</div>



<p>
<hr>
Last edited on 2004-11-01 18:55:47 by <span title="adsl-67-124-249-200.dsl.snfc21.pacbell.net"><a href="StephenWeeks">StephenWeeks</a></span>.
</body></html>
