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
Remove JIT icall hashing by name and AOT JIT icall hashing. #14644
Conversation
2136e9d
to
7b5b82d
Compare
bb29d30
to
967937b
Compare
@monojenkins build failed |
1 similar comment
@monojenkins build failed |
Windows is failing for lack of cmake buiding BTLS. |
@monojenkins build failed |
@monojenkins build failed |
@monojenkins build failed |
1 similar comment
@monojenkins build failed |
/cc @vargaz |
7763986
to
9e8689b
Compare
@monojenkins build failed |
1 similar comment
@monojenkins build failed |
0609d99
to
4aae294
Compare
@monojenkins build failed |
g_error ("Unknown relocation '%p'\n", ji->data.target); | ||
target = NULL; | ||
target = mono_arch_load_function (ji->data.jit_icall_id); | ||
g_assertf (target, "Unknown relocation '%p'\n", ji->data.target); |
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.
Needs some kind of ifdef or needs to be added for all architectures.
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'm "rewriting" it..
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.
It bugged me to lose the inlining. I think the function was provided for all architectures that support AOT, as well as PowerPC, but anyway, the rewrite is tweaked to handle architectures with no extra functions.
Perhaps I should have removed only one hash table in this PR and left the AOT one asis. I could do that, though still heading toward the same place, if ok.
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.
Another solution is put back the AOT registration, into the struct/array, and just index into that (mono_find_jit_icall)
.
@monojenkins build failed |
1 similar comment
@monojenkins build failed |
@monojenkins build failed |
mono/mini/mini-x86.h
Outdated
@@ -350,5 +350,10 @@ mono_x86_start_gsharedvt_call (GSharedVtCallInfo *info, gpointer *caller, gpoint | |||
CallInfo* | |||
mono_arch_get_call_info (MonoMemPool *mp, MonoMethodSignature *sig); | |||
|
|||
#define MONO_ARCH_AOT_ICALLS \ |
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 previous approach was fine, why do these need to be inlined ?
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.
Just keeping it optimal where easy.
You prefer the per-arch helper function, nested switch instead of one switch?
I can put that back and fill in the other architectures.
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.
Registration is also not terrible, then in the switch just index into the array.
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 prefer the helper function or the registration, this is only run a few times on startup, there is no need to make it optimal.
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'm fine either way. The helper function could also be inline in the .h.
Anything is better than a hashtable imho.
Optimal is also smaller and pays recurring dividends, albeit small ones. (smaller runtime, faster to install, and start, even if the code runs rarely/never)
I think when I first did this I didn't realize the connections, so I had redundantly optimized registration, and then didn't use the registration.
The registration also doesn't need the strings.
Note that I removed the ifdef gsharedvt from the helpers, that was in registration.
It isn't really conditional, as the current system is configured.
c12cc75
to
d4920fc
Compare
Might need the stub in mini-wasm.c. We'll see if CI says. |
@monojenkins build failed |
Yep. |
commits after approval:
|
@monojenkins build failed |
(accidentally put change in wrong PR, undone) |
@monojenkins build failed |
Windows x64 FullAOT crashed and there are no symbols in the stack. |
@monojenkins build failed |
Could use symbolic Windows stacks for the flakes. :( |
This time I did not rename
MONO_PATCH_INFO_JIT_ICALL_ADDR
andMONO_PATCH_INFO_JIT_ICALL_ADDR_NOCALL
.Could go either way.
Could change them in a separate PR.