diff options
| author | 2015-11-09 11:16:49 -0800 | |
|---|---|---|
| committer | 2016-01-22 15:01:55 -0800 | |
| commit | f7fd970244f143b1abb956e29794c446e4d57f46 (patch) | |
| tree | aac1f57ac70747957f609bb46305dfeca87645a1 /runtime/class_table.h | |
| parent | 95005291d8ebdd1d2ac58ffc5181fef4fbbf2383 (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/class_table.h')
| -rw-r--r-- | runtime/class_table.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/class_table.h b/runtime/class_table.h index 911f3c22db..0b420352c3 100644 --- a/runtime/class_table.h +++ b/runtime/class_table.h @@ -84,9 +84,14 @@ class ClassTable { bool Visit(ClassVisitor* visitor) SHARED_REQUIRES(Locks::classlinker_classes_lock_, Locks::mutator_lock_); + // Return the first class that matches the descriptor. Returns null if there are none. mirror::Class* Lookup(const char* descriptor, size_t hash) SHARED_REQUIRES(Locks::classlinker_classes_lock_, Locks::mutator_lock_); + // Return the first class that matches the descriptor of klass. Returns null if there are none. + mirror::Class* LookupByDescriptor(mirror::Class* klass) + SHARED_REQUIRES(Locks::classlinker_classes_lock_, Locks::mutator_lock_); + void Insert(mirror::Class* klass) REQUIRES(Locks::classlinker_classes_lock_) SHARED_REQUIRES(Locks::mutator_lock_); @@ -107,10 +112,17 @@ class ClassTable { // Combines all of the tables into one class set. size_t WriteToMemory(uint8_t* ptr) const SHARED_REQUIRES(Locks::classlinker_classes_lock_, Locks::mutator_lock_); + + // Read a table from ptr and put it at the front of the class set. size_t ReadFromMemory(uint8_t* ptr) REQUIRES(Locks::classlinker_classes_lock_) SHARED_REQUIRES(Locks::mutator_lock_); + // Change the class loader of all the contained classes. + void SetClassLoader(mirror::ClassLoader* class_loader) + REQUIRES(Locks::classlinker_classes_lock_) + SHARED_REQUIRES(Locks::mutator_lock_); + private: class ClassDescriptorHashEquals { public: |