diff options
author | 2016-09-20 15:33:31 -0700 | |
---|---|---|
committer | 2016-09-23 15:27:26 -0700 | |
commit | 496577fb4d6d7baea9c093d35d17e208c831bbca (patch) | |
tree | 1da9976883a8fea0dc05a58ec9bbd347b010fc19 /runtime/class_table.h | |
parent | 304533ed8475e9438e6ca7ef5fa644fd5dab5e97 (diff) |
Smarter image layout
Put strings in the dex file that resolves them.
Depth first traversal with overrides for class and dex cache. The
work list keeps track of what oat_index with each pushed item. This
means the static fields of a class will usually be in the same image.
Added layout test to image_test to make sure things are somewhat
reasonably attributed.
Bug: 28640955
Test: test-art-host
(cherry picked from commit 4e9c4e746617bad6a012d799d2f5cf9e01d24ea2)
Change-Id: I67a536c33aeed603b252d8e0f75622c9efbf2559
Diffstat (limited to 'runtime/class_table.h')
-rw-r--r-- | runtime/class_table.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/class_table.h b/runtime/class_table.h index 66c241fb22..8c91806ae2 100644 --- a/runtime/class_table.h +++ b/runtime/class_table.h @@ -163,6 +163,8 @@ class ClassTable { } private: + void InsertWithoutLocks(mirror::Class* klass) NO_THREAD_SAFETY_ANALYSIS; + // Lock to guard inserting and removing. mutable ReaderWriterMutex lock_; // We have a vector to help prevent dirty pages after the zygote forks by calling FreezeSnapshot. @@ -171,6 +173,8 @@ class ClassTable { // loader which may not be owned by the class loader must be held strongly live. Also dex caches // are held live to prevent them being unloading once they have classes in them. std::vector<GcRoot<mirror::Object>> strong_roots_ GUARDED_BY(lock_); + + friend class ImageWriter; // for InsertWithoutLocks. }; } // namespace art |