Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 873
ren Avatar asked Jun 08 '13 12:06

ren


2 Answers

I found that I got the same message on Ubuntu because I hadn't installed the mono-profiler package via apt-get.

like image 157
starbeamrainbowlabs Avatar answered Nov 19 '22 11:11

starbeamrainbowlabs


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

like image 32
Mazzu Avatar answered Nov 19 '22 10:11

Mazzu