[Mono-dev] Performance problems on ARM/linux

Martin Fuzzey mfuzzey at parkeon.com
Wed Apr 15 11:30:47 EDT 2009


Robert Jordan wrote:

> It should be possible to import symbols from the main module (mono)
> by applying the "__Internal" special dll name:
>
> [DllImport ("__Internal")]
> static extern ... WaitForSingleObject(...)
>
> So you can get rid of the less tested "--without-static_mono".
>
> Robert
Thank you, I didn't know about that.

Unfortunately it doesn't seem to work.
Using "__Internal" I don't need a mapping in the config file anymore but
it can't find the symbols:

(lenny)mfuzzey at mfuzzey-laptop:~/work/linux/mx21/mono/cs-src$
MONO_LOG_LEVEL="info" MONO_LOG_MASK="dll" mono testsys.exe
Mono-INFO: DllImport attempting to load: '__Internal'.
Mono-INFO: Searching for 'CreateEvent'.
Mono-INFO: Probing 'CreateEvent'.
Mono-INFO: Probing 'CreateEvent'.
Mono-INFO: Probing 'CreateEventA'.
Mono-INFO: Probing 'CreateEventA'.
Mono-INFO: DllImport attempting to load: '__Internal'.
Mono-INFO: Searching for 'GetCurrentThread'.
Mono-INFO: Probing 'GetCurrentThread'.
Mono-INFO: Probing 'GetCurrentThread'.
Mono-INFO: Probing 'GetCurrentThreadA'.
Mono-INFO: Probing 'GetCurrentThreadA'.
Started
Mono-INFO: DllImport attempting to load: '__Internal'.
Mono-INFO: Searching for 'CreateEvent'.
Mono-INFO: Probing 'CreateEvent'.
Mono-INFO: Probing 'CreateEvent'.
Mono-INFO: Probing 'CreateEventA'.
Mono-INFO: Probing 'CreateEventA'.

Unhandled Exception: System.EntryPointNotFoundException: CreateEvent
  at (wrapper managed-to-native) Test:CreateEventDLL
(intptr,bool,bool,string)
  at Test.go () [0x00000]
  at Test.Main () [0x00000]


Looking at the code I think its because mono is doing a dlopen(NULL)
then dlsym()

However objdump shows that the symbols CreateEvent etc are not dynamic
(they are listed with -t rather than -T)

I get the same behaviour with both a x86 and an arm build.

Martin






More information about the Mono-devel-list mailing list