-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Convert all FCalls with HELPER_METHOD_FRAME to QCalls #95695
Comments
This is cool! Is the plan to eventually remove FCall functionality from the runtime? |
Good to see you around here again @hughbe! 😀 |
FCalls with HELPER_METHOD_FRAME. I think FCalls without HELPER_METHOD_FRAME are needed for perf reasons. |
I think we also might be able to move to QCalls with SuppressGCTransition instead of FCalls without HELPER_METHOD_FRAME for the perf critical ones, but that's a bridge to examine and consider crossing once we've removed HELPER_METHOD_FRAME from the situation. |
I agree. It would require modifying rules for how GC tracked pointers are passed to and from P/Invokes and we would need to deal with managed/unmanaged calling convention differences somehow. I think it would be just a cosmetic change at the end. It would not be a significant simplification of the system (compared to getting rid of HELPER_METHOD_FRAMEs). |
FCThrow is implemented usign HELPER_METHOD_FRAME. All uses of FCThrow need to be removed to fix dotnet#95695.
FCThrow is implemented usign HELPER_METHOD_FRAME. All uses of FCThrow need to be removed to fix #95695.
FCThrow is implemented usign HELPER_METHOD_FRAME. All uses of FCThrow need to be removed to fix dotnet#95695.
I believe this was closed unintentionally 😄 In addition, I'd like to see some documentation about the more and more unmanaged-like unsafe code in CoreLib. I'm still learning and trying case by case. |
What would you like to see? The documentation about QCalls and related topics is in https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/botr/corelib.md . |
The existing documentation is about "manual managed" code. Nowadays there are more "manual unmanaged" code in CoreLib, for example, dealing with MethodTable and manipulating GC refs as bytes. |
Feel free to propose documentation update in a PR. The examples do not look unique to CoreLib. MethodTable is an example of an unmanaged resource with lifetime associated with managed object. These situations occur in interop quite frequently. GC.KeepAlive documentation has an example with COM. |
The managed side was deleted in 2017: dotnet/coreclr@ee5862c#diff-f3cc002d15620a31440d8091873e5a2eff9f0223cd11cce621eb1eb1efda52c2 Contributes a little to dotnet#95695
The managed side was deleted in 2017: dotnet/coreclr@ee5862c#diff-f3cc002d15620a31440d8091873e5a2eff9f0223cd11cce621eb1eb1efda52c2 Contributes a little to #95695
This has a similar structure to FailFast as converted in dotnet#98908. Contributes to dotnet#95695
Benefits:
The text was updated successfully, but these errors were encountered: