Search code examples
memory-leaksmonomonodevelop

How to view mono MLPD files for profiling


I built MonoDevelop using these instructions. I compiled a console application with it and it's running on a Linux machine. I have noticed a memory leak and would like to track it and figure out what is being leaked.

According to these instructions, I must start the application with specific options in mono. At that point, the profilier will dump an MLPD file. I now have that file and would like to view it and see what's going on. I can not find this mprof-report program anywhere.

Has it been depricated? If so, how do we profile mono applications now? There isn't much about it online.

Thank you!


Solution

  • Has it been depricated?

    No, it is a part of the Mono distribution and is a C-based program so it is a "native" binary and located in the "bin" directory along with mono, mono64 pedump, monograph, monodis, etc..

    On MacOS these are located in:

    file `which mprof-report`
    /Library/Frameworks/Mono.framework/Versions/Current/Commands/mprof-report: Mach-O 64-bit executable x86_64
    

    Man page:

    NAME
           mprof-report - report generator for Mono's log profiler
    
    SYNOPSIS
           mprof-report [option]... file.mlpd
    
    DESCRIPTION
           mprof-report  is  the report generator for Mono's log profiler. It reads the MLPD log
           files produced by the log profiler and generates a report based on the options passed
           to  it.  The output is based on individual reports which can be turned on or off.  By
           default, all reports are generated in summary form (i.e., non-verbose output).
    
           mprof-report can read both normal and gzip(1)-compressed log files transparently.
    
           For information about how to use the log profiler with a program, see  the  mono-pro-
           filers(1) page, under the LOG PROFILER section.
            ~~~~~