summaryrefslogtreecommitdiff
path: root/runtime/app_info.h
AgeCommit message (Collapse)Author
2024-06-05Look for primary APK app image before generating one. Nicolas Geoffray
We used to look if there's any app image, however this can return true when a shared library has an app image. Test: test.py Bug: 330564006 Change-Id: I0aa68edb14491db2fad6ea1d1c1b40d6c28eccff
2024-01-18Add visibility attributes in runtime/a* Dmitrii Ishcheikin
Bug: 260881207 Test: presubmit Test: abtd app_compat_drm Test: abtd app_compat_top_100 Test: abtd app_compat_banking Change-Id: Iacec568941c5baee57088e67ed410ba18f6abff2
2023-02-23When generating a runtime image, load classes from reference profile. Nicolas Geoffray
This makes sure that we generate the best image. Also add a couple of ScopedTrace to profile runtime app image generation. Test: test.py Test: locally start an app, see image containing all classes. Bug: 260557058 Change-Id: I1c2690c54a4c815ac575cada476f48948bd63131
2022-07-18Only madvise primary oat/vdex artifacts Jared Duke
Suppress madvise calls to non-primary vdex/oat files whenever possible. Note that this suppression relies on AppInfo registration happening relatively early in the app lifecycle, which is generally the case. Until the registration is made, we madvise these artifacts as is done with the current behavior. This should avoid cases during app startup where Dynamite-like dependencies (e.g., for GMS Core) currently trigger a full madvise of all dependent vdex/oat files, which is generally unnecessary and potentially wasteful for such cases. Note that this change moves the oat madvise call out of OatFile's constructor into OpenDexFilesFromOat. This makes it easier to reason about ordering relative to other madvise calls (for dex/vdex), but should be almost identical in terms of timing. A/B perf tests shows that this slightly improves app startup time across a suite of apps, with apps that don't load secondary APKs/dex files not being impacted at all. Bug: 235130726 Test: m + flash and verify GMS vdex/oat files not madvised by apps Change-Id: I41374d5ae9f91f39e399ac21615a821307c56b6e
2021-07-01Fix compiler filter / reason reporting and add the ISA to the metrics Calin Juravle
The compiler filter / reason reporting was not accurate for a variety of reasons. (e.g. reporting was only done at startup, it was relying on imprecise APIs and had errors in the logic). In order to keep track of the precise optimization status, this CL introduces the concept of AppInfo, which encapsulates the data about the application / system server code paths, their optimization status and possible other metadata (e.g. profiles). To populate it, we rely on 2 distinct events: 1) The framework calling VMRuntime#registerAppInfo to inform the runtime about the applications code paths and their types (e.g. primary, split, secondary). 2) Class loading, when we can determine the actual optimization status like filters, reasons, and whether or not we can load the odex files. These events may happen in any order so we could deal with a partial state at some point in time, but in the majority of cases they always happen at Class Loading, followed by RegisterAppInfo. This CL also deletes the OatFileManager#getPrimaryOatFile which was a misleading API as it didn't work in most cases. It also adds more tests to the metrics/reporting infra for previous missing or unimplemented cases. Test: gtest Bug: 170149255 Change-Id: If0a7a25d06ff6fb89fe4861139b7dee61c05814d