[android] build and ship libmono-profiler-aot.so #57511
Closed
+12
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: xamarin/xamarin-android#6171
Fixes: #56989
In order for the Android workload to be able to record
.aotprof
/.aotprofile
files, we needlibmono-profiler-aot.so
to be available. Down the road this feature could be provided by the
Mono diagnostics component, but will probably not happen in .NET 6.
These changes build
libmono-profiler-aot.so
for Android, and includesit in the
Microsoft.NETCore.App.Runtime.Mono.android-*
runtime packs.In the Android workload's MSBuild targets we exclude this native library
unless the app is configured to record an AOT profile.
I also included in
CMakeLists.txt
:Otherwise, the AOT profiler cannot be loaded:
With these changes, I can successfully record an AOT profile on Android:
When using the profile, I get improved startup times: