summaryrefslogtreecommitdiff
path: root/runtime/oat_file_assistant.h
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2015-11-09 11:16:49 -0800
committer Mathieu Chartier <mathieuc@google.com> 2016-01-22 15:01:55 -0800
commitf7fd970244f143b1abb956e29794c446e4d57f46 (patch)
treeaac1f57ac70747957f609bb46305dfeca87645a1 /runtime/oat_file_assistant.h
parent95005291d8ebdd1d2ac58ffc5181fef4fbbf2383 (diff)
Load app images
Support in-place patching of the app image based on boot image location and app oat location. Only loads for art run test so far since we do not automatically generate app images for app installs. N5 maps launch time (~200 runs): Before: 930ms After: 878.18ms After + image class table: 864.57ms TODO: Oatdump support. Store class loaders as class roots in image. Bug: 22858531 Change-Id: I9cbc645645e62ea2ed1ad8e139e91af7d88514c1
Diffstat (limited to 'runtime/oat_file_assistant.h')
-rw-r--r--runtime/oat_file_assistant.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/oat_file_assistant.h b/runtime/oat_file_assistant.h
index f781532b14..7b45bca946 100644
--- a/runtime/oat_file_assistant.h
+++ b/runtime/oat_file_assistant.h
@@ -30,6 +30,12 @@
namespace art {
+namespace gc {
+namespace space {
+class ImageSpace;
+} // namespace space
+} // namespace gc
+
// Class for assisting with oat file management.
//
// This class collects common utilities for determining the status of an oat
@@ -163,6 +169,9 @@ class OatFileAssistant {
// the OatFileAssistant object.
std::unique_ptr<OatFile> GetBestOatFile();
+ // Open and returns an image space associated with the oat file.
+ gc::space::ImageSpace* OpenImageSpace(const OatFile* oat_file);
+
// Loads the dex files in the given oat file for the given dex location.
// The oat file should be up to date for the given dex location.
// This loads multiple dex files in the case of multidex.
@@ -214,6 +223,9 @@ class OatFileAssistant {
bool OatFileNeedsRelocation();
bool OatFileIsUpToDate();
+ // Return image file name. Does not cache since it relies on the oat file.
+ std::string ArtFileName(const OatFile* oat_file) const;
+
// These methods return the status for a given opened oat file with respect
// to the dex location.
OatStatus GivenOatFileStatus(const OatFile& file);