diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2016-11-14 12:40:52 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2016-11-14 12:40:52 +0000 |
commit | 3395fbc20bcd20948bec8958db91b304c17cacd8 (patch) | |
tree | e0d00b412961e2aaa0dff91317a9f4168189e5fb /compiler/optimizing/code_generator.cc | |
parent | 75afcdd3503a8a8518e5b23d21b6e73306ce39ce (diff) |
Revert "Revert "Revert "JIT root tables."""
libcore failures:
dalvikvm32 F 11-14 03:04:06 14870 14870 jit_code_cache.cc:310] Check failed: new_string != nullptr
This reverts commit 75afcdd3503a8a8518e5b23d21b6e73306ce39ce.
Change-Id: I5a6b6b48aa79a763d1ff1ba4d85d63811254787d
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r-- | compiler/optimizing/code_generator.cc | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index a5f248dd20..8b450e11dc 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -1375,30 +1375,4 @@ uint32_t CodeGenerator::GetReferenceDisableFlagOffset() const { return klass->GetDisableIntrinsicFlagOffset().Uint32Value(); } -void CodeGenerator::EmitJitRoots(uint8_t* code, - Handle<mirror::ObjectArray<mirror::Object>> roots, - const uint8_t* roots_data, - Handle<mirror::DexCache> outer_dex_cache) { - DCHECK_EQ(static_cast<size_t>(roots->GetLength()), GetNumberOfJitRoots()); - StackHandleScope<1> hs(Thread::Current()); - MutableHandle<mirror::DexCache> h_dex_cache(hs.NewHandle<mirror::DexCache>(nullptr)); - ClassLinker* class_linker = Runtime::Current()->GetClassLinker(); - size_t index = 0; - for (auto& entry : jit_string_roots_) { - const DexFile& entry_dex_file = *entry.first.dex_file; - // Avoid the expensive FindDexCache call by checking if the string is - // in the compiled method's dex file. - h_dex_cache.Assign(IsSameDexFile(*outer_dex_cache->GetDexFile(), entry_dex_file) - ? outer_dex_cache.Get() - : class_linker->FindDexCache(hs.Self(), entry_dex_file)); - mirror::String* string = class_linker->LookupString( - entry_dex_file, entry.first.string_index, h_dex_cache); - DCHECK(string != nullptr) << "JIT roots require strings to have been loaded"; - roots->Set(index, string); - entry.second = index; - ++index; - } - EmitJitRootPatches(code, roots_data); -} - } // namespace art |