[Mono-dev] Profiling / Memory Management tools

Dan Liew dan at su-root.co.uk
Sun May 31 17:29:46 UTC 2015

On 31 May 2015 at 17:35, Greg Young <gregoryyoung1 at gmail.com> wrote:
> What tools are people using with mono? I have tried as an example
> using valgrind to verify the stuff I am working on is reasonable but
> the listings of problems that come out are massive.

Checking the memory usage via valgrind will be pretty useless to you
unless you know the mono internals. If you do want to continue down
that route look at [1].

You're more likely to be interested in memory use at the level of your
C#/F# code. To do this I've used mono's built-in memory profiling [2],

$ mono --profile=log:heapshot my_program.exe

You can specify how frequently shots of the heap are taken. You can
view the result using mprof or heapshot [3].

[1] http://www.mono-project.com/docs/debug+profile/debug/#using-valgrind-on-mono
[2] http://www.mono-project.com/docs/debug+profile/profile/profiler/#profiler-option-documentation
[3] https://github.com/mono/heap-shot

More information about the Mono-devel-list mailing list