[MLton] bug report

Stephen Weeks MLton@mlton.org
Fri, 22 Apr 2005 14:02:59 -0700


> On MacOS X 10.3.9, I did
> 
> 	mlton -profile alloc -output ast.prof astar.mlb
> 
> but when I run ast.prof, I get a core dump (BTW, time
> profiling works for this program). 

Thanks for the bug report John.  I checked in a fix to our CVS.
Please see

	http://mlton.org/Bugs20041109

It's a simple patch, but it does require rebuilding the compiler to
take effect.  If you have trouble doing this, let us know and we can
help.  Also see

	http://mlton.localhost/SelfCompiling


When I run your program on MacOS X, I now see

----------------------------------------------------------------------
** start **
---
01 05 00 06 
08 07 10 02 
12 09 15 14 
13 04 03 11 
---
heuristic of start: 24
expanded 209126 nodes
7903 nodes per second
distance 40
----------------------------------------------------------------------

Here are the nonzero profile counts.

131,664,112 bytes allocated (15,000 bytes by GC)
         function            cur
--------------------------- -----
LeftPriorityQFn.mkNode      52.7%
Sequence.tabulate           13.4%
AStar.children              11.4%
LeftPriorityQFn.singleton    9.5%
AStar.child                  7.6%
HashTableFn.insert.look      2.5%
HashTableRep.growTable.copy  1.6%
HashTableRep.growTable       0.8%
HashTableRep.alloc           0.4%