Home
last modified time | relevance | path

Searched refs:pair (Results 1 – 25 of 157) sorted by relevance

1234567

/art/libartbase/base/
Dhash_map.h33 size_t operator()(const std::pair<Key, Value>& pair) const { in operator()
34 return hash_fn_(pair.first); in operator()
44 bool operator()(const std::pair<Key, Value>& a, const std::pair<Key, Value>& b) const { in operator()
49 bool operator()(const std::pair<Key, Value>& a, const Element& element) const { in operator()
60 void MakeEmpty(std::pair<Key, Value>& item) const { in MakeEmpty()
61 item = std::pair<Key, Value>(); in MakeEmpty()
63 bool IsEmpty(const std::pair<Key, Value>& item) const { in IsEmpty()
73 class Alloc = std::allocator<std::pair<Key, Value>>>
74 class HashMap : public HashSet<std::pair<Key, Value>,
80 using Base = HashSet<std::pair<Key, Value>,
Dflags.h190 std::pair<Value, FlagOrigin> result = GetValueAndOrigin(); in GetValueOptional()
197 ALWAYS_INLINE std::pair<Value, FlagOrigin> GetValueAndOrigin() const { in GetValueAndOrigin()
200 return std::pair{from_server_setting_.value(), FlagOrigin::kServerSetting}; in GetValueAndOrigin()
203 return std::pair{from_system_property_.value(), FlagOrigin::kSystemProperty}; in GetValueAndOrigin()
206 return std::pair{from_command_line_.value(), FlagOrigin::kCmdlineArg}; in GetValueAndOrigin()
208 return std::pair{default_, FlagOrigin::kDefaultValue}; in GetValueAndOrigin()
/art/libdexfile/dex/
Dutf_test.cc64 uint32_t pair = 0; in TEST_F() local
67 pair = GetUtf16FromUtf8(&ptr); in TEST_F()
68 EXPECT_EQ(0x24, GetLeadingUtf16Char(pair)); in TEST_F()
69 EXPECT_EQ(0, GetTrailingUtf16Char(pair)); in TEST_F()
73 pair = GetUtf16FromUtf8(&ptr); in TEST_F()
74 EXPECT_EQ(0xa2, GetLeadingUtf16Char(pair)); in TEST_F()
75 EXPECT_EQ(0, GetTrailingUtf16Char(pair)); in TEST_F()
79 pair = GetUtf16FromUtf8(&ptr); in TEST_F()
80 EXPECT_EQ(0x20ac, GetLeadingUtf16Char(pair)); in TEST_F()
81 EXPECT_EQ(0, GetTrailingUtf16Char(pair)); in TEST_F()
[all …]
Dtype_lookup_table_test.cc28 using DescriptorClassDefIdxPair = std::pair<const char*, uint32_t>;
43 auto pair = GetParam(); in TEST_P() local
44 const char* descriptor = pair.first; in TEST_P()
47 ASSERT_EQ(pair.second, class_def_idx); in TEST_P()
Dutf.cc180 const uint32_t pair = GetUtf16FromUtf8(&utf8); in ComputeUtf16HashFromModifiedUtf8() local
181 const uint16_t first = GetLeadingUtf16Char(pair); in ComputeUtf16HashFromModifiedUtf8()
184 const uint16_t second = GetTrailingUtf16Char(pair); in ComputeUtf16HashFromModifiedUtf8()
212 const uint32_t pair = GetUtf16FromUtf8(&utf8); in CompareModifiedUtf8ToUtf16AsCodePointValues() local
215 const uint16_t lhs = GetLeadingUtf16Char(pair); in CompareModifiedUtf8ToUtf16AsCodePointValues()
224 const uint16_t lhs2 = GetTrailingUtf16Char(pair); in CompareModifiedUtf8ToUtf16AsCodePointValues()
/art/tools/ahat/src/main/com/android/ahat/heapdump/
DDiff.java201 InstanceListPair pair = byKey.get(key); in instances() local
202 if (pair == null) { in instances()
203 pair = new InstanceListPair(); in instances()
204 byKey.put(key, pair); in instances()
206 pair.a.add(inst); in instances()
210 InstanceListPair pair = byKey.get(key); in instances() local
211 if (pair == null) { in instances()
212 pair = new InstanceListPair(); in instances()
213 byKey.put(key, pair); in instances()
215 pair.b.add(inst); in instances()
[all …]
/art/tools/veridex/
Dhidden_api_finder.cc183 for (const std::pair<const std::string, in Dump()
184 std::vector<MethodReference>>& pair : method_locations_) { in Dump() local
185 const auto& name = pair.first; in Dump()
189 hiddenapi::ApiList api_list = hidden_api_.GetApiList(pair.first); in Dump()
191 os << "#" << ++stats->count << ": Linking " << api_list << " " << pair.first << " use(s):"; in Dump()
193 HiddenApiFinder::DumpReferences(os, pair.second); in Dump()
199 for (const std::pair<const std::string, in Dump()
200 std::vector<MethodReference>>& pair : field_locations_) { in Dump() local
201 const auto& name = pair.first; in Dump()
205 hiddenapi::ApiList api_list = hidden_api_.GetApiList(pair.first); in Dump()
[all …]
/art/tools/dexanalyze/
Ddexanalyze_bytecode.cc38 std::vector<std::pair<U, T>> most_used; in SortByOrder()
39 for (const auto& pair : usage) { in SortByOrder() local
40 most_used.emplace_back(pair.second, pair.first); in SortByOrder()
47 for (auto&& pair : most_used) { in SortByOrder()
48 CHECK(ret.emplace(pair.second, current_index++).second); in SortByOrder()
54 std::ostream& operator <<(std::ostream& os, const std::pair<A, B>& pair) { in operator <<() argument
55 return os << "{" << pair.first << ", " << pair.second << "}"; in operator <<()
77 std::vector<std::pair<U, T>> sorted;
79 for (const auto& pair : usage) { local
80 sorted.emplace_back(pair.second, pair.first);
[all …]
Ddexanalyze_strings.cc250 auto pair = queue.top(); in PopRealTop() local
253 while (pair.second->Savings() != pair.first) { in PopRealTop()
254 pair.first = pair.second->Savings(); in PopRealTop()
255 queue.push(pair); in PopRealTop()
256 pair = queue.top(); in PopRealTop()
259 return pair; in PopRealTop()
266 std::priority_queue<std::pair<int32_t, MatchTrie*>> queue; in ExtractPrefixes()
283 std::priority_queue<std::pair<int32_t, MatchTrie*>> prefixes; in ExtractPrefixes()
286 std::pair<int32_t, MatchTrie*> pair = PopRealTop(queue); in ExtractPrefixes() local
287 if (pair.second != this && pair.first > 0) { in ExtractPrefixes()
[all …]
/art/runtime/mirror/
Ddex_cache.cc149 auto pair(GetNativePair(GetResolvedFields(), i)); in VisitReflectiveTargets() local
150 if (pair.index == FieldDexCachePair::InvalidIndexForSlot(i)) { in VisitReflectiveTargets()
154 pair.object, DexCacheSourceInfo(kSourceDexCacheResolvedField, pair.index, this)); in VisitReflectiveTargets()
155 if (UNLIKELY(new_val != pair.object)) { in VisitReflectiveTargets()
157 pair = FieldDexCachePair(nullptr, FieldDexCachePair::InvalidIndexForSlot(i)); in VisitReflectiveTargets()
159 pair.object = new_val; in VisitReflectiveTargets()
161 SetNativePair(GetResolvedFields(), i, pair); in VisitReflectiveTargets()
166 auto pair(GetNativePair(GetResolvedMethods(), i)); in VisitReflectiveTargets() local
167 if (pair.index == MethodDexCachePair::InvalidIndexForSlot(i)) { in VisitReflectiveTargets()
171 pair.object, DexCacheSourceInfo(kSourceDexCacheResolvedMethod, pair.index, this)); in VisitReflectiveTargets()
[all …]
/art/runtime/jni/
Djni_env_ext.cc215 std::vector<std::pair<uintptr_t, jobject>>* locked_objects) in RemoveMonitors()
220 [self, frame, monitors](const std::pair<uintptr_t, jobject>& pair) in RemoveMonitors()
222 if (frame == pair.first) { in RemoveMonitors()
223 ObjPtr<mirror::Object> o = self->DecodeJObject(pair.second); in RemoveMonitors()
234 std::pair<uintptr_t, jobject> exact_pair = std::make_pair(current_frame, obj); in CheckMonitorRelease()
242 for (std::pair<uintptr_t, jobject>& pair : locked_objects_) { in CheckMonitorRelease()
243 if (self_->DecodeJObject(pair.second) == mirror_obj) { in CheckMonitorRelease()
244 std::string monitor_descr = ComputeMonitorDescription(self_, pair.second); in CheckMonitorRelease()
269 std::pair<uintptr_t, jobject>& pair = locked_objects_[locked_objects_.size() - 1]; in CheckNoHeldMonitors() local
270 if (pair.first == current_frame) { in CheckNoHeldMonitors()
[all …]
/art/dexdump/
Ddexdump_cfg.cc45 for (const DexInstructionPcPair& pair : accessor) { in DumpMethodCFG() local
46 const Instruction* inst = &pair.Inst(); in DumpMethodCFG()
48 dex_pc_is_branch_target.insert(pair.DexPc() + inst->GetTargetOffset()); in DumpMethodCFG()
66 dex_pc_is_branch_target.insert(pair.DexPc() + offset); in DumpMethodCFG()
79 for (const DexInstructionPcPair& pair : accessor) { in DumpMethodCFG() local
80 const uint32_t dex_pc = pair.DexPc(); in DumpMethodCFG()
109 std::string inst_str = pair.Inst().DumpString(dex_file); in DumpMethodCFG()
138 force_new_block = pair.Inst().IsSwitch() || pair.Inst().IsBasicBlockEnd(); in DumpMethodCFG()
163 for (const DexInstructionPcPair& pair : accessor) { in DumpMethodCFG() local
164 const Instruction* inst = &pair.Inst(); in DumpMethodCFG()
[all …]
/art/runtime/
Ddex_reference_collection.h36 using MapAllocator = Allocator<std::pair<const DexFile*, IndexVector>>;
41 Allocator<std::pair<const DexFile* const, IndexVector>>>;
58 for (auto&& pair : map_) { in NumReferences()
59 ret += pair.second.size(); in NumReferences()
Dimtable_test.cc38 std::pair<mirror::Class*, mirror::Class*> LoadClasses(const std::string& class_name) in LoadClasses()
74 std::pair<ArtMethod*, ArtMethod*> LoadMethods(const std::string& class_name, in LoadMethods()
77 std::pair<mirror::Class*, mirror::Class*> classes = LoadClasses(class_name); in LoadMethods()
93 std::pair<ArtMethod*, ArtMethod*> methods = LoadMethods("LInterfaces$A;", "foo"); in TEST_F()
100 std::pair<ArtMethod*, ArtMethod*> methods = LoadMethods("LInterfaces$Z;", "foo"); in TEST_F()
Dclass_table.cc41 DescriptorHashPair pair(descriptor, hash); in UpdateClass() local
42 auto existing_it = classes_.back().FindWithHash(pair, hash); in UpdateClass()
45 if (class_set.FindWithHash(pair, hash) != class_set.end()) { in UpdateClass()
103 DescriptorHashPair pair(descriptor, hash); in Lookup() local
106 auto it = class_set.FindWithHash(pair, hash); in Lookup()
124 DescriptorHashPair pair(descriptor, ComputeModifiedUtf8Hash(descriptor)); in Remove() local
127 auto it = class_set.find(pair); in Remove()
/art/test/983-source-transform-verify/
Dsource_transform_art.cc58 for (const DexInstructionPcPair& pair : method.GetInstructions()) { in VerifyClassData() local
59 const Instruction& inst = pair.Inst(); in VerifyClassData()
63 << " [Dex PC: 0x" << std::hex << pair.DexPc() << std::dec << "] : " in VerifyClassData()
/art/test/497-inlining-and-class-loader/
Dclear_dex_cache.cc51 auto pair = mirror::DexCache::GetNativePair(methods, i); in Java_Main_cloneResolvedMethods() local
52 uint32_t index = pair.index; in Java_Main_cloneResolvedMethods()
53 ArtMethod* method = pair.object; in Java_Main_cloneResolvedMethods()
89 mirror::MethodDexCachePair pair(method, index); in Java_Main_restoreResolvedMethods() local
90 mirror::DexCache::SetNativePair(methods, i, pair); in Java_Main_restoreResolvedMethods()
/art/tools/jvmti-agents/chain-agents/
Dchainagents.cc56 static std::pair<std::string, std::string> Split(std::string source, char delim) { in Split()
59 return std::pair(first, ""); in Split()
61 return std::pair(first, source.substr(source.find(delim) + 1)); in Split()
68 const std::pair<std::string, std::string>& lib_and_args, in Load()
104 std::pair<std::string, std::string> lib_and_args(Split(line, '=')); in AgentStart()
/art/libprofile/profile/
Dprofile_boot_info.cc52 for (const std::pair<uint32_t, uint32_t>& pair : methods_) { in Save() local
53 AddUintToBuffer(&buffer, pair.first); in Save()
54 AddUintToBuffer(&buffer, pair.second); in Save()
Dprofile_boot_info.h54 const std::vector<std::pair<uint32_t, uint32_t>>& GetMethods() const { in GetMethods()
66 std::vector<std::pair<uint32_t, uint32_t>> methods_;
/art/dex2oat/linker/
Dmulti_oat_relative_patcher.cc76 std::pair<bool, uint32_t> MultiOatRelativePatcher::MethodOffsetMap::FindMethodOffset( in FindMethodOffset()
80 return std::pair<bool, uint32_t>(false, 0u); in FindMethodOffset()
82 return std::pair<bool, uint32_t>(true, it->second); in FindMethodOffset()
/art/compiler/optimizing/
Dblock_builder.cc102 for (const DexInstructionPcPair& pair : code_item_accessor_) { in CreateBranchTargets() local
103 const uint32_t dex_pc = pair.DexPc(); in CreateBranchTargets()
104 const Instruction& instruction = pair.Inst(); in CreateBranchTargets()
132 DexInstructionIterator next(std::next(DexInstructionIterator(pair))); in CreateBranchTargets()
154 for (const DexInstructionPcPair& pair : code_item_accessor_) { in ConnectBasicBlocks() local
155 const uint32_t dex_pc = pair.DexPc(); in ConnectBasicBlocks()
156 const Instruction& instruction = pair.Inst(); in ConnectBasicBlocks()
214 block->AddSuccessor(GetBlockAt(std::next(DexInstructionIterator(pair)).DexPc())); in ConnectBasicBlocks()
404 for (const DexInstructionPcPair& pair : code_item_accessor_) { in InsertSynthesizedLoopsForOsr() local
405 const uint32_t dex_pc = pair.DexPc(); in InsertSynthesizedLoopsForOsr()
[all …]
/art/runtime/gc/
Dverification.cc155 using WorkQueue = std::deque<std::pair<mirror::Object*, std::string>>;
218 std::deque<std::pair<mirror::Object*, std::string>> work; in FirstPathFromRootSet()
224 auto pair = work.front(); in FirstPathFromRootSet() local
226 if (pair.first == target) { in FirstPathFromRootSet()
227 return pair.second; in FirstPathFromRootSet()
230 pair.first->VisitReferences(visitor, VoidFunctor()); in FirstPathFromRootSet()
234 oss << pair.second << " -> " << obj << "(" << obj->PrettyTypeOf() << ")." << pair2.second; in FirstPathFromRootSet()
/art/test/129-ThreadGetId/src/
DMain.java66 for (Map.Entry<Thread, StackTraceElement[]> pair : map.entrySet()) { in test_getStackTraces()
67 Thread thread = pair.getKey(); in test_getStackTraces()
71 System.out.println(thread.getName() + " depth " + pair.getValue().length); in test_getStackTraces()
/art/test/626-const-class-linking/src/
DMain.java315 Object pair = get.invoke(null); in wrapHelperGet() local
316 printPair(pair); in wrapHelperGet()
317 return new WeakReference<Class<?>>(getSecond(pair)); in wrapHelperGet()
320 private static void printPair(Object pair) throws Exception { in printPair() argument
321 Method print = pair.getClass().getDeclaredMethod("print"); in printPair()
322 print.invoke(pair); in printPair()
325 private static Class<?> getSecond(Object pair) throws Exception { in getSecond() argument
326 Field second = pair.getClass().getDeclaredField("second"); in getSecond()
327 return (Class<?>) second.get(pair); in getSecond()

1234567