[Mono-devel-list] mono_get_lmf_addr in tramp-x86.c

Paolo Molaro lupus at ximian.com
Mon May 24 04:56:31 EDT 2004


On 05/23/04 Ben Maurer wrote:
> I just noticed we call mono_get_lmf_addr in the code generated for
> tramps. However, if we have HAVE_KW_THREAD, not only is this slower, but

What makes you think the generic trampoline code has any impact on
execution speed?

> I think it is incorrect.

Great! Now you can go read the code (mono_arch_setup_jit_tls_data).
The change we need to do in this area are:
*) replace the use of Tls* with __thread vars, both in the jit and
elsewhere
*) when the above is not possible (on systems without __thread support)
add a function to the io layer to get the pthread_key_t corresponding to
the Tls id so that pthread_getspecific can be used (on MacOSX this will
enable us to save the call and inline the code directly).

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list