-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Casting in a loop may cause long GC pause times #13821
Comments
I think this is blocked on https://github.com/dotnet/coreclr/issues/27186 in a similar way as https://github.com/dotnet/coreclr/issues/27930 is. |
Casts are JIT helper calls. We do not have mechanism to mark JIT helper calls with SuppressGCTransitionAttribute today. We would need to add such mechanism. I believe that the casts should be fixed by adding poll into the cast helpers. Or rewrite the hot path of the cast helpers in C# (like it is done in CoreRT), but that it harder to pull off. |
I think all JIT helpers can be treated as We control everything here. The number of FCALLs is very modest and we can assume/assure they are all well-behaving - either super fast or GC-polling. |
To not be distracted from general problem of FCALLs in a loop, which I think needs exactly the same solution as |
The JIT would call it exactly same as it does today. The VM would return the managed implementation when the JIT it asks for the entrypoint of the JIT helper. |
* Exposed casting cache to managed code * Implemented a managed version of cache lookup * Moved `JIT_IsInstanceOfAny` and `JIT_ChkCastAny` to managed code as the first ones to move. * Skip managed JIT helpers in exception stack traces and debugger * Managed `JIT_IsInstanceOfInterface` * All other cast helpers are managed. Fixes:https://github.com/dotnet/coreclr/issues/27931
Fixed by #1068 |
dotnet/performance#1049 (comment)
The text was updated successfully, but these errors were encountered: