https://wiki.haskell.org/index.php?title=Yhc/Heap_profiling&feed=atom&action=historyYhc/Heap profiling - Revision history2024-03-19T08:00:00ZRevision history for this page on the wikiMediaWiki 1.35.5https://wiki.haskell.org/index.php?title=Yhc/Heap_profiling&diff=2446&oldid=prevWolfgang Jeltsch: Yhc/HeapProfiling moved to Yhc/Heap profiling2006-02-20T22:26:07Z<p>Yhc/HeapProfiling moved to Yhc/Heap profiling</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 22:26, 20 February 2006</td>
</tr>
<!-- diff cache key wikidb_haskell:diff:wikidiff2:1.12:old-1712:rev-2446:1.10.0 -->
</table>Wolfgang Jeltschhttps://wiki.haskell.org/index.php?title=Yhc/Heap_profiling&diff=1712&oldid=prevNeilMitchell at 23:43, 15 January 20062006-01-15T23:43:09Z<p></p>
<p><b>New page</b></p><div>== Lag, drag, void, use ==<br />
<br />
nhc98 had two pass compilation for this, lets try and do better :)<br />
<br />
Assuming you have the lower level operations to detect when a node is collected, when it is used and when it is created:<br />
<br />
node' = {node, time CreationTime, time FirstUse, time LastUse}<br />
<br />
when a node' is created, it gets its creation time.<br />
<br />
when a node' is used first, its FirstUse time gets set<br />
<br />
when a note' is used ever, every single time, its gets its LastUse set.<br />
<br />
When a node' is collected, its stats can be calculated:<br />
lag = firstuse-creation<br />
drag = now-lastuse<br />
void = if null creationtime then now-creation else 0<br />
use = lastuse-firstuse<br />
<br />
I guess the user will want to know which type of nodes, created by which function, are in any state at any discrete time point. This can be done with a set of accumulators, so effectively the graph is built in memory, then when a node' is collected it can be added to this list.<br />
<br />
int graph[code][time];<br />
where code is a list of all possible (function,type of node) pairs, and time is a list of discrete time steps.<br />
<br />
This will require one pass running, does it miss anything? It doesn't say who holds onto the node, but it does the rest?</div>NeilMitchell