Lines Matching refs:patch
77 mirror::ArtMethod* ElfPatcher::GetTargetMethod(const CompilerDriver::CallPatchInformation* patch) { in GetTargetMethod() argument
81 hs.NewHandle(class_linker->FindDexCache(*patch->GetTargetDexFile()))); in GetTargetMethod()
82 mirror::ArtMethod* method = class_linker->ResolveMethod(*patch->GetTargetDexFile(), in GetTargetMethod()
83 patch->GetTargetMethodIdx(), in GetTargetMethod()
87 patch->GetTargetInvokeType()); in GetTargetMethod()
89 << patch->GetTargetDexFile()->GetLocation() << " " << patch->GetTargetMethodIdx(); in GetTargetMethod()
91 << patch->GetTargetDexFile()->GetLocation() << " " << patch->GetTargetMethodIdx(); in GetTargetMethod()
92 CHECK(dex_cache->GetResolvedMethods()->Get(patch->GetTargetMethodIdx()) == method) in GetTargetMethod()
93 << patch->GetTargetDexFile()->GetLocation() << " " << patch->GetReferrerMethodIdx() << " " in GetTargetMethod()
94 << PrettyMethod(dex_cache->GetResolvedMethods()->Get(patch->GetTargetMethodIdx())) << " " in GetTargetMethod()
99 mirror::Class* ElfPatcher::GetTargetType(const CompilerDriver::TypePatchInformation* patch) { in GetTargetType() argument
102 Handle<mirror::DexCache> dex_cache(hs.NewHandle(class_linker->FindDexCache(patch->GetDexFile()))); in GetTargetType()
103 mirror::Class* klass = class_linker->ResolveType(patch->GetDexFile(), patch->GetTargetTypeIdx(), in GetTargetType()
106 << patch->GetDexFile().GetLocation() << " " << patch->GetTargetTypeIdx(); in GetTargetType()
107 CHECK(dex_cache->GetResolvedTypes()->Get(patch->GetTargetTypeIdx()) == klass) in GetTargetType()
108 << patch->GetDexFile().GetLocation() << " " << patch->GetReferrerMethodIdx() << " " in GetTargetType()
109 << PrettyClass(dex_cache->GetResolvedTypes()->Get(patch->GetTargetTypeIdx())) << " " in GetTargetType()
132 void ElfPatcher::SetPatchLocation(const CompilerDriver::PatchInformation* patch, uint32_t value) { in SetPatchLocation() argument
134 const void* quick_oat_code = class_linker->GetQuickOatCodeFor(patch->GetDexFile(), in SetPatchLocation()
135 patch->GetReferrerClassDefIdx(), in SetPatchLocation()
136 patch->GetReferrerMethodIdx()); in SetPatchLocation()
139 uintptr_t patch_ptr = reinterpret_cast<uintptr_t>(base + patch->GetLiteralOffset()); in SetPatchLocation()
142 if (patch->IsCall()) { in SetPatchLocation()
143 const CompilerDriver::CallPatchInformation* cpatch = patch->AsCall(); in SetPatchLocation()
153 if (patch->IsType()) { in SetPatchLocation()
154 const CompilerDriver::TypePatchInformation* tpatch = patch->AsType(); in SetPatchLocation()
167 if (patch->IsCall() && patch->AsCall()->IsRelative()) { in SetPatchLocation()
195 const CompilerDriver::CallPatchInformation* patch = code_to_patch[i]; in PatchElf() local
197 mirror::ArtMethod* target = GetTargetMethod(patch); in PatchElf()
201 class_linker->FindOpenedOatDexFileForDexFile(*patch->GetTargetDexFile())->GetOatFile(); in PatchElf()
218 if (patch->IsRelative()) { in PatchElf()
221 class_linker->GetQuickOatCodeFor(patch->GetDexFile(), in PatchElf()
222 patch->GetReferrerClassDefIdx(), in PatchElf()
223 patch->GetReferrerMethodIdx()); in PatchElf()
234 uintptr_t patch_location = base + patch->GetLiteralOffset(); in PatchElf()
235 value = quick_code - patch_location + patch->RelativeOffset(); in PatchElf()
241 SetPatchLocation(patch, value); in PatchElf()
246 const CompilerDriver::CallPatchInformation* patch = methods_to_patch[i]; in PatchElf() local
247 mirror::ArtMethod* target = GetTargetMethod(patch); in PatchElf()
248 SetPatchLocation(patch, PointerToLowMemUInt32(get_image_address_(cb_data_, target))); in PatchElf()
254 const CompilerDriver::TypePatchInformation* patch = classes_to_patch[i]; in PatchElf() local
255 mirror::Class* target = GetTargetType(patch); in PatchElf()
256 SetPatchLocation(patch, PointerToLowMemUInt32(get_image_address_(cb_data_, target))); in PatchElf()