Description
Description
This issue is made for tracking necessary work for enabling runtime logging for CoreCLR on Android.
Logging
Currently, most of the messages logged by the runtime end up in /dev/null
(either because they
are disabled in release build or because they log to stdio which doesn't work on Android).
Logcat is the only way to get information from remote devices, especially via Google Play Console.
We should log to logcat:
- C++ exception messages
- abort() messages / fatal errors
- warnings
- errors
A subsystem should be added which will provide a single function that will do actual output, implementation of which
will be specific to the platform. API should allow specification of severity, the actual message, and possibly a flag
to indicate whether the process should be aborted (the decision might also be based on the severity). Severity should
be shared between all targets, which then can (if needed) translate it to the target platform's value(s), if any.
Tasks
- Enable JIT logging: [android][coreclr] Make coreclr build specify
HOST_ANDROID
and include Android logging APIs #112677, Initial CoreClr Android logcat log integration. #113416 - Fatal error logging: [Android] Add callback to host-runtime contract for getting assembly data #112705, Initial CoreClr Android logcat log integration. #113416
- Enable runtime logging: Initial CoreClr Android logcat log integration. #113416, Adjust additional source under utilcode and vm to use minipal_log API. #113916
- Figure out how to enable stress log on Android.
- Investigate runtime crash dumps on Android, implement custom version of PROCCreateCrashDumpIfEnabled for Android.
- Android platform unwinder can't unwind through managed frames. Investigate possibility to register minimal unwind info for managed frames making sure Android platform unwinder can produce complete stack traces in bug reports.
- Consolidate native logging in minipal: Initial CoreClr Android logcat log integration. #113416