Skip to content
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][aot] Use an mrgctx for all gshared methods on iOS #86583

Merged
merged 1 commit into from
May 24, 2023

Conversation

kotlarmilos
Copy link
Member

@kotlarmilos kotlarmilos commented May 22, 2023

This PR enables the use of the MonoMethodRuntimeGenericContext structure for all gshared methods, eliminating the need for generating rgctx fetch trampolines. Preliminary size saving on HelloiOS app is approximately 160kb or -0.646% in release LLVM mode.

HelloiOS .app Baseline (main branch) Target (this branch)
HelloiOS 20393904 20186936
Info.plist 982 982
PkgInfo 8 8
Program.aotdata 5888 5952
Program.deps.json 12781 12781
Program.dll 6144 6144
Program.runtimeconfig.json 1064 1064
System.Console.aotdata 2976 3032
System.Console.dll 17408 17408
System.Private.CoreLib.aotdata 679712 703584
System.Private.CoreLib.dll 1158144 1158144
aot-instances.aotdata 531200 554824
icudt.dat 1859648 1859648

Considering potential speed implications of such a change, I suggest merging this PR after the Preview 5 snap.

Fixes #82906

@kotlarmilos kotlarmilos added NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) area-Codegen-AOT-mono os-ios Apple iOS size-reduction Issues impacting final app size primary for size sensitive workloads labels May 22, 2023
@kotlarmilos kotlarmilos added this to the 8.0.0 milestone May 22, 2023
@kotlarmilos kotlarmilos requested a review from SamMonoRT May 22, 2023 13:29
@kotlarmilos kotlarmilos requested a review from vargaz as a code owner May 22, 2023 13:29
@kotlarmilos kotlarmilos self-assigned this May 22, 2023
@kotlarmilos kotlarmilos requested a review from lambdageek as a code owner May 22, 2023 13:29
@ghost
Copy link

ghost commented May 22, 2023

Tagging subscribers to 'os-ios': @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

Issue Details

This PR enables the use of the MonoMethodRuntimeGenericContext structure for all gshared methods, eliminating the need for generating rgctx fetch trampolines. Preliminary size saving on HelloiOS app is approximately 2kb or -0.646% release LLVM mode.

HelloiOS .app Baseline (main branch) Target (this branch)
HelloiOS 20393904 20186936
Info.plist 982 982
PkgInfo 8 8
Program.aotdata 5888 5952
Program.deps.json 12781 12781
Program.dll 6144 6144
Program.runtimeconfig.json 1064 1064
System.Console.aotdata 2976 3032
System.Console.dll 17408 17408
System.Private.CoreLib.aotdata 679712 703584
System.Private.CoreLib.dll 1158144 1158144
aot-instances.aotdata 531200 554824
icudt.dat 1859648 1859648

Considering potential speed implications of such a change, I suggest merging this PR after the Preview 5 snap.

Fixes #82906

Author: kotlarmilos
Assignees: kotlarmilos
Labels:

NO-MERGE, area-Codegen-AOT-mono, os-ios, size-reduction

Milestone: 8.0.0

@kotlarmilos kotlarmilos removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label May 24, 2023
@kotlarmilos kotlarmilos merged commit 7c3a572 into dotnet:main May 24, 2023
@kotlarmilos kotlarmilos deleted the feature/use-mrgctx-ios branch May 24, 2023 14:52
@ghost ghost locked as resolved and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Codegen-AOT-mono os-ios Apple iOS size-reduction Issues impacting final app size primary for size sensitive workloads
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[mono][aot] Avoid generating rgctx fetch trampolines in generic sharing
2 participants