Search code examples
monoprofilingprofiler

Mono profiler "The 'log' profiler wasn't found in the main executable nor could it be loaded from 'mono-profiler-log'."


I have an app on windows which runs on mono pretty fine. However when I try to profile it:

mono --profile=log program.exe

I get:

The 'log' profiler wasn't found in the main executable nor could it be loaded from 'mono-profiler-log'.

and no data file is created (but the app runs fine). Mono 3.0.10

Any ideas?


Solution

  • Try to set your dynamic library path.

    This works on OSX: LD_LIBRARY_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib mono --profile=log:calls program.exe

    In case of OpenSUSE :

    You need to use a third party profiler for which you must pass the name of the profiler to Mono, like this:

    mono --profile=custom program.exe 
    

    As per above Mono will load the user defined profiler from the shared library ‘mono-profiler-custom.so’.

    This profiler module must be on your dynamic linker library path. A list of other third party profilers is available from Mono’s web site (www.mono-project.com/Performance_Tips).

    Custom profiles are written as shared libraries. The shared library must be called ‘mono-profiler-NAME.so’ where ‘NAME’ is the name of your profiler