diff options
author | 2016-06-04 00:22:32 +0000 | |
---|---|---|
committer | 2016-06-04 00:22:32 +0000 | |
commit | f102faf1bcbdb2149e3e7bf27b1819f621b7894b (patch) | |
tree | d3e9d667bc7d746a0800e95d4ce78918718a9636 /runtime/class_table.h | |
parent | d6d49e56c2b7b11f474acb80cb02bb1fe9b7861e (diff) |
Revert "Hold dex caches live in class table"
This reverts commit d6d49e56c2b7b11f474acb80cb02bb1fe9b7861e.
Bug: 29083330
Change-Id: Ie209b27897b8079f2d13fd0837fe5f83a7e61afc
Diffstat (limited to 'runtime/class_table.h')
-rw-r--r-- | runtime/class_table.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/runtime/class_table.h b/runtime/class_table.h index 854a85e816..686381d35c 100644 --- a/runtime/class_table.h +++ b/runtime/class_table.h @@ -133,8 +133,8 @@ class ClassTable { REQUIRES(!lock_) SHARED_REQUIRES(Locks::mutator_lock_); - // Return true if we inserted the strong root, false if it already exists. - bool InsertStrongRoot(mirror::Object* obj) + // Return true if we inserted the dex file, false if it already exists. + bool InsertDexFile(mirror::Object* dex_file) REQUIRES(!lock_) SHARED_REQUIRES(Locks::mutator_lock_); @@ -162,10 +162,9 @@ class ClassTable { mutable ReaderWriterMutex lock_; // We have a vector to help prevent dirty pages after the zygote forks by calling FreezeSnapshot. std::vector<ClassSet> classes_ GUARDED_BY(lock_); - // Extra strong roots that can be either dex files or dex caches. Dex files used by the class - // 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_); + // Dex files used by the class loader which may not be owned by the class loader. We keep these + // live so that we do not have issues closing any of the dex files. + std::vector<GcRoot<mirror::Object>> dex_files_ GUARDED_BY(lock_); }; } // namespace art |