1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="AsciiDoc 8.6.8">
<title>ShowProf</title>
<link rel="stylesheet" href="./asciidoc.css" type="text/css">
<link rel="stylesheet" href="./pygments.css" type="text/css">
<script type="text/javascript" src="./asciidoc.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
asciidoc.install();
/*]]>*/
</script>
<link rel="stylesheet" href="./mlton.css" type="text/css"/>
</head>
<body class="article">
<div id="banner">
<div id="banner-home">
<a href="./Home">MLton 20130715</a>
</div>
</div>
<div id="header">
<h1>ShowProf</h1>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p>If an executable is compiled for <a href="Profiling">profiling</a>, then it
accepts a special command-line runtime system argument, <span class="monospaced">show-prof</span>,
that outputs information about the source functions that are profiled.
Normally, this information is used by <span class="monospaced">mlprof</span>. This page documents
the <span class="monospaced">show-prof</span> output format, and is intended for those working on
the profiler internals.</p></div>
<div class="paragraph"><p>The <span class="monospaced">show-prof</span> output is ASCII, and consists of a sequence of lines.</p></div>
<div class="ulist"><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></div>
<div class="paragraph"><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>
</div>
</div>
</div>
<div id="footnotes"><hr></div>
<div id="footer">
<div id="footer-text">
</div>
<div id="footer-badges">
</div>
</div>
</body>
</html>
|