<!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>ShowProf - 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"> <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-833377-1"; urchinTracker(); </script> <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 MLTONWIKIVERSION</a> <td style = " border: 0px; font-size: 150%; text-align: center; width: 50%;"> ShowProf <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> <a href = "TitleIndex">Index</a> </table> <div id="content" lang="en" dir="ltr"> If an executable is compiled for <a href="Profiling">profiling</a>, then it accepts a special command-line runtime system argument, <tt>show-prof</tt>, that outputs information about the source functions that are profiled. Normally, this information is used by <tt>mlprof</tt>. This page documents the <tt>show-prof</tt> output format, and is intended for those working on the profiler internals. <p> The <tt>show-prof</tt> output is ASCII, and consists of a sequence of lines. </p> <ul> <li> <p> The magic number of the executable. </p> </li> <li> <p> The number of source names in the executable. </p> </li> <li> <p> A line for each source name giving the name of the function, a tab, the filename of the file containing the function, a colon, a space, and the line number that the function starts on in that file. </p> </li> <li> <p> The number of (split) source functions. </p> </li> <li> <p> A line for each (split) source function, where each line consists of a source-name index (into the array of source names) and a successors index (into the array of split-source sequences, defined below). </p> </li> <li> <p> The number of split-source sequences. </p> </li> <li> <p> A line for each split-source sequence, where each line is a space separated list of (split) source functions. </p> </li> </ul> <p> The latter two arrays, split sources and split-source sequences, define a directed graph, which is the call-graph of the program. </p> </div> <p> <hr> Last edited on 2006-10-23 23:29:54 by <span title="ppp-71-139-167-207.dsl.snfc21.pacbell.net"><a href="StephenWeeks">StephenWeeks</a></span>. </body></html>