diff options
author | 2016-09-21 13:51:10 +0100 | |
---|---|---|
committer | 2016-09-29 15:58:43 +0100 | |
commit | 63dccbbefef3014c99c22748d18befcc7bcb3b41 (patch) | |
tree | 60a498041bebff43bc1f43d438e3bc34a30887f7 /runtime/mirror/dex_cache-inl.h | |
parent | 6bee25976782a063d6b44f7718a6302761bf6403 (diff) |
Store resolved Strings for AOT code in .bss.
And do some related refactorings.
Bug: 20323084
Bug: 30627598
Test: Run ART test suite including gcstress on host and Nexus 9.
Test: Run ART test suite including gcstress with baker CC on host and Nexus 9.
Test: Build aosp_mips64-eng.
Change-Id: I1b12c1570fee8e5da490b47f231050142afcbd1e
Diffstat (limited to 'runtime/mirror/dex_cache-inl.h')
-rw-r--r-- | runtime/mirror/dex_cache-inl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/mirror/dex_cache-inl.h b/runtime/mirror/dex_cache-inl.h index 220979a152..30bf390d38 100644 --- a/runtime/mirror/dex_cache-inl.h +++ b/runtime/mirror/dex_cache-inl.h @@ -25,6 +25,7 @@ #include "base/enums.h" #include "base/logging.h" #include "mirror/class.h" +#include "oat_file.h" #include "runtime.h" #include <atomic> @@ -167,6 +168,11 @@ inline void DexCache::VisitReferences(mirror::Class* klass, const Visitor& visit for (size_t i = 0, num_types = NumResolvedTypes(); i != num_types; ++i) { visitor.VisitRootIfNonNull(resolved_types[i].AddressWithoutBarrier()); } + if (GetDexFile() != nullptr && GetDexFile()->GetOatDexFile() != nullptr) { + for (GcRoot<Object>& root : OatFile::GetBssRoots(GetDexFile()->GetOatDexFile())) { + visitor.VisitRootIfNonNull(root.AddressWithoutBarrier()); + } + } } } |