Skip to content

[Mono] Split QCall table declarations from their implementations #57639

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

Open
lambdageek opened this issue Aug 18, 2021 · 4 comments
Open

[Mono] Split QCall table declarations from their implementations #57639

lambdageek opened this issue Aug 18, 2021 · 4 comments

Comments

@lambdageek
Copy link
Member

For icalls, Mono can optionally be compiled wihout the big icall table in icall-def-netcore.h. Instead, the icall table is defined by a special IL Linker step based on the icalls that are actually reachable from managed code.

This allows the native linker to tree-shake the native code and remove unused icalls. (Otherwise every icall looks like it is referenced from the big native function pointer array that is defined based on the contents of icall-def-netcore).

As we migrate to using QCalls more, we should enhance that infrastructure to also allow the qcall tables to be created based on use, too.

@ghost
Copy link

ghost commented Aug 18, 2021

Tagging subscribers to this area: @directhex
See info in area-owners.md if you want to be subscribed.

Issue Details

For icalls, Mono can optionally be compiled wihout the big icall table in icall-def-netcore.h. Instead, the icall table is defined by a special IL Linker step based on the icalls that are actually reachable from managed code.

This allows the native linker to tree-shake the native code and remove unused icalls. (Otherwise every icall looks like it is referenced from the big native function pointer array that is defined based on the contents of icall-def-netcore).

As we migrate to using QCalls more, we should enhance that infrastructure to also allow the qcall tables to be created based on use, too.

Author: lambdageek
Assignees: -
Labels:

area-Infrastructure-mono

Milestone: 7.0.0

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Aug 18, 2021
@lambdageek
Copy link
Member Author

An example of adding a new qcall to mono is #57610

@jeffschwMSFT jeffschwMSFT removed the untriaged New issue has not been triaged by the area owner label Aug 18, 2021
@steveisok
Copy link
Member

@lambdageek Do you think this can be completed in the 7 timeframe?

@lambdageek
Copy link
Member Author

I don't think so. We also didn't migrate very many icalls to qcalls in 7, so there's not much impact from doing this in the next release

@lambdageek lambdageek modified the milestones: 7.0.0, 8.0.0 Jul 25, 2022
@steveisok steveisok modified the milestones: 8.0.0, Future Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants