CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 09:25:53 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/dotnet/android.git
etag: W/"0e149e3420a381553ac05d5df3f04c83"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=w72J7yYS%2BMzczoHms1Q%2F0fMfBoFCOQfk%2F33Fw0qS1m%2FisyTuAl5kTGcPUC1iLgw1Y98mgbJaOZsOuRYLtnaWKw4N6%2B4dEUy7bFvVX%2B3Q%2FxB%2FbthSiuKQVU8uWsIGBm2fWFE0v5blonTnfZpycJ0SGFpHLzFvTaBHAnrHoKYCFhDbsvJ99m0HD9%2F3H7WR53abnFRZ03UMYPR5ib3jwaOUNxWlgXfV5PXWSdGO1k9VnweePzvhVc9Mw73lHcujDzDO2roK3ehTbMA5Ql0F6ryz4A%3D%3D--oqWBUjf2TLGPtYUh--xPWZeI5ymHZwjn%2BGQNURjg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1558626038.1753608352; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 09:25:52 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 09:25:52 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 9794:0A61:322B3D:43AB8A:6885F0A0
[One .NET] Support consuming AOT profiles (#6171) · dotnet/android@3e699d6 · GitHub
Copy file name to clipboardExpand all lines: build-tools/create-packs/Microsoft.Android.Sdk.proj
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.Aot.targets
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Xamarin.Android.Application.targets
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
Copy file name to clipboard
Copy file name to clipboardExpand all lines: src/monodroid/jni/monodroid-glue.cc
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 555
Commit 3e699d6
[One .NET] Support consuming AOT profiles (#6171)
Fixes: #6053
Context: https://github.com/jonathanpeppers/android-profiled-aot
This enables the ability to set:
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<RunAOTCompilation>true</RunAOTCompilation>
<AndroidEnableProfiledAot>true</AndroidEnableProfiledAot>
</PropertyGroup>
Add a default `dotnet.aotprofile` which will be passed to the
`<MonoAOTCompiler/>` MSBuild task.
There will not be a way to "record" profiles in the Android workload
in .NET 6. This is because it relies on legacy Mono infrastructure
that is not implemented in .NET 6.
I created a Github repo for recording profiles, where I committed the
necessary binaries such as `aprofutil` and `libmono-profiler-aot.so`:
* https://github.com/jonathanpeppers/android-profiled-aot
I recorded a `dotnet.aotprofile` with the contents:
Modules:
6799590C-2963-4835-AEDC-20C67D875132 System.Private.CoreLib
2CC403AF-60DC-48A9-9B69-FF254277AEA0 Mono.Android
92FF7068-2EA9-4681-B340-44E91077417A Java.Interop
008C0F24-5014-4D41-AAB9-DDFCEA59E171 Xamarin.Google.Android.Material
7CEE6098-BE9F-4043-B35A-B8B0684EF0CB Xamarin.AndroidX.AppCompat
20D1FBB8-829A-4618-8E82-8047C8827EA8 Xamarin.AndroidX.Fragment
CC363D7A-9CDB-4999-9E10-279412B14A1B Xamarin.AndroidX.Activity
21CF52B7-0256-4838-848C-DA026B2F1789 Xamarin.AndroidX.Core
D1DE5607-BC27-45FC-93EC-0542C787E5FF Xamarin.AndroidX.DrawerLayout
Summary:
Modules: 9
Types: 229
Methods: 1,010
`AndroidApp1` is the `Navigation Drawer App` template from "legacy"
Xamarin.Android. I ported this template to .NET 6 and dropped usage
of Xamarin.Essentials. I thought this was a good target for a default
profile, because of its heavy usage of AndroidX and Google Material.
In a future PR, I will add a default AOT profile for .NET MAUI to be
shipped inside the `maui` workload.
~~ Results ~~
All tests:
1. Were running on a [Google Pixel 5][0], and
2. Enabled two architectures, arm64 and x86, and
3. **JIT time** was average of 10 runs with `-c Release`, no AOT
4. **AOT time** was average of 10 runs with `-c Release
-p:RunAOTCompilation=true`, with the`Activity: Displayed` time
5. **Profiled AOT time** was average of 10 runs with `-c Release
-p:RunAOTCompilation=true -p:AndroidEnableProfiledAot=true` with
the `Activity: Displayed` time.
| | [AndroidApp1][1] | [MauiApp1][2] |
| ----------------------------------: | ------------------: | ----------------: |
| JIT startup time (s) | 00:00.4387 | 00:01.4205 |
| AOT startup time (vs. JIT) | 00:00.3317 ( 76%) | 00:00.7285 ( 51%) |
| Profiled AOT startup time (vs. JIT) | 00:00.3093 ( 71%) | 00:00.7098 ( 50%) |
| JIT `.apk` size (B) | 9,155,954 | 17,435,225 |
| AOT `.apk` size (vs. JIT) | 12,755,672 (139%) | 44,751,651 (257%) |
| Profiled AOT `.apk` size (vs. JIT) | 9,777,880 (107%) | 23,210,787 (133%) |
[0]: store.google.com/us/product/pixel_5_specs?hl=en-US
[1]: jonathanpeppers/android-profiled-aot@e48c6df/AndroidApp1
[2]: jonathanpeppers/android-profiled-aot@e48c6df/MauiApp1
Co-authored-by: Marek Habersack <grendel@twistedcode.net>1 parent 8fa383d commit 3e699d6Copy full SHA for 3e699d6
File tree
Expand file treeCollapse file tree
6 files changed
+56
-4
lines changedFilter options
- build-tools/create-packs
- src
- Xamarin.Android.Build.Tasks
- Microsoft.Android.Sdk/targets
- monodroid/jni
Expand file treeCollapse file tree
6 files changed
+56
-4
lines changedbuild-tools/create-packs/Microsoft.Android.Sdk.proj
Copy file name to clipboardExpand all lines: build-tools/create-packs/Microsoft.Android.Sdk.proj+1Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
| 79 | + | |
79 | 80 |
| |
80 | 81 |
| |
81 | 82 |
| |
|
src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.Aot.targets
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.Aot.targets+2Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
| 72 | + | |
72 | 73 |
| |
73 | 74 |
| |
74 | 75 |
| |
75 | 76 |
| |
76 | 77 |
| |
| 78 | + | |
77 | 79 |
| |
78 | 80 |
| |
79 | 81 |
| |
|
src/Xamarin.Android.Build.Tasks/Xamarin.Android.Application.targets
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Xamarin.Android.Application.targets+2-2Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
| 51 | + | |
52 | 52 |
| |
53 |
| - | |
| 53 | + | |
54 | 54 |
| |
55 | 55 |
|
src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets+5Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
727 | 727 |
| |
728 | 728 |
| |
729 | 729 |
| |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
730 | 735 |
| |
731 | 736 |
| |
732 | 737 |
| |
|
src/Xamarin.Android.Build.Tasks/dotnet.aotprofile
Copy file name to clipboard80.3 KB
Binary file not shown.
src/monodroid/jni/monodroid-glue.cc
Copy file name to clipboardExpand all lines: src/monodroid/jni/monodroid-glue.cc+46-2Lines changed: 46 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1582 | 1582 |
| |
1583 | 1583 |
| |
1584 | 1584 |
| |
1585 |
| - | |
1586 |
| - | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
1587 | 1631 |
| |
1588 | 1632 |
| |
1589 | 1633 |
| |
|
You can’t perform that action at this time.
0 commit comments