mlprof-native broken

Matthew Fluet mfluet@intertrust.com
Fri, 1 Jun 2001 11:05:52 -0700 (PDT)


> It looks like mlprof-native (the program) is broken to me.  It could be some
> version-drift problem, but when I use the -s flag the procedures timed are
> all wrong.  I wrote my own program to look at the mapping and the output
> is just not right.  Could you check and see what is going on?  Or send me
> a current version.

I suspect I know what is going on.  Here is a little piece of
nm -n raytrace:

0806e5bc t switchToThread
0806e5d4 t copyThread
0806e618 T GC_copyThreadShrink
0806e650 T stackNeedsReserved
0806e67c T GC_copyThread
0806e6c0 T GC_fromSpace
0806e6f8 T GC_toSpace
0806e728 T rusageZero
0806e7b0 T rusagePlus
0806e8c0 T rusagePlusMax
0806e928 T rusageMinus
0806ead0 T rusageMinusMax
0806eb38 T rusageTime
0806eb8c T currentTime
0806ebac T GC_computeHeapSize
0806ebe8 T GC_foreachGlobal
0806ec64 T GC_foreachPointerInObject
0806edec T GC_foreachPointerInRange
0806ee38 T GC_initCounters
0806ef34 t initSignalStack
0806ef9c t getRAMsize

When mlprof is run with -s, we include the "T" labels in addition to the
"t" labels.  So, I get time attributed to "GC_foreachGlobal" with -s
instead attributed to "copyThread" without -s.  As best I can make out,
this is what was happenning in the old version of mlprof.

Henry seemed to be implying that with -s was giving incorrect results,
whereas I would think that that is more accurate.

Again, I'm not sure what we mean by the distinction between static and
non-static functions.  I can tell the difference between functions in the
.S files and ones outside them.