Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[android] update
.aotprofile
for .NET 9 RC 2 (#25043)
I recorded these with the `35.0.0-rc.2.145` Android workload as there was one change that disables `$(AndroidEnableMarshalMethods)` that impacts `.aotprofile` files: * dotnet/android@afb5f7e With this change in place, managed C# methods like these will reappear in the profile: bool Android.Runtime.AndroidTypeManager:FastRegisterNativeMembers (Java.Interop.JniType,System.Type,System.ReadOnlySpan`1<char>) ... bool Android.Runtime.JNINativeWrapper:Wrap_JniMarshal_PPJ_Z (_JniMarshal_PPJ_Z,intptr,intptr,long) bool Android.Runtime.JNINativeWrapper:Wrap_JniMarshal_PPL_Z (_JniMarshal_PPL_Z,intptr,intptr,intptr) bool Android.Runtime.JNINativeWrapper:Wrap_JniMarshal_PPLLJ_Z (_JniMarshal_PPLLJ_Z,intptr,intptr,intptr,intptr,long) ... System.Delegate Android.App.Activity:GetOnActivityResult_IILandroid_content_Intent_Handler () System.Delegate Android.App.Activity:GetOnBackPressedHandler () In the future, we hope to bring back `$(AndroidEnableMarshalMethods)` once the known issues are worked out. Measuring the new profile on a Pixel 7 Pro, an average of 10 runs of the `dotnet new maui` project template: Before: Average(ms): 475.2 Std Err(ms): 3.96316371938716 Std Dev(ms): 12.5326240934078 After: Average(ms): 447.1 Std Err(ms): 1.75404294892305 Std Dev(ms): 5.54677083235522 So, this change likely avoids some startup regression on Android, as the C# methods that run on startup when `AndroidEnableMarshalMethods=false` are now AOT-compiled. I also added `-bl` to the `README.md`, as I thought that was useful. Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
- Loading branch information