Navigation

Profiling support

From MonoDevelop

Table of contents

Information

MonoDevelop.Profiling is an add-on that adds profiling support to MonoDevelop. Using this add-on, developers can measure the performance, memory usage, ... of their application.

Installation

The profiler addin now ships together with the MonoDevelop source code (as of 2007-12-20)

* cd <md-source-code>/extras/MonoDevelop.Profiling
* sh autogen.sh --prefix=...
* make
* make install

Or add the line "extras/MonoDevelop.Profiling" to the profile that you use to build MonoDevelop.

Requirements

* An up-to-date svn version (or MonoDevelop 1.0 when it's released)
* HeapShot (http://www.mono-project.com/HeapShot) or HeapBuddy (http://www.mono-project.com/HeapBuddy)
* mono 1.2.3 (lower version could work, but never tested)

Usage

Currently, there are 2 ways how you can use the profiling addin:

Profile a project

  • Load a MonoDevelop solution
  • Go to the "Project" menu
  • Select "Run profiled"
  • Choose on of the profilers
  • Let your application run for a while ...
  • Click on "Take Profiling Snapshot" button in the toolbar of the profiling pad (if this pad isn't visible, go to "View">"Profiling Snapshots"
  • Save the snapshot


Profile a process

  • Start a process with a profiler (eg: mono --profile=heap-shot MyApp.exe)
  • Let your application run for a while ...
  • Go to the "Tools" menu and select "Profile Process"
  • Select a process (only processes that are created with a profiler are shown)
  • Click on "Take Profiling Snapshot" button in the toolbar of the profiling pad (if this pad isn't visible, go to "View">"Profiling Snapshots"
  • Save the snapshot


HeapBuddy remark

HeapBuddy expects that the process exits nicely, when trying to force heap-buddy to create a profiling snapshot, this might result into data loss. So whenever you are using heap-buddy, terminate the application cleanly like you would always do. (don't worry though, MonoDevelop will warn you when needed)

Screenshots

HeapShot profiling results
Enlarge
HeapShot profiling results
HeapBuddy GC and heap history
Enlarge
HeapBuddy GC and heap history
HeapBuddy type information
Enlarge
HeapBuddy type information
HeapBuddy backtraces
Enlarge
HeapBuddy backtraces