Lines Matching refs:dex1

43     dex1 = BuildDex("location1", /*location_checksum=*/ 1, "LUnique1;", /*num_method_ids=*/ 101);  in SetUp()
80 std::vector<TypeReference> types = {TypeReference(dex1, dex::TypeIndex(0))}; in GetTestInlineCaches()
86 TypeReference(dex1, dex::TypeIndex(0)), in GetTestInlineCaches()
96 TypeReference(dex1, dex::TypeIndex(0)), in GetTestInlineCaches()
97 TypeReference(dex1, dex::TypeIndex(1)), in GetTestInlineCaches()
98 TypeReference(dex1, dex::TypeIndex(2)), in GetTestInlineCaches()
99 TypeReference(dex1, dex::TypeIndex(3)), in GetTestInlineCaches()
100 TypeReference(dex1, dex::TypeIndex(4))}; in GetTestInlineCaches()
116 TypeReference type_ref(dex1, dex::TypeIndex(k++)); in MakeMegamorphic()
139 ASSERT_TRUE(AddMethod(&saved_info, dex1, /*method_idx=*/ i)); in TestProfileLoadFromZip()
239 const DexFile* dex1; member in art::ProfileCompilationInfoTest
257 uint32_t num_type_ids1 = dex1->NumTypeIds(); in TEST_F()
259 ASSERT_TRUE(info.AddClass(*dex1, dex::TypeIndex(type_index))); in TEST_F()
264 ASSERT_TRUE(info.AddClass(*dex1, descriptor)); in TEST_F()
268 ASSERT_FALSE(info.AddClass(*dex1, "LCannotAddThis;")); in TEST_F()
292 ASSERT_TRUE(AddMethod(&saved_info, dex1, /*method_idx=*/ i)); in TEST_F()
305 ASSERT_TRUE(AddMethod(&saved_info, dex1, /*method_idx=*/ i)); in TEST_F()
323 ASSERT_TRUE(AddMethod(&info, dex1, /*method_idx=*/ 1)); in TEST_F()
332 ASSERT_TRUE(AddMethod(&info1, dex1, /*method_idx=*/ 1)); in TEST_F()
345 ASSERT_TRUE(AddMethod(&info1, dex1, /*method_idx=*/ 1)); in TEST_F()
500 ASSERT_TRUE(AddMethod(&saved_info, dex1, /*method_idx=*/ i)); in TEST_F()
528 ASSERT_TRUE(AddMethod(&saved_info, dex1, method_idx, inline_caches)); in TEST_F()
543 GetMethod(loaded_info, dex1, /*method_idx=*/ 3); in TEST_F()
545 ASSERT_TRUE(EqualInlineCaches(inline_caches, dex1, loaded_hotness1, loaded_info)); in TEST_F()
558 ASSERT_TRUE(AddMethod(&saved_info, dex1, method_idx, inline_caches)); in TEST_F()
570 ASSERT_TRUE(AddMethod(&saved_info_extra, dex1, method_idx, inline_caches_extra)); in TEST_F()
587 GetMethod(loaded_info, dex1, /*method_idx=*/ 3); in TEST_F()
590 ASSERT_TRUE(EqualInlineCaches(inline_caches_extra, dex1, loaded_hotness1, loaded_info)); in TEST_F()
599 ASSERT_TRUE(AddMethod(&saved_info, dex1, method_idx, inline_caches)); in TEST_F()
611 ASSERT_TRUE(AddMethod(&saved_info_extra, dex1, method_idx, inline_caches)); in TEST_F()
619 ASSERT_TRUE(AddMethod(&saved_info_extra, dex1, method_idx, missing_types)); in TEST_F()
636 GetMethod(loaded_info, dex1, /*method_idx=*/ 3); in TEST_F()
638 ASSERT_TRUE(EqualInlineCaches(missing_types, dex1, loaded_hotness1, loaded_info)); in TEST_F()
652 ASSERT_TRUE(AddMethod(&info, dex1, /*method_idx=*/ 0, inline_caches1)); in TEST_F()
664 const dex::TypeId* dex1_tid = dex1->FindTypeId(kDex1Class); in TEST_F()
666 dex::TypeIndex dex1_tidx = dex1->GetIndexForTypeId(*dex1_tid); in TEST_F()
670 std::vector<TypeReference> types = {TypeReference(dex1, dex1_tidx)}; in TEST_F()
704 TypeReference(dex1, dex::TypeIndex(0)), in TEST_F()
713 TypeReference(dex1, dex::TypeIndex(0))}; in TEST_F()
719 ASSERT_TRUE(AddMethod(&info, dex1, method_idx, inline_caches)); in TEST_F()
725 ASSERT_TRUE(AddMethod(&info_reindexed, dex1, method_idx, inline_caches_reindexed)); in TEST_F()
734 ProfileCompilationInfo::MethodHotness loaded_hotness1 = GetMethod(info, dex1, method_idx); in TEST_F()
736 ASSERT_TRUE(EqualInlineCaches(inline_caches, dex1, loaded_hotness1, info)); in TEST_F()
773 TypeReference(dex1, dex::TypeIndex(0)), in TEST_F()
774 TypeReference(dex1, dex::TypeIndex(1)), in TEST_F()
775 TypeReference(dex1, dex::TypeIndex(2)), in TEST_F()
776 TypeReference(dex1, dex::TypeIndex(3)), in TEST_F()
777 TypeReference(dex1, dex::TypeIndex(4))}; in TEST_F()
781 ASSERT_TRUE(AddMethod(&info_megamorphic, dex1, 0, inline_caches)); in TEST_F()
785 ASSERT_TRUE(AddMethod(&info_no_inline_cache, dex1, 0)); in TEST_F()
801 ASSERT_TRUE(AddMethod(&info_missing_types, dex1, /*method_idx=*/ 0, inline_caches)); in TEST_F()
805 ASSERT_TRUE(AddMethod(&info_no_inline_cache, dex1, /*method_idx=*/ 0)); in TEST_F()
816 AddMethod(&test_info, dex1, 1, Hotness::kFlagStartup); in TEST_F()
817 AddMethod(&test_info, dex1, 5, Hotness::kFlagPostStartup); in TEST_F()
820 auto run_test = [&dex1 = dex1, &dex2 = dex2](const ProfileCompilationInfo& info) { in TEST_F()
821 EXPECT_FALSE(info.GetMethodHotness(MethodReference(dex1, 2)).IsInProfile()); in TEST_F()
822 EXPECT_FALSE(info.GetMethodHotness(MethodReference(dex1, 4)).IsInProfile()); in TEST_F()
823 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, 1)).IsStartup()); in TEST_F()
824 EXPECT_FALSE(info.GetMethodHotness(MethodReference(dex1, 3)).IsStartup()); in TEST_F()
825 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, 5)).IsPostStartup()); in TEST_F()
826 EXPECT_FALSE(info.GetMethodHotness(MethodReference(dex1, 6)).IsStartup()); in TEST_F()
843 EXPECT_FALSE(test_info.GetMethodHotness(MethodReference(dex1, 11)).IsStartup()); in TEST_F()
846 AddMethod(&merge_info, dex1, 11, Hotness::kFlagStartup); in TEST_F()
849 EXPECT_TRUE(test_info.GetMethodHotness(MethodReference(dex1, 11)).IsStartup()); in TEST_F()
955 AddMethod(&info, dex1, /*method_idx=*/ 0); in TEST_F()
983 AddMethod(&info, dex1, /*method_idx=*/ 0, Hotness::kFlagHot, annotation); in TEST_F()
1006 dex_files.push_back(std::unique_ptr<const DexFile>(dex1)); in TEST_F()
1010 AddMethod(&info, dex1, /*method_idx=*/0); in TEST_F()
1038 AddMethod(&info, dex1, /*method_idx=*/0); in TEST_F()
1088 AddMethod(&info, dex1, /*method_idx=*/ 0); in TEST_F()
1113 ASSERT_TRUE(AddMethod(&saved_info, dex1, method_idx, inline_caches)); in TEST_F()
1127 [&dex1 = dex1, &dex3 = dex3](const std::string& dex_location, uint32_t checksum) -> bool { in TEST_F()
1128 return (dex_location == dex1->GetLocation() && checksum == dex1->GetLocationChecksum()) in TEST_F()
1148 GetMethod(loaded_info, dex1, method_idx); in TEST_F()
1155 ASSERT_TRUE(EqualInlineCaches(inline_caches, dex1, loaded_hotness1, loaded_info)); in TEST_F()
1168 ASSERT_TRUE(AddMethod(&saved_info, dex1, method_idx, inline_caches)); in TEST_F()
1199 ASSERT_TRUE(AddMethod(&saved_info, dex1, method_idx, inline_caches)); in TEST_F()
1220 GetMethod(loaded_info, dex1, method_idx); in TEST_F()
1222 ASSERT_TRUE(EqualInlineCaches(inline_caches, dex1, loaded_hotness1, loaded_info)); in TEST_F()
1283 ASSERT_TRUE(AddMethod(&info, dex1, /*method_idx=*/ i)); in TEST_F()
1293 ASSERT_TRUE(AddMethod(&info, dex1, /*method_idx=*/ i)); in TEST_F()
1335 AddMethod(&info, dex1, index, static_cast<Hotness::Flag>(1 << index)); in TEST_F()
1338 auto run_test = [&dex1 = dex1](const ProfileCompilationInfo& info) { in TEST_F()
1340 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, index)).IsInProfile()); in TEST_F()
1341 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, index)) in TEST_F()
1343 << info.GetMethodHotness(MethodReference(dex1, index)).GetFlags(); in TEST_F()
1364 AddMethod(&info, dex1, 0, static_cast<Hotness::Flag>(1 << index)); in TEST_F()
1367 auto run_test = [&dex1 = dex1](const ProfileCompilationInfo& info) { in TEST_F()
1369 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, 0)).IsInProfile()); in TEST_F()
1370 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, 0)) in TEST_F()
1394 AddMethod(&info1, dex1, 0, static_cast<Hotness::Flag>(1 << index)); in TEST_F()
1395 AddMethod(&info2, dex1, 1, static_cast<Hotness::Flag>(1 << index)); in TEST_F()
1402 AddMethod(&info2, dex1, 1, static_cast<Hotness::Flag>(1 << index)); in TEST_F()
1407 auto run_test = [&dex1 = dex1](const ProfileCompilationInfo& info) { in TEST_F()
1410 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, 0)).IsInProfile()); in TEST_F()
1411 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, 0)) in TEST_F()
1414 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, 1)).IsInProfile()); in TEST_F()
1415 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, 1)) in TEST_F()
1423 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, 0)).IsInProfile()); in TEST_F()
1424 EXPECT_FALSE(info.GetMethodHotness(MethodReference(dex1, 0)) in TEST_F()
1427 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, 1)).IsInProfile()); in TEST_F()
1428 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, 1)) in TEST_F()
1436 EXPECT_FALSE(info.GetMethodHotness(MethodReference(dex1, 0)) in TEST_F()
1438 EXPECT_FALSE(info.GetMethodHotness(MethodReference(dex1, 1)) in TEST_F()
1496 MethodReference hot(dex1, 0); in TEST_F()
1497 MethodReference startup(dex1, 2); in TEST_F()
1513 ProfileCompilationInfo::MethodHotness hot_hotness = GetMethod(info, dex1, hot.index); in TEST_F()
1519 ASSERT_FALSE(GetMethod(info, dex1, startup.index).IsHot()); in TEST_F()
1526 MethodReference hot(dex1, 0); in TEST_F()
1527 MethodReference bad_ref(dex1, kMaxMethodIds); in TEST_F()
1541 ASSERT_TRUE(AddMethod(&info, dex1, /*method_idx=*/ i, Hotness::kFlagHot, psa1)); in TEST_F()
1544 ASSERT_TRUE(AddMethod(&info, dex1, /*method_idx=*/ i, Hotness::kFlagHot, psa2)); in TEST_F()
1547 auto run_test = [&dex1 = dex1, &psa1 = psa1, &psa2 = psa2](const ProfileCompilationInfo& info) { in TEST_F()
1550 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, i), psa1).IsInProfile()); in TEST_F()
1551 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, i), psa1).IsHot()); in TEST_F()
1554 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, i), psa2).IsInProfile()); in TEST_F()
1555 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, i), psa2).IsHot()); in TEST_F()
1559 EXPECT_FALSE(info.GetMethodHotness(MethodReference(dex1, i), psa1).IsInProfile()); in TEST_F()
1560 EXPECT_FALSE(info.GetMethodHotness(MethodReference(dex1, i), psa1).IsHot()); in TEST_F()
1563 EXPECT_FALSE(info.GetMethodHotness(MethodReference(dex1, i), psa2).IsInProfile()); in TEST_F()
1564 EXPECT_FALSE(info.GetMethodHotness(MethodReference(dex1, i), psa2).IsHot()); in TEST_F()
1568 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, i)).IsInProfile()); in TEST_F()
1569 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, i)).IsHot()); in TEST_F()
1573 EXPECT_FALSE(info.GetMethodHotness(MethodReference(dex1, i)).IsInProfile()); in TEST_F()
1574 EXPECT_FALSE(info.GetMethodHotness(MethodReference(dex1, i)).IsHot()); in TEST_F()
1578 MethodReference ref(dex1, 0); in TEST_F()
1608 ASSERT_TRUE(AddClass(&info, dex1, dex::TypeIndex(i), psa1)); in TEST_F()
1611 ASSERT_TRUE(AddClass(&info, dex1, dex::TypeIndex(i), psa2)); in TEST_F()
1614 auto run_test = [&dex1 = dex1, &psa1 = psa1, &psa2 = psa2](const ProfileCompilationInfo& info) { in TEST_F()
1617 EXPECT_TRUE(info.ContainsClass(*dex1, dex::TypeIndex(i), psa1)); in TEST_F()
1620 EXPECT_TRUE(info.ContainsClass(*dex1, dex::TypeIndex(i), psa2)); in TEST_F()
1624 EXPECT_FALSE(info.ContainsClass(*dex1, dex::TypeIndex(i), psa1)); in TEST_F()
1627 EXPECT_FALSE(info.ContainsClass(*dex1, dex::TypeIndex(i), psa2)); in TEST_F()
1631 EXPECT_TRUE(info.ContainsClass(*dex1, dex::TypeIndex(i))); in TEST_F()
1635 EXPECT_FALSE(info.ContainsClass(*dex1, dex::TypeIndex(i))); in TEST_F()
1639 EXPECT_FALSE(info.ContainsClass(*dex1, dex::TypeIndex(0), ProfileSampleAnnotation("new_test"))); in TEST_F()
1667 ASSERT_TRUE(AddMethod(&info1, dex1, /*method_idx=*/ i, Hotness::kFlagHot, psa1)); in TEST_F()
1668 ASSERT_TRUE(AddClass(&info1, dex1, dex::TypeIndex(i), psa1)); in TEST_F()
1671 ASSERT_TRUE(AddMethod(&info2, dex1, /*method_idx=*/ i, Hotness::kFlagHot, psa1)); in TEST_F()
1672 ASSERT_TRUE(AddMethod(&info2, dex1, /*method_idx=*/ i, Hotness::kFlagHot, psa2)); in TEST_F()
1674 ASSERT_TRUE(AddClass(&info2, dex1, dex::TypeIndex(i), psa1)); in TEST_F()
1675 ASSERT_TRUE(AddClass(&info2, dex1, dex::TypeIndex(i), psa2)); in TEST_F()
1684 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, i), psa1).IsInProfile()); in TEST_F()
1685 EXPECT_TRUE(info.ContainsClass(*dex1, dex::TypeIndex(i), psa1)); in TEST_F()
1688 EXPECT_TRUE(info.GetMethodHotness(MethodReference(dex1, i), psa2).IsInProfile()); in TEST_F()
1690 EXPECT_TRUE(info.ContainsClass(*dex1, dex::TypeIndex(i), psa2)); in TEST_F()
1695 EXPECT_FALSE(info.GetMethodHotness(MethodReference(dex1, i), psa2).IsInProfile()); in TEST_F()
1697 EXPECT_FALSE(info.ContainsClass(*dex1, dex::TypeIndex(i), psa2)); in TEST_F()
1707 std::vector<TypeReference> dex1_type_12 { TypeReference(dex1, dex::TypeIndex(1)), in TEST_F()
1708 TypeReference(dex1, dex::TypeIndex(2)) }; in TEST_F()
1709 std::vector<TypeReference> dex1_type_48 { TypeReference(dex1, dex::TypeIndex(4)), in TEST_F()
1710 TypeReference(dex1, dex::TypeIndex(8)) }; in TEST_F()
1733 ASSERT_TRUE(AddMethod(&info1, dex1, /*method_idx=*/ i, ic1, psa1)); in TEST_F()
1734 ASSERT_TRUE(AddClass(&info1, dex1, dex::TypeIndex(i), psa1)); in TEST_F()
1736 ASSERT_TRUE(AddMethod(&info2, dex1, /*method_idx=*/ i, ic2, psa1)); in TEST_F()
1737 ASSERT_TRUE(AddClass(&info2, dex1, dex::TypeIndex(i), psa1)); in TEST_F()
1747 EXPECT_TRUE(info_12.GetMethodHotness(MethodReference(dex1, i), psa1).IsInProfile()); in TEST_F()
1748 EXPECT_TRUE(info_12.ContainsClass(*dex1, dex::TypeIndex(i), psa1)); in TEST_F()
1750 GetMethod(info_12, dex1, /*method_idx=*/ i); in TEST_F()
1771 EXPECT_TRUE(EqualInlineCaches(expected, dex1, loaded_ic_12, info_12)) << i; in TEST_F()
1788 ASSERT_TRUE(AddMethod(&info, dex1, /*method_idx=*/ i, Hotness::kFlagHot, psa1)); in TEST_F()
1789 ASSERT_TRUE(AddClass(&info, dex1, dex::TypeIndex(i), psa1)); in TEST_F()
1794 ASSERT_TRUE(AddMethod(&info, dex1, /*method_idx=*/ i, Hotness::kFlagHot, psa2)); in TEST_F()
1795 ASSERT_TRUE(AddMethod(&info, dex1, /*method_idx=*/ i, Hotness::kFlagStartup, psa1)); in TEST_F()
1805 *dex1, &classes, &hot_methods, &startup_methods, &post_startup_methods, psa1)); in TEST_F()
1812 *dex1, in TEST_F()
1827 MethodReference ref(dex1, 0); in TEST_F()
1843 MethodReference ref(dex1, 0); in TEST_F()
1861 AddMethod(&info, dex1, /*method_idx=*/ 0, Hotness::kFlagHot); in TEST_F()
1871 AddMethod(&info, dex1, /*method_idx=*/ 0, Hotness::kFlagHot); in TEST_F()
1895 ASSERT_TRUE(AddMethod(&info, dex1, /*method_idx=*/ i, Hotness::kFlagHot, psa1)); in TEST_F()
1896 ASSERT_TRUE(AddClass(&info, dex1, dex::TypeIndex(i), psa1)); in TEST_F()
1897 ASSERT_TRUE(AddMethod(&info, dex1, /*method_idx=*/ i, Hotness::kFlagStartup, psa2)); in TEST_F()
1898 ASSERT_TRUE(AddClass(&info, dex1, dex::TypeIndex(i), psa2)); in TEST_F()
1905 dex_files.push_back(std::unique_ptr<const DexFile>(dex1)); in TEST_F()
1925 auto mIt1 = methods.find(MethodReference(dex1, i)); in TEST_F()
1930 auto cIt1 = classes.find(TypeReference(dex1, dex::TypeIndex(i))); in TEST_F()
1959 ASSERT_TRUE(AddMethod(&info1, dex1, /*method_idx=*/ i, Hotness::kFlagHot, psa1)); in TEST_F()
1960 ASSERT_TRUE(AddClass(&info2, dex1, dex::TypeIndex(i), psa1)); in TEST_F()
1961 ASSERT_TRUE(AddMethod(&info1, dex1, /*method_idx=*/ i, Hotness::kFlagStartup, psa2)); in TEST_F()
1962 ASSERT_TRUE(AddClass(&info1, dex1, dex::TypeIndex(i), psa2)); in TEST_F()
1970 dex_files.push_back(std::unique_ptr<const DexFile>(dex1)); in TEST_F()
1991 auto mIt1 = methods.find(MethodReference(dex1, i)); in TEST_F()
1996 auto cIt1 = classes.find(TypeReference(dex1, dex::TypeIndex(i))); in TEST_F()