kit profiling

Stephen Weeks sweeks@wasabi.epr.com
Sat, 10 Jul 1999 02:42:29 -0700 (PDT)


> How does -dsf look? 

At the end of this message.

> The numbers certainily are consistant with the time
> being mainly in GC.  Lots in MLTON_gc, pretty much in forward,
> foreachPointerInHeap and foreachPointerInStackGen.  This would all be
> explained if there were lots of GCs, especially in places where lots of
> pointer-holding C variables are alive, but where not very much actually
> survives a GC (so MLTON_gc would be high, but forwarding and foreachPointer...
> would be much much lower).  

Agreed.

> Do the GC numbers seem consistant with this?

Running kit with "@MLton gc-summary --" reports

GC time(ms): 14,570 (16.6%)

This is a bit higher than the sum of the percentages given by the
profiler would indicate (7.18 + 2.35 + 0.04 + 0.01).  However, it's
not totally insane.

> Given that 96.12% was spent in GC (including the C overhead), there were only
> 310 ticks left (for non-GC activities).  Of these, 231 went to MLton_main
> (i.e., the trampoline loop), 47 to stringEqual, 23 to intRem, 8 to intQuot
> and 1 to class.  It looks bad, but not unbelievable to me.  All it would
> take would be bad luck in the coalscing (so the trampoline loop is really
> busy) and some routines that count on string compare and rem/quot being
> really fast.  Speaking of which, are these really not done inline?

The rem/quot are inline assembler, which caused gcc to barf
sometimes, so I turned them into C procedures.

> Anyway, if you want, you can send me the .c/a.out/gmon.out and I will look
> if the C procedure counts are right.  Also you can look at the -dsf stuff
> to see if things seem sane.  I'm open to suggestions.

Nah.  I think the thing to do now is some simple tweaks to the backend 
to cut down or eliminate the pointer copying and see what happens.

--------------------------------------------------------------------------------

7995 ticks total
MLTON_gc (magic) (Chunk10982)          16.71%
forward (C function)                    7.18%
MLTON_gc (magic) (Chunk10968)           6.64%
MLTON_gc (magic) (Chunk11217)           3.53%
MLton_main (magic) (main)               2.89%
MLTON_gc (magic) (Chunk11210)           2.83%
MLTON_gc (magic) (Chunk11201)           2.39%
foreachPointerInHeap (C function)       2.35%
MLTON_gc (magic) (Chunk11174)           2.19%
MLTON_gc (magic) (Chunk11260)           2.14%
MLTON_gc (magic) (Chunk9265)            1.96%
MLTON_gc (magic) (Chunk10881)           1.86%
MLTON_gc (magic) (Chunk11189)           1.60%
MLTON_gc (magic) (Chunk10410)           1.59%
MLTON_gc (magic) (Chunk11131)           1.55%
MLTON_gc (magic) (Chunk11188)           1.50%
MLTON_gc (magic) (Chunk11015)           1.46%
MLTON_gc (magic) (Chunk10975)           1.45%
MLTON_gc (magic) (Chunk10985)           1.45%
MLTON_gc (magic) (Chunk11180)           1.44%
MLTON_gc (magic) (Chunk11182)           1.31%
MLTON_gc (magic) (Chunk11269)           1.19%
MLTON_gc (magic) (Chunk11226)           1.15%
MLTON_gc (magic) (Chunk11261)           1.13%
MLTON_gc (magic) (Chunk11273)           1.13%
MLTON_gc (magic) (Chunk11274)           0.96%
MLTON_gc (magic) (Chunk10874)           0.88%
MLTON_gc (magic) (Chunk11187)           0.84%
MLTON_gc (magic) (Chunk11184)           0.79%
MLTON_gc (magic) (Chunk11206)           0.75%
MLTON_gc (magic) (Chunk11178)           0.74%
MLTON_gc (magic) (Chunk10892)           0.71%
MLTON_gc (magic) (Chunk11252)           0.71%
MLTON_gc (magic) (Chunk11253)           0.71%
MLTON_gc (magic) (Chunk10044)           0.69%
MLTON_gc (magic) (Chunk11142)           0.68%
MLTON_gc (magic) (Chunk11001)           0.65%
MLTON_gc (magic) (Chunk11020)           0.59%
MLTON_gc (magic) (Chunk11209)           0.59%
stringEqual (C function)                0.59%
MLTON_gc (magic) (Chunk11263)           0.56%
MLTON_gc (magic) (Chunk10457)           0.54%
MLTON_gc (magic) (Chunk11207)           0.53%
MLTON_gc (magic) (Chunk10880)           0.50%
MLTON_gc (magic) (Chunk11019)           0.50%
MLTON_gc (magic) (Chunk10408)           0.46%
MLTON_gc (magic) (Chunk11018)           0.43%
MLTON_gc (magic) (Chunk10996)           0.39%
MLTON_gc (magic) (Chunk10570)           0.36%
MLTON_gc (magic) (Chunk11125)           0.36%
MLTON_gc (magic) (Chunk11126)           0.36%
MLTON_gc (magic) (Chunk11211)           0.36%
MLTON_gc (magic) (Chunk10884)           0.35%
MLTON_gc (magic) (Chunk11254)           0.35%
MLTON_gc (magic) (Chunk10083)           0.31%
MLTON_gc (magic) (Chunk10955)           0.30%
MLTON_gc (magic) (Chunk10991)           0.29%
intRem (C function)                     0.29%
MLTON_gc (magic) (Chunk11193)           0.28%
MLTON_gc (magic) (Chunk9227)            0.28%
MLTON_gc (magic) (Chunk11190)           0.26%
MLTON_gc (magic) (Chunk10390)           0.25%
MLTON_gc (magic) (Chunk10395)           0.24%
MLTON_gc (magic) (Chunk10993)           0.24%
MLTON_gc (magic) (Chunk11228)           0.24%
MLTON_gc (magic) (Chunk10081)           0.23%
MLTON_gc (magic) (Chunk11212)           0.23%
MLTON_gc (magic) (Chunk11191)           0.21%
MLTON_gc (magic) (Chunk11199)           0.21%
MLTON_gc (magic) (Chunk10789)           0.20%
MLTON_gc (magic) (Chunk11214)           0.20%
MLTON_gc (magic) (Chunk10922)           0.19%
MLTON_gc (magic) (Chunk10969)           0.19%
MLTON_gc (magic) (Chunk10049)           0.18%
MLTON_gc (magic) (Chunk11200)           0.18%
MLTON_gc (magic) (Chunk7344)            0.18%
MLTON_gc (magic) (Chunk7513)            0.18%
MLTON_gc (magic) (Chunk7532)            0.18%
MLTON_gc (magic) (Chunk10406)           0.16%
MLTON_gc (magic) (Chunk11266)           0.16%
MLTON_gc (magic) (Chunk10469)           0.15%
MLTON_gc (magic) (Chunk10995)           0.14%
MLTON_gc (magic) (Chunk7263)            0.14%
MLTON_gc (magic) (Chunk10047)           0.13%
MLTON_gc (magic) (Chunk11186)           0.13%
MLTON_gc (magic) (Chunk10167)           0.11%
MLTON_gc (magic) (Chunk7319)            0.11%
MLTON_gc (magic) (Chunk9934)            0.11%
MLTON_gc (magic) (Chunk10148)           0.10%
MLTON_gc (magic) (Chunk10562)           0.10%
MLTON_gc (magic) (Chunk11011)           0.10%
MLTON_gc (magic) (Chunk11255)           0.10%
MLTON_gc (magic) (Chunk1570)            0.10%
MLTON_gc (magic) (Chunk7213)            0.10%
intQuot (C function)                    0.10%
MLTON_gc (magic) (Chunk7216)            0.09%
MLTON_gc (magic) (Chunk7268)            0.09%
MLTON_gc (magic) (Chunk10315)           0.08%
MLTON_gc (magic) (Chunk11183)           0.08%
MLTON_gc (magic) (Chunk11230)           0.08%
MLTON_gc (magic) (Chunk5228)            0.08%
MLTON_gc (magic) (Chunk7265)            0.08%
MLTON_gc (magic) (Chunk9932)            0.08%
MLTON_gc (magic) (Chunk11022)           0.06%
MLTON_gc (magic) (Chunk5226)            0.06%
MLTON_gc (magic) (Chunk10682)           0.05%
MLTON_gc (magic) (Chunk10872)           0.05%
MLTON_gc (magic) (Chunk10879)           0.05%
MLTON_gc (magic) (Chunk11049)           0.05%
MLTON_gc (magic) (Chunk11233)           0.05%
MLTON_gc (magic) (Chunk7264)            0.05%
MLTON_gc (magic) (Chunk7309)            0.05%
MLTON_gc (magic) (Chunk7318)            0.05%
MLTON_gc (magic) (Chunk7518)            0.05%
MLTON_gc (magic) (Chunk7536)            0.05%
MLTON_gc (magic) (Chunk9223)            0.05%
MLTON_gc (magic) (Chunk10026)           0.04%
MLTON_gc (magic) (Chunk10051)           0.04%
MLTON_gc (magic) (Chunk10314)           0.04%
MLTON_gc (magic) (Chunk10393)           0.04%
MLTON_gc (magic) (Chunk10394)           0.04%
MLTON_gc (magic) (Chunk10467)           0.04%
MLTON_gc (magic) (Chunk10560)           0.04%
MLTON_gc (magic) (Chunk10579)           0.04%
MLTON_gc (magic) (Chunk10622)           0.04%
MLTON_gc (magic) (Chunk10692)           0.04%
MLTON_gc (magic) (Chunk10787)           0.04%
MLTON_gc (magic) (Chunk10967)           0.04%
MLTON_gc (magic) (Chunk10983)           0.04%
MLTON_gc (magic) (Chunk11012)           0.04%
MLTON_gc (magic) (Chunk11220)           0.04%
MLTON_gc (magic) (Chunk1571)            0.04%
MLTON_gc (magic) (Chunk3783)            0.04%
MLTON_gc (magic) (Chunk5971)            0.04%
MLTON_gc (magic) (Chunk7215)            0.04%
MLTON_gc (magic) (Chunk7456)            0.04%
MLTON_gc (magic) (Chunk7504)            0.04%
MLTON_gc (magic) (Chunk7543)            0.04%
MLTON_gc (magic) (Chunk9739)            0.04%
foreachPointerInStackGen (C function)   0.04%
MLTON_gc (magic) (Chunk10043)           0.03%
MLTON_gc (magic) (Chunk10050)           0.03%
MLTON_gc (magic) (Chunk10079)           0.03%
MLTON_gc (magic) (Chunk10133)           0.03%
MLTON_gc (magic) (Chunk10159)           0.03%
MLTON_gc (magic) (Chunk10296)           0.03%
MLTON_gc (magic) (Chunk10303)           0.03%
MLTON_gc (magic) (Chunk10581)           0.03%
MLTON_gc (magic) (Chunk10586)           0.03%
MLTON_gc (magic) (Chunk10608)           0.03%
MLTON_gc (magic) (Chunk10609)           0.03%
MLTON_gc (magic) (Chunk10626)           0.03%
MLTON_gc (magic) (Chunk10627)           0.03%
MLTON_gc (magic) (Chunk10628)           0.03%
MLTON_gc (magic) (Chunk10651)           0.03%
MLTON_gc (magic) (Chunk10848)           0.03%
MLTON_gc (magic) (Chunk10878)           0.03%
MLTON_gc (magic) (Chunk10960)           0.03%
MLTON_gc (magic) (Chunk10981)           0.03%
MLTON_gc (magic) (Chunk11000)           0.03%
MLTON_gc (magic) (Chunk11181)           0.03%
MLTON_gc (magic) (Chunk11225)           0.03%
MLTON_gc (magic) (Chunk11227)           0.03%
MLTON_gc (magic) (Chunk11251)           0.03%
MLTON_gc (magic) (Chunk11268)           0.03%
MLTON_gc (magic) (Chunk1566)            0.03%
MLTON_gc (magic) (Chunk1569)            0.03%
MLTON_gc (magic) (Chunk2818)            0.03%
MLTON_gc (magic) (Chunk5235)            0.03%
MLTON_gc (magic) (Chunk5236)            0.03%
MLTON_gc (magic) (Chunk5273)            0.03%
MLTON_gc (magic) (Chunk7198)            0.03%
MLTON_gc (magic) (Chunk7212)            0.03%
MLTON_gc (magic) (Chunk7343)            0.03%
MLTON_gc (magic) (Chunk7503)            0.03%
MLTON_gc (magic) (Chunk7545)            0.03%
MLTON_gc (magic) (Chunk8954)            0.03%
MLTON_gc (magic) (Chunk9040)            0.03%
MLTON_gc (magic) (Chunk9041)            0.03%
MLTON_gc (magic) (Chunk9043)            0.03%
MLTON_gc (magic) (Chunk9044)            0.03%
MLTON_gc (magic) (Chunk9770)            0.03%
MLTON_gc (magic) (Chunk9791)            0.03%
MLTON_gc (magic) (Chunk9940)            0.03%
MLTON_gc (magic) (Chunk10013)           0.01%
MLTON_gc (magic) (Chunk10028)           0.01%
MLTON_gc (magic) (Chunk10030)           0.01%
MLTON_gc (magic) (Chunk10076)           0.01%
MLTON_gc (magic) (Chunk10078)           0.01%
MLTON_gc (magic) (Chunk10080)           0.01%
MLTON_gc (magic) (Chunk10082)           0.01%
MLTON_gc (magic) (Chunk10141)           0.01%
MLTON_gc (magic) (Chunk10142)           0.01%
MLTON_gc (magic) (Chunk10154)           0.01%
MLTON_gc (magic) (Chunk10202)           0.01%
MLTON_gc (magic) (Chunk10251)           0.01%
MLTON_gc (magic) (Chunk10252)           0.01%
MLTON_gc (magic) (Chunk10285)           0.01%
MLTON_gc (magic) (Chunk10313)           0.01%
MLTON_gc (magic) (Chunk10377)           0.01%
MLTON_gc (magic) (Chunk10384)           0.01%
MLTON_gc (magic) (Chunk10385)           0.01%
MLTON_gc (magic) (Chunk10396)           0.01%
MLTON_gc (magic) (Chunk10407)           0.01%
MLTON_gc (magic) (Chunk10453)           0.01%
MLTON_gc (magic) (Chunk10547)           0.01%
MLTON_gc (magic) (Chunk10558)           0.01%
MLTON_gc (magic) (Chunk10561)           0.01%
MLTON_gc (magic) (Chunk10588)           0.01%
MLTON_gc (magic) (Chunk10589)           0.01%
MLTON_gc (magic) (Chunk10591)           0.01%
MLTON_gc (magic) (Chunk10602)           0.01%
MLTON_gc (magic) (Chunk10603)           0.01%
MLTON_gc (magic) (Chunk10604)           0.01%
MLTON_gc (magic) (Chunk10606)           0.01%
MLTON_gc (magic) (Chunk10607)           0.01%
MLTON_gc (magic) (Chunk10611)           0.01%
MLTON_gc (magic) (Chunk10621)           0.01%
MLTON_gc (magic) (Chunk10642)           0.01%
MLTON_gc (magic) (Chunk10649)           0.01%
MLTON_gc (magic) (Chunk10662)           0.01%
MLTON_gc (magic) (Chunk10681)           0.01%
MLTON_gc (magic) (Chunk10693)           0.01%
MLTON_gc (magic) (Chunk10746)           0.01%
MLTON_gc (magic) (Chunk10871)           0.01%
MLTON_gc (magic) (Chunk10877)           0.01%
MLTON_gc (magic) (Chunk10885)           0.01%
MLTON_gc (magic) (Chunk10888)           0.01%
MLTON_gc (magic) (Chunk10903)           0.01%
MLTON_gc (magic) (Chunk10956)           0.01%
MLTON_gc (magic) (Chunk10980)           0.01%
MLTON_gc (magic) (Chunk10994)           0.01%
MLTON_gc (magic) (Chunk11006)           0.01%
MLTON_gc (magic) (Chunk11016)           0.01%
MLTON_gc (magic) (Chunk11023)           0.01%
MLTON_gc (magic) (Chunk11132)           0.01%
MLTON_gc (magic) (Chunk11169)           0.01%
MLTON_gc (magic) (Chunk11176)           0.01%
MLTON_gc (magic) (Chunk11185)           0.01%
MLTON_gc (magic) (Chunk11215)           0.01%
MLTON_gc (magic) (Chunk11216)           0.01%
MLTON_gc (magic) (Chunk1224)            0.01%
MLTON_gc (magic) (Chunk1568)            0.01%
MLTON_gc (magic) (Chunk2584)            0.01%
MLTON_gc (magic) (Chunk2645)            0.01%
MLTON_gc (magic) (Chunk2646)            0.01%
MLTON_gc (magic) (Chunk2965)            0.01%
MLTON_gc (magic) (Chunk3415)            0.01%
MLTON_gc (magic) (Chunk3658)            0.01%
MLTON_gc (magic) (Chunk3760)            0.01%
MLTON_gc (magic) (Chunk3763)            0.01%
MLTON_gc (magic) (Chunk3786)            0.01%
MLTON_gc (magic) (Chunk3984)            0.01%
MLTON_gc (magic) (Chunk4038)            0.01%
MLTON_gc (magic) (Chunk4272)            0.01%
MLTON_gc (magic) (Chunk4360)            0.01%
MLTON_gc (magic) (Chunk4361)            0.01%
MLTON_gc (magic) (Chunk4367)            0.01%
MLTON_gc (magic) (Chunk4368)            0.01%
MLTON_gc (magic) (Chunk4589)            0.01%
MLTON_gc (magic) (Chunk4746)            0.01%
MLTON_gc (magic) (Chunk4765)            0.01%
MLTON_gc (magic) (Chunk5061)            0.01%
MLTON_gc (magic) (Chunk5101)            0.01%
MLTON_gc (magic) (Chunk5201)            0.01%
MLTON_gc (magic) (Chunk5237)            0.01%
MLTON_gc (magic) (Chunk5244)            0.01%
MLTON_gc (magic) (Chunk5275)            0.01%
MLTON_gc (magic) (Chunk5279)            0.01%
MLTON_gc (magic) (Chunk5281)            0.01%
MLTON_gc (magic) (Chunk5286)            0.01%
MLTON_gc (magic) (Chunk5948)            0.01%
MLTON_gc (magic) (Chunk5963)            0.01%
MLTON_gc (magic) (Chunk5966)            0.01%
MLTON_gc (magic) (Chunk5977)            0.01%
MLTON_gc (magic) (Chunk6021)            0.01%
MLTON_gc (magic) (Chunk7169)            0.01%
MLTON_gc (magic) (Chunk7171)            0.01%
MLTON_gc (magic) (Chunk7180)            0.01%
MLTON_gc (magic) (Chunk7183)            0.01%
MLTON_gc (magic) (Chunk7203)            0.01%
MLTON_gc (magic) (Chunk7209)            0.01%
MLTON_gc (magic) (Chunk7214)            0.01%
MLTON_gc (magic) (Chunk7259)            0.01%
MLTON_gc (magic) (Chunk7260)            0.01%
MLTON_gc (magic) (Chunk7266)            0.01%
MLTON_gc (magic) (Chunk7371)            0.01%
MLTON_gc (magic) (Chunk7373)            0.01%
MLTON_gc (magic) (Chunk7375)            0.01%
MLTON_gc (magic) (Chunk7376)            0.01%
MLTON_gc (magic) (Chunk7440)            0.01%
MLTON_gc (magic) (Chunk7454)            0.01%
MLTON_gc (magic) (Chunk7483)            0.01%
MLTON_gc (magic) (Chunk7519)            0.01%
MLTON_gc (magic) (Chunk7538)            0.01%
MLTON_gc (magic) (Chunk7546)            0.01%
MLTON_gc (magic) (Chunk8523)            0.01%
MLTON_gc (magic) (Chunk8581)            0.01%
MLTON_gc (magic) (Chunk8601)            0.01%
MLTON_gc (magic) (Chunk8812)            0.01%
MLTON_gc (magic) (Chunk8909)            0.01%
MLTON_gc (magic) (Chunk8918)            0.01%
MLTON_gc (magic) (Chunk8934)            0.01%
MLTON_gc (magic) (Chunk8971)            0.01%
MLTON_gc (magic) (Chunk9259)            0.01%
MLTON_gc (magic) (Chunk9297)            0.01%
MLTON_gc (magic) (Chunk9365)            0.01%
MLTON_gc (magic) (Chunk9546)            0.01%
MLTON_gc (magic) (Chunk9584)            0.01%
MLTON_gc (magic) (Chunk9586)            0.01%
MLTON_gc (magic) (Chunk9922)            0.01%
MLTON_gc (magic) (Chunk9977)            0.01%
class (C function)                      0.01%
foreachGlobal (C function)              0.01%