Mono Tools

by Miguel de Icaza

Joe correctly points out that a major sore point in Mono development today is the lack of a functional debugger. The lack of this tool is duly noted. All we can say at this point is that progress is happening in this area.

Joe, you might want to look into using Mono's profiler in statistical mode instead of using it on the default instrumentation mode. This is described on the man page, but here is a shorthand:

	$ mono --profile=default:stat app.exe

In statistical mode, the program is interrupted a number of times per second and the information about the current routine being executed is gathered. This technique has a much lower overhead that tracking every entry and every exit from a routine.

For instance, bootstrapping the C# mono compiler with or without statistic profiling takes the same amount of time to run (2.5 seconds on my thinkpad t42p) while using the default settings for the Mono profiler takes four minutes and 21 seconds.

In addition on Linux with rtc support it is possible to set the sample rate anywhere between 64 and 8192 samples per second by setting the MONO_RTC environment variable (more details are on the manual page).

Other tools that Mono developers should get familiarized with is the tracing facility which lets developers peak at the program execution. The tracing facility has improved in the last few months and its worth taking a look at some of its new features.

Posted on 27 Jul 2005