diff options
author | 2017-01-16 15:50:46 +0000 | |
---|---|---|
committer | 2017-01-16 15:50:47 +0000 | |
commit | 5e01df491f371cdafd5c348511c373b527329a01 (patch) | |
tree | 22573d6cd092b9a7246ae12d8c83f9dc2f228400 /runtime/class_linker.h | |
parent | d9a9d44ae018826a380b62cdc09d536f8ce30208 (diff) | |
parent | 1998cd02603197f2acdc0734397a6d48b2f59b80 (diff) |
Merge changes I168f24de,I8ec60a98,I3c426ed7,Ic809b0f3
* changes:
Implement HLoadClass/kBssEntry for boot image.
Store resolved types for AOT code in .bss.
Make runtime call on main for HLoadClass/kDexCacheViaMethod.
Remove HLoadClass::LoadKind::kDexCachePcRelative.
Diffstat (limited to 'runtime/class_linker.h')
-rw-r--r-- | runtime/class_linker.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/runtime/class_linker.h b/runtime/class_linker.h index 77322ede08..580acb7068 100644 --- a/runtime/class_linker.h +++ b/runtime/class_linker.h @@ -64,6 +64,7 @@ class ImtConflictTable; template<typename T> class LengthPrefixedArray; template<class T> class MutableHandle; class InternTable; +class OatFile; template<class T> class ObjectLock; class Runtime; class ScopedObjectAccessAlreadyRunnable; @@ -535,6 +536,12 @@ class ClassLinker { REQUIRES(!Locks::classlinker_classes_lock_) REQUIRES_SHARED(Locks::mutator_lock_); + // Add an oat file with .bss GC roots to be visited again at the end of GC + // for collector types that need it. + void WriteBarrierForBootOatFileBssRoots(const OatFile* oat_file) + REQUIRES(!Locks::classlinker_classes_lock_) + REQUIRES_SHARED(Locks::mutator_lock_); + mirror::ObjectArray<mirror::Class>* GetClassRoots() REQUIRES_SHARED(Locks::mutator_lock_) { mirror::ObjectArray<mirror::Class>* class_roots = class_roots_.Read(); DCHECK(class_roots != nullptr); @@ -1138,6 +1145,10 @@ class ClassLinker { // New class roots, only used by CMS since the GC needs to mark these in the pause. std::vector<GcRoot<mirror::Class>> new_class_roots_ GUARDED_BY(Locks::classlinker_classes_lock_); + // Boot image oat files with new .bss GC roots to be visited in the pause by CMS. + std::vector<const OatFile*> new_bss_roots_boot_oat_files_ + GUARDED_BY(Locks::classlinker_classes_lock_); + // Number of times we've searched dex caches for a class. After a certain number of misses we move // the classes into the class_table_ to avoid dex cache based searches. Atomic<uint32_t> failed_dex_cache_class_lookups_; @@ -1155,7 +1166,7 @@ class ClassLinker { size_t find_array_class_cache_next_victim_; bool init_done_; - bool log_new_class_table_roots_ GUARDED_BY(Locks::classlinker_classes_lock_); + bool log_new_roots_ GUARDED_BY(Locks::classlinker_classes_lock_); InternTable* intern_table_; |