[Mono-dev] Mono profiler agent for jitted code
jason.yeh at amd.com
Mon Apr 3 09:48:46 EDT 2006
Paolo Molaro wrote:
> The important properties we'd like to see from oprofile are:
> *) handle jitted methods (code stored in non-file-backed memory)
This is what I am working on right now.
> *) not require root privs (at least for a subset of the
> capabilities or with limits designed to reduce the number of
> interrupts per second)
As far as I know, not requiring root privs would be a overhaul to the
Oprofile. I doubt this can be done easily. Can you elaborate on the
limits designed to reduce the number of interrupts per second? The
event count allows users to do that manually. Are you referring to an
automatic throttling or a similar scheme that would reduce the number of
> *) have the counters virtualized per process
> (this may be
> already the case, I haven't looked at oprofile in a long time)
This is still not the case. The number of counters is still limited to
the number of physical counter in the cpu. However, we are
experimenting with event multiplexing, but it will not be part of
Oprofile for a while.
> We have a profiling interface: it is defined in
> What you'd likely want to do is create a profile module (mono
> can load them at runtime) that intercepts JIT compilation.
> The MonoProfileJitResult callback will allow you to get some
> info about a jitted method (like the address and the size in memory).
> The mono/metadata/profiler.c file also contains our sample
> profiler that you might want to look at for ideas on how to implement
> your agent. As for the JIT sources, they are in the mono/mini/
I will browse the Mono source and play around with the profile module.
I hope that even with the limitation I described, the patch would be
More information about the Mono-devel-list