[MonoDevelop] [PATCH] Profiler support

Lluis Sanchez lluis at ximian.com
Fri Apr 20 11:23:23 EDT 2007


Hi!

Thanks for working on this, having profiling options integrated in MD
will be really useful. The patch looks like a good start, although I
have some comments.

I want to avoid adding more functionality to the add-ins in src/Core.
All add-ins in that directory are the core MD libraries, and I'd like to
keep them stable. I think that profiling support should be completely
implemented in an add-in. The core libraries have all necessary
extension points to make it possible.

I like the idea of implementing some basic infrastructure to be used by
all profilers, but we should avoid adding infrastructure which is not
really generic and useful for all profilers.

It is not always easy to decide which part of the code is MD
infrastructure and which is not. More infrastructure means better
integrated add-ins and less work to implement them. But it also means
more constraints on add-ins and more code that we have to keep stable
and backwards compatible (since it will be part of the MD API).

Regarding application profiling, what all profilers have in common is
that they generate a file with the results of a profiling session. I
think it makes sense to have a shared profiler view which can show the
results of profiling sessions over time. Those results could be shown in
the tree fer every project or solution. Other than that, I don't see
much more that is really generic to all profilers. For example, creating
snapshots is something specific to heap-shot, so I don't think that a
IProfiler.CreateSnapshot() method should be part of the profiling
infrastructure.

In fact, I'm wondering if the IProfiler interface is really needed. MD
already provides the interface IExecutionHandlerFactory, which allows
running a project using a specific "runner", and the IAsyncOperation
interface for controlling the execution session. Looks like it should be
enough.

But as I said, sometimes it is not easy to decide what makes sense to
share and what not. In any case, we should have two add-ins, one with
the common profiling code (MonoDevelop.Profiling sounds more convenient
that MonoDevelop.Profiler to mee), and another with the heap-shot
integration (let's say MonoDevelop.Profiling.HeapShot). We could have a
"Profiling" solution containing those projects and any other profiler
implementation we want to add (just like we do for VersionControl and
Deployment).

Lluis.

El dv 20 de 04 del 2007 a les 15:21 +0200, en/na Ben Motmans va
escriure: 
> hey,
> 
> the last couple of days, i've been working on profiler support in MD
> since the patch is pretty big, i splitted it up in some chunks:
> 
> * profiler_core.diff: ./Core/src/MonoDevelop.Core
> support for profiling execution context
> 
> * profiler_ide.diff: ./Core/src/MonoDevelop.Ide
> support for a Profile workbench context
> 
> * profiler_addin.diff: ./Extras
> the addin itself, currently only support for heap-shot available
> 
> * profile_build.diff: ./
> configure.in changes
> 
> the patch isn't 100% finished yet, but it is currently usable
> so ... please review the patched and let me know if i did something stupid :)
> 
> (you can find a screenshot @ http://tremor.be/browse/md-heap-shot_2.png)
> 
> -- Ben
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list



More information about the Monodevelop-list mailing list