Lines Matching refs:dex_data
398 const DexFileData& dex_data = *dex_data_ptr; in Save() local
399 uint32_t methods_region_size = GetMethodsRegionSize(dex_data); in Save()
401 dex_data.profile_key.size() + in Save()
402 sizeof(uint16_t) * dex_data.class_set.size() + in Save()
404 dex_data.bitmap_storage.size(); in Save()
407 sizeof(uint16_t) * dex_data.class_set.size() + in Save()
437 const DexFileData& dex_data = *dex_data_ptr; in Save() local
439 if (dex_data.profile_key.size() >= kMaxDexFileKeyLength) { in Save()
444 uint32_t methods_region_size = GetMethodsRegionSize(dex_data); in Save()
446 DCHECK_LE(dex_data.profile_key.size(), std::numeric_limits<uint16_t>::max()); in Save()
447 DCHECK_LE(dex_data.class_set.size(), std::numeric_limits<uint16_t>::max()); in Save()
449 AddUintToBuffer(&buffer, static_cast<uint16_t>(dex_data.profile_key.size())); in Save()
450 AddUintToBuffer(&buffer, static_cast<uint16_t>(dex_data.class_set.size())); in Save()
452 AddUintToBuffer(&buffer, dex_data.checksum); // uint32_t in Save()
453 AddUintToBuffer(&buffer, dex_data.num_method_ids); // uint32_t in Save()
455 AddStringToBuffer(&buffer, dex_data.profile_key); in Save()
459 const DexFileData& dex_data = *dex_data_ptr; in Save() local
465 for (const auto& method_it : dex_data.method_map) { in Save()
476 for (const auto& class_id : dex_data.class_set) { in Save()
486 dex_data.bitmap_storage.begin(), in Save()
487 dex_data.bitmap_storage.end()); in Save()
490 AddUintToBuffer(&buffer, static_cast<uint16_t>(dex_data.class_set.size())); in Save()
491 for (const auto& class_id : dex_data.class_set) { in Save()
493 AddUintToBuffer(&buffer, dex_data.class_counters[type_idx]); in Save()
495 AddUintToBuffer(&buffer, dex_data.GetNumMethodCounters()); in Save()
496 for (uint16_t method_idx = 0; method_idx < dex_data.num_method_ids; method_idx++) { in Save()
497 if (dex_data.GetHotnessInfo(method_idx).IsInProfile()) { in Save()
498 AddUintToBuffer(&buffer, dex_data.method_counters[method_idx]); in Save()
592 uint32_t ProfileCompilationInfo::GetMethodsRegionSize(const DexFileData& dex_data) { in GetMethodsRegionSize() argument
594 uint32_t size = 2 * sizeof(uint16_t) * dex_data.method_map.size(); in GetMethodsRegionSize()
595 for (const auto& method_it : dex_data.method_map) { in GetMethodsRegionSize()
1138 DexFileData& dex_data, in ReadAggregationCounters() argument
1142 (dex_data.class_set.size() + dex_data.method_map.size() + 2); in ReadAggregationCounters()
1150 if (num_class_counters != dex_data.class_set.size()) { in ReadAggregationCounters()
1154 for (const auto& class_it : dex_data.class_set) { in ReadAggregationCounters()
1155 READ_UINT(uint16_t, buffer, dex_data.class_counters[class_it.index_], error); in ReadAggregationCounters()
1160 if (num_method_counters != dex_data.GetNumMethodCounters()) { in ReadAggregationCounters()
1164 for (uint16_t method_idx = 0; method_idx < dex_data.num_method_ids; method_idx++) { in ReadAggregationCounters()
1165 if (dex_data.GetHotnessInfo(method_idx).IsInProfile()) { in ReadAggregationCounters()
1166 READ_UINT(uint16_t, buffer, dex_data.method_counters[method_idx], error); in ReadAggregationCounters()
1194 for (const DexFileData* dex_data : info_) { in VerifyProfileData() local
1195 const auto it = key_to_dex_file.find(dex_data->profile_key); in VerifyProfileData()
1202 if (!ChecksumMatch(dex_data->checksum, dex_file->GetLocationChecksum())) { in VerifyProfileData()
1206 << dex_data->checksum; in VerifyProfileData()
1210 if (dex_data->num_method_ids != dex_file->NumMethodIds()) { in VerifyProfileData()
1214 << dex_data->num_method_ids; in VerifyProfileData()
1219 for (const auto& method_it : dex_data->method_map) { in VerifyProfileData()
1269 for (const auto& class_id : dex_data->class_set) { in VerifyProfileData()
1515 const DexFileData* dex_data = FindDexData(other_profile_line_header.dex_location, in RemapProfileIndex() local
1518 if ((dex_data != nullptr) && (dex_data->checksum != other_profile_line_header.checksum)) { in RemapProfileIndex()
1529 const DexFileData* dex_data = GetOrAddDexFileData(profile_line_headers[i].dex_location, in RemapProfileIndex() local
1532 if (dex_data == nullptr) { in RemapProfileIndex()
1535 dex_profile_index_remap->Put(i, dex_data->profile_index); in RemapProfileIndex()
1603 const DexFileData* dex_data = FindDexData(other_dex_data->profile_key, in MergeWith() local
1606 if ((dex_data != nullptr) && (dex_data->checksum != other_dex_data->checksum)) { in MergeWith()
1625 const DexFileData* dex_data = GetOrAddDexFileData(other_dex_data->profile_key, in MergeWith() local
1628 if (dex_data == nullptr) { in MergeWith()
1631 dex_profile_index_remap.Put(other_dex_data->profile_index, dex_data->profile_index); in MergeWith()
1636 DexFileData* dex_data = const_cast<DexFileData*>(FindDexData(other_dex_data->profile_key, in MergeWith() local
1638 DCHECK(dex_data != nullptr); in MergeWith()
1648 : (dex_data->ContainsClass(type_idx) ? 1 : 0); in MergeWith()
1650 dex_data->class_counters[type_idx.index_] = in MergeWith()
1651 IncrementAggregationCounter(dex_data->class_counters[type_idx.index_], amount); in MergeWith()
1660 : (dex_data->GetHotnessInfo(method_idx).IsInProfile() ? 1 : 0); in MergeWith()
1661 dex_data->method_counters[method_idx] = in MergeWith()
1662 IncrementAggregationCounter(dex_data->method_counters[method_idx], amount); in MergeWith()
1669 dex_data->class_set.insert(other_dex_data->class_set.begin(), in MergeWith()
1676 InlineCacheMap* inline_cache = dex_data->FindOrAddMethod(other_method_index); in MergeWith()
1699 dex_data->MergeBitmap(*other_dex_data); in MergeWith()
1719 const DexFileData* dex_data = FindDexData(method_ref.dex_file); in GetMethodHotness() local
1720 return dex_data != nullptr in GetMethodHotness()
1721 ? dex_data->GetHotnessInfo(method_ref.index) in GetMethodHotness()
1727 DexFileData* dex_data = GetOrAddDexFileData(method_ref.dex_file); in AddMethodHotness() local
1728 if (dex_data != nullptr) { in AddMethodHotness()
1730 return dex_data->AddMethod( in AddMethodHotness()
1740 const DexFileData* dex_data = FindDexData(GetProfileDexFileKey(dex_location), dex_checksum); in GetMethodHotness() local
1741 return dex_data != nullptr ? dex_data->GetHotnessInfo(dex_method_index) : MethodHotness(); in GetMethodHotness()
1758 for (const DexFileData* dex_data : info_) { in GetMethod() local
1759 pmi->dex_references[dex_data->profile_index].dex_location = dex_data->profile_key; in GetMethod()
1760 pmi->dex_references[dex_data->profile_index].dex_checksum = dex_data->checksum; in GetMethod()
1761 pmi->dex_references[dex_data->profile_index].num_method_ids = dex_data->num_method_ids; in GetMethod()
1769 const DexFileData* dex_data = FindDexData(&dex_file); in ContainsClass() local
1770 return (dex_data != nullptr) && dex_data->ContainsClass(type_idx); in ContainsClass()
1775 for (const DexFileData* dex_data : info_) { in GetNumberOfMethods() local
1776 total += dex_data->method_map.size(); in GetNumberOfMethods()
1783 for (const DexFileData* dex_data : info_) { in GetNumberOfResolvedClasses() local
1784 total += dex_data->class_set.size(); in GetNumberOfResolvedClasses()
1800 for (const DexFileData* dex_data : info_) { in DumpInfo() local
1803 os << dex_data->profile_key; in DumpInfo()
1806 std::string multidex_suffix = DexFileLoader::GetMultiDexSuffix(dex_data->profile_key); in DumpInfo()
1809 os << " [index=" << static_cast<uint32_t>(dex_data->profile_index) << "]"; in DumpInfo()
1810 os << " [checksum=" << std::hex << dex_data->checksum << "]" << std::dec; in DumpInfo()
1813 if (dex_data->profile_key == current->GetLocation() && in DumpInfo()
1814 dex_data->checksum == current->GetLocationChecksum()) { in DumpInfo()
1819 for (const auto& method_it : dex_data->method_map) { in DumpInfo()
1846 for (uint32_t method_idx = 0; method_idx < dex_data->num_method_ids; ++method_idx) { in DumpInfo()
1847 MethodHotness hotness_info(dex_data->GetHotnessInfo(method_idx)); in DumpInfo()
1862 for (const auto class_it : dex_data->class_set) { in DumpInfo()
1880 const DexFileData* dex_data = FindDexData(&dex_file); in GetClassesAndMethods() local
1881 if (dex_data == nullptr) { in GetClassesAndMethods()
1884 for (const auto& it : dex_data->method_map) { in GetClassesAndMethods()
1887 for (uint32_t method_idx = 0; method_idx < dex_data->num_method_ids; ++method_idx) { in GetClassesAndMethods()
1888 MethodHotness hotness = dex_data->GetHotnessInfo(method_idx); in GetClassesAndMethods()
1896 for (const dex::TypeIndex& type_index : dex_data->class_set) { in GetClassesAndMethods()
1912 const DexFileData& dex_data = *info_[i]; in Equals() local
1914 if (!(dex_data == other_dex_data)) { in Equals()
1931 for (const DexFileData* dex_data : info_) { in GetResolvedClasses() local
1932 const auto it = key_to_dex_file.find(dex_data->profile_key); in GetResolvedClasses()
1936 if (dex_data->checksum != it->second->GetLocationChecksum()) { in GetResolvedClasses()
1939 << ", profile checksum=" << dex_data->checksum; in GetResolvedClasses()
1944 dex_data->checksum, in GetResolvedClasses()
1945 dex_data->num_method_ids); in GetResolvedClasses()
1946 classes.AddClasses(dex_data->class_set.begin(), dex_data->class_set.end()); in GetResolvedClasses()
2179 const DexFileData* dex_data = FindDexData(method_ref.dex_file); in GetMethodAggregationCounter() local
2180 return dex_data == nullptr ? -1 : dex_data->GetMethodAggregationCounter(method_ref.index); in GetMethodAggregationCounter()
2185 const DexFileData* dex_data = FindDexData(type_ref.dex_file); in GetClassAggregationCounter() local
2186 return dex_data == nullptr ? -1 : dex_data->GetClassAggregationCounter(type_ref.index); in GetClassAggregationCounter()
2255 for (DexFileData* dex_data : info_) { in UpdateProfileKeys()
2256 if (dex_data->checksum == dex_file->GetLocationChecksum() in UpdateProfileKeys()
2257 && dex_data->num_method_ids == dex_file->NumMethodIds()) { in UpdateProfileKeys()
2259 if (dex_data->profile_key != new_profile_key) { in UpdateProfileKeys()
2266 profile_key_map_.erase(dex_data->profile_key); in UpdateProfileKeys()
2267 profile_key_map_.Put(new_profile_key, dex_data->profile_index); in UpdateProfileKeys()
2268 dex_data->profile_key = new_profile_key; in UpdateProfileKeys()
2296 for (DexFileData* dex_data : info_) { in PrepareForAggregationCounters()
2297 dex_data->PrepareForAggregationCounters(); in PrepareForAggregationCounters()