Bug 42933 - Make AOT diagnostic messages less scary
Summary: Make AOT diagnostic messages less scary
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
Depends on:
Reported: 2016-07-29 19:52 UTC by Mikayla Hutchinson [MSFT]
Modified: 2016-09-05 19:41 UTC (History)
6 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description Mikayla Hutchinson [MSFT] 2016-07-29 19:52:02 UTC
The messaging about failing to load AOT images looks like an error, and as a result users are disabling fast deploy:


Th message is currently:

   AOT module 'mscorlib.dll.so' not found: dlopen failed: library "/data/app/<your app name>.Droid-1/lib/x86/libaot-mscorlib.dll.so" not found

It should be changed to something less scary like:

    Using JIT for 'mscorlib.dll' as AOT module '/data/app/<your app name>.Droid-1/lib/x86/libaot-mscorlib.dll.so' was not found.

Or, even better, suppress these messages entirely when building without AOT as they have no value in that case.
Comment 2 Rodrigo Kumpera 2016-08-01 17:37:08 UTC
We won't be fixing the error message, customers will keep panic'ng over more subtle messages.

How about we disable the probing when AOT was not requested? This even has the nice side effect of actually speeding up startup.

Jonp, to disable AOT probing, XA needs to pass -O=-aot as one of the runtime arguments.

Would that be something you guys can do for C9?
Comment 3 Jonathan Pryor 2016-08-01 19:18:05 UTC
> Would that be something you guys can do for C9?

Yes, if I can figure out how to do that. :-)

Can `mono_jit_parse_options()` be invoked multiple times, and would that be the appropriate API for passing `-O=-aot`?
Comment 4 Alex Rønne Petersen 2016-08-29 08:26:00 UTC
@Jonathan: XA already does invoke it in several places. It should be fine. It supports the `-O` flag as well.

Note You need to log in before you can comment on or make changes to this bug.