Diagnosing JIT / AOT Timings
- After installing the .apk, open up an
Android Device Monitorto the
Logcattab, or use
- Look for a log under
ActivityManagerthat has the message
Displayed Activity: <timing>
07-28 12:48:38.356: I/ActivityManager(769): Displayed com.myapplication.App1/md58adf3f2592a7497b73592b5e766304c2.MainActivity: +1s990ms
android:debugging="true"in you application or set your
You can also use
adb shell setprop debug.mono.log timing.
# Enable timing messages to be created debug.mono.log=timing
- Take the
methods.txtoff 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. the
Total 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.
Ensuring AOT is working
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"...