[Mono-list] profiling mono

Michael Meeks michael@ximian.com
13 Nov 2002 11:21:17 +0000


Hi James,

On Wed, 2002-11-13 at 08:22, James Roberts wrote:
> > Why ? The real usefulness of OProfile surely is for
> > complete system profiling, 
> > across kernel / user-space /
> > cross-process and taking full
> > system call latencies into account.
> > 
> > Of course - none of this is that interesting wrt.
> > improving the performance of JIT'ing, ( though
> > fairly interesting for system
> > optimisation ).
>
> 1)Why sampling as opposed to instrumented method
> preambles?

	Sure - I don't disagree that sampling is a good method; I just don't
think requiring the OProfile kernel module is a good way to set about
implementing optimisation for a user-land process in fact I'm convinced
it's a daft idea. Combined with that, the fact that you have to treat
different processors differently ;-) [ AMD vs. Intel ] even within the
x86 family - and that the counter stuff doesn't work on older machines -
I think it's not a good plan.

> Instrumentation, however, is always on, or atleast
> more difficult to adjust.

	Sure; and hard to put in place.

> OProfile does most everything we want to do.  It is an
> existing piece of code that is able to leverage
> hardware mechanisms for collecting profile data (and
> does so at very low overhead).  Yes, OProfile is
> probably overkill for this problem, but its facilities
> can be scaled down for what we need it to do.

	If you just hack out the RTC sampling stuff from OProfile, you'd be
allright perhaps; but then you might as well write it yourself. Also, I
believe that one reason for OProfile's speed is that it does no
interpretation of the PC data, just logs it raw - that being done later,
so ...

> The high-speed timer is an idea I'd be willing to
> consider as an alternative to OProfile.  If we could
> somehow integrate the timer mechanism into the Mono
> runtime, perhaps we could get more detailed
> information than just PC addresses (as would happen
> with OProfile).
>
> Any suggestions on that?  What kind of timer did you
> have in mind?

	No idea; I'd read the OProfile RTC code.

	Regards,

		Michael.

-- 
 mmeeks@gnu.org  <><, Pseudo Engineer, itinerant idiot