Expose the optimization status of a dex file

Add a method which exposes the optimization status of a dex file based on
its expected runtime behaviour. The method returns the status in an array
[compilation filter, compilation reason].

The method will try to mimic the runtime effect of loading the dex file.
For example, if there is no usable oat file, the compiler filter will be
set to "run-from-apk".

This will enable more accurate performance monitoring of apks.

Test: oat_file_assistant_test
Bug: 73102540
Change-Id: Ida9abef502dcb3fd07e1b0988771fb60e9b2a423
6 files changed