[Mono-dev] Experiments with mono profiling

Paolo Molaro lupus at ximian.com
Thu Feb 1 13:30:21 EST 2007


On 01/31/07 Muath A. Khalaf wrote:
> I am trying to implement some profiling techniques and test them as
> part of a small research. They are mainly a sampling based profiling for
> the runtime stack and some profiling for the mono garbage collector. I
> have downloaded mono 1.2, compiled it and it is running now. I wish
> if somebody points me to a starting point in the code and if there is
> any documentation for mono internals that would help me in completing
> this project.

There is already support for a sampling profiler in the JIT: the
profiling interface is defined in metadata/profiler.h.
metadata/profiler.c contains a sample compiler which covers most needs
and which you might want to check out. Adding support for walking a few
stack frames would be nice: you should be able to do it using the
context argument of the MonoProfileStatFunc callback (the type of
context depends on the operating system and architecture, it is
typically a struct sigcontext or struct ucontext pointer).
You may also want to google for heap-prof and heap-shot for sample
allocation profilers.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list