- After installing the .apk, open up an
Android Device Monitor
to theLogcat
tab, or useadb logcat
- Look for a log under
ActivityManager
that has the messageDisplayed Activity: <timing>
EX:
07-28 12:48:38.356: I/ActivityManager(769): Displayed com.myapplication.App1/md58adf3f2592a7497b73592b5e766304c2.MainActivity: +1s990ms
-
Enable
android:debugging="true"
in you application or set yourConfiguration
toDebug
-
Set the
debug.mono.log
totiming
to generatecounters.txt
andmethods.txt
files
https://developer.xamarin.com/guides/android/advanced_topics/environment/
https://developer.xamarin.com/guides/android/advanced_topics/environment/#debug.mono.log
https://developer.xamarin.com/guides/android/advanced_topics/environment/#Example
You can also use adb shell setprop debug.mono.log timing
.
# Enable timing messages to be created
debug.mono.log=timing
- Take the
counters.txt
andmethods.txt
off the device
adb shell run-as com.myapplication.App1 cat files/.__override__/counters.txt > counters-FullAOT.txt
adb shell run-as com.myapplication.App1 cat files/.__override__/methods.txt > methods-FullAOT.txt
- counters.txt - JIT diagnostics everytime
Runtime.register()
is invoked. Note: Typically you care about how much time is spent JITing. i.e. theTotal time spent JITting (sec)
value. - methods.txt - List of every method that is JIT'd in the order it is JIT'd. Note: Typically you care about how many lines methods.txt has in total. i.e.
1562 lines
In adb logcat
look for the following tag:
AOT: image '<ASSEMBLY NAME>.dll.so' found.
Otherwise you'll see an error similar to:
AOT: image '<ASSEMBLY NAME>.so' not found: dlopen failed: cannot locate symbol "__aeabi_memset" referenced by "/data/app/com.myapplication.App1-1/lib/arm/libaot-<ASSEMBLY NAME>.dll.so"...