-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mono] Precompute the CallInfo structure used by the mono_arch_..nati… #88369
Conversation
This speeds up ves_pinvoke_method () in the interpreter, including the icalls which use QCallTypeHandle. |
…ve_call_context_.. functions.
2c05979
to
74f0f53
Compare
if (!call_info) { | ||
call_info = mono_arch_get_interp_native_call_info (get_default_mem_manager (), sig); | ||
mono_memory_barrier (); | ||
*cache = call_info; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use a CAS here to avoid leaks from races
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The memory is allocated from the mem manager, so its going to be leaked anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Also a mono_memory_write_barrier
here is enough.
This speeds up this testcase by about 50% when running with the interpreter:
|
…ve_call_context_.. functions.