[Mono-dev] System.Threading.Monitor::Exit fails in latest trees
Martin Däumler
mdae at cs.tu-chemnitz.de
Tue May 3 10:04:10 EDT 2011
Hy.
On 03.05.11 15:45, Zoltan Varga wrote:
> Q1: Besides the monitor enter/exit trampolines, there
> are other trampoline types which might not end up
> in a C-function (and use, for example, optimized code
> instead)?
>
>
> All trampolines are hand written assembly code, but most of them has an
> associated C function which they call or which they can fall back to.
Okay, what exactly means "most of them"?
All JIT, JUMP, IMT/VTable and Delegate trampolines ultimately
end up in "mono_magic_trampoline()", don't they?
As discussed in this thread, monitor enter/exit trampolines
might be run through a fast path that does not end up in their
associated C-functions "mono_monitor_enter_trampoline()" and
"mono_monitor_exit_trampoline()" in mini-trampolines.c.
The unbox trampoline has no associated C-function, as far as
I can see.
Does the class init trampoline always call
"mono_class_runtime_trampoline()"?
I don't care about the other trampoline types, so far.
> Q2: Do unbox trampolines do any kind of patching, i.e.,
> modifying native code? As I understood, unbox trampolines
> are only needed when a method of a value type is going to
> be called but the instance of the value is boxed (e.g., casted
> to object in C#). And unbox trampolines are only handled/
> inserted by the magic trampoline. Do I understand it correct?
>
>
> They don't do patching.
Okay, thanks.
With kind regards,
Martin Däumler
More information about the Mono-devel-list
mailing list