/system/core/debuggerd/test/ |
D | tombstone_test.cpp | 98 backtrace_map_t map; in TEST_F() local 100 map.start = 0x123456789abcd000UL; in TEST_F() 101 map.end = 0x123456789abdf000UL; in TEST_F() 103 map.start = 0x1234000; in TEST_F() 104 map.end = 0x1235000; in TEST_F() 106 map_mock_->AddMap(map); in TEST_F() 130 backtrace_map_t map; in TEST_F() local 132 map.start = 0x123456789abcd000UL; in TEST_F() 133 map.end = 0x123456789abdf000UL; in TEST_F() 135 map.start = 0x1234000; in TEST_F() [all …]
|
/system/core/libcutils/ |
D | hashmap.c | 48 Hashmap* map = malloc(sizeof(Hashmap)); in hashmapCreate() local 49 if (map == NULL) { in hashmapCreate() 55 map->bucketCount = 1; in hashmapCreate() 56 while (map->bucketCount <= minimumBucketCount) { in hashmapCreate() 58 map->bucketCount <<= 1; in hashmapCreate() 61 map->buckets = calloc(map->bucketCount, sizeof(Entry*)); in hashmapCreate() 62 if (map->buckets == NULL) { in hashmapCreate() 63 free(map); in hashmapCreate() 67 map->size = 0; in hashmapCreate() 69 map->hash = hash; in hashmapCreate() [all …]
|
D | str_parms.c | 49 Hashmap *map; member 80 str_parms->map = hashmapCreate(5, str_hash_fn, str_eq); in str_parms_create() 81 if (!str_parms->map) in str_parms_create() 120 hashmapRemove(ctxt->str_parms->map, key); in remove_pair() 132 hashmapForEach(str_parms->map, remove_pair, &ctxt); in str_parms_del() 141 hashmapForEach(str_parms->map, remove_pair, &ctxt); in str_parms_destroy() 142 hashmapFree(str_parms->map); in str_parms_destroy() 186 old_val = hashmapPut(str_parms->map, key, value); in str_parms_create_str() 235 old_val = hashmapPut(str_parms->map, tmp_key, tmp_val); in str_parms_add_str() 289 return hashmapGet(str_parms->map, (void *)key) != NULL; in str_parms_has_key() [all …]
|
/system/bt/osi/test/ |
D | hash_map_utils_test.cpp | 34 map = NULL; in SetUp() 37 hash_map_free(map); in TearDown() 41 hash_map_t *map; member in HashMapUtilsTest 46 map = hash_map_utils_new_from_string_params(params); in TEST_F() 47 EXPECT_TRUE(hash_map_is_empty(map)); in TEST_F() 52 map = hash_map_utils_new_from_string_params(params); in TEST_F() 53 EXPECT_TRUE(hash_map_is_empty(map)); in TEST_F() 60 map = hash_map_utils_new_from_string_params(params); in TEST_F() 61 EXPECT_EQ(1u, hash_map_size(map)); in TEST_F() 62 EXPECT_EQ(0, strcmp(value, (char *)hash_map_get(map, key))); in TEST_F() [all …]
|
/system/core/libbacktrace/ |
D | UnwindMap.cpp | 54 backtrace_map_t map; in GenerateMap() local 56 map.start = unw_map.start; in GenerateMap() 57 map.end = unw_map.end; in GenerateMap() 58 map.offset = unw_map.offset; in GenerateMap() 59 map.load_base = unw_map.load_base; in GenerateMap() 60 map.flags = unw_map.flags; in GenerateMap() 61 map.name = unw_map.path; in GenerateMap() 64 maps_.push_front(map); in GenerateMap() 97 backtrace_map_t map; in GenerateMap() local 99 map.start = unw_map.start; in GenerateMap() [all …]
|
D | BacktraceMap.cpp | 37 void BacktraceMap::FillIn(uintptr_t addr, backtrace_map_t* map) { in FillIn() argument 41 *map = *it; in FillIn() 45 *map = {}; in FillIn() 48 bool BacktraceMap::ParseLine(const char* line, backtrace_map_t* map) { argument 72 map->start = start; 73 map->end = end; 74 map->flags = PROT_NONE; 76 map->flags |= PROT_READ; 79 map->flags |= PROT_WRITE; 82 map->flags |= PROT_EXEC; [all …]
|
D | Backtrace.cpp | 40 Backtrace::Backtrace(pid_t pid, pid_t tid, BacktraceMap* map) in Backtrace() argument 41 : pid_(pid), tid_(tid), map_(map), map_shared_(true) { in Backtrace() 79 if (BacktraceMap::IsValid(frame->map)) { in FormatFrameData() 80 relative_pc = BacktraceMap::GetRelativePc(frame->map, frame->pc); in FormatFrameData() 81 if (!frame->map.name.empty()) { in FormatFrameData() 82 map_name = frame->map.name.c_str(); in FormatFrameData() 85 map_name += StringPrintf(":%" PRIPTR "]", frame->map.start); in FormatFrameData() 88 map_name = StringPrintf("<anonymous:%" PRIPTR ">", frame->map.start); in FormatFrameData() 99 if (frame->map.offset != 0) { in FormatFrameData() 100 line += " (offset " + StringPrintf("0x%" PRIxPTR, frame->map.offset) + ")"; in FormatFrameData() [all …]
|
D | BacktracePtrace.cpp | 55 backtrace_map_t map; in ReadWord() 56 FillInMap(ptr, &map); in ReadWord() 57 if (!BacktraceMap::IsValid(map) || !(map.flags & PROT_READ)) { in ReadWord() 70 backtrace_map_t map; in Read() 71 FillInMap(addr, &map); in Read() 72 if (!BacktraceMap::IsValid(map) || !(map.flags & PROT_READ)) { in Read() 76 bytes = MIN(map.end - addr, bytes); in Read()
|
D | BacktraceCurrent.cpp | 44 backtrace_map_t map; in ReadWord() local 45 FillInMap(ptr, &map); in ReadWord() 46 if (BacktraceMap::IsValid(map) && map.flags & PROT_READ) { in ReadWord() 57 backtrace_map_t map; in Read() local 58 FillInMap(addr, &map); in Read() 59 if (!BacktraceMap::IsValid(map) || !(map.flags & PROT_READ)) { in Read() 62 bytes = MIN(map.end - addr, bytes); in Read() 87 if (BacktraceMap::IsValid(frame.map)) { in DiscardFrame() 88 const std::string library = basename(frame.map.name.c_str()); in DiscardFrame()
|
/system/core/liblog/ |
D | event_tag_map.c | 53 static int processFile(EventTagMap* map); 54 static int countMapLines(const EventTagMap* map); 55 static int parseMapLines(EventTagMap* map); 57 static int sortTags(EventTagMap* map); 114 LIBLOG_ABI_PUBLIC void android_closeEventTagMap(EventTagMap* map) in android_closeEventTagMap() argument 116 if (map == NULL) in android_closeEventTagMap() 119 munmap(map->mapAddr, map->mapLen); in android_closeEventTagMap() 120 free(map); in android_closeEventTagMap() 128 LIBLOG_ABI_PUBLIC const char* android_lookupEventTag(const EventTagMap* map, in android_lookupEventTag() argument 134 hi = map->numTags-1; in android_lookupEventTag() [all …]
|
/system/extras/libpagemap/ |
D | pm_map.c | 22 int pm_map_pagemap(pm_map_t *map, uint64_t **pagemap_out, size_t *len) { in pm_map_pagemap() argument 23 if (!map) in pm_map_pagemap() 26 return pm_process_pagemap_range(map->proc, map->start, map->end, in pm_map_pagemap() 30 int pm_map_usage_flags(pm_map_t *map, pm_memusage_t *usage_out, in pm_map_usage_flags() argument 38 if (!map || !usage_out) in pm_map_usage_flags() 41 error = pm_map_pagemap(map, &pagemap, &len); in pm_map_usage_flags() 48 usage.vss += map->proc->ker->pagesize; in pm_map_usage_flags() 57 error = pm_kernel_flags(map->proc->ker, PM_PAGEMAP_PFN(pagemap[i]), in pm_map_usage_flags() 65 error = pm_kernel_count(map->proc->ker, PM_PAGEMAP_PFN(pagemap[i]), in pm_map_usage_flags() 69 usage.rss += (count >= 1) ? map->proc->ker->pagesize : (0); in pm_map_usage_flags() [all …]
|
D | pm_process.c | 251 pm_map_t *map, **maps, **new_maps; in read_maps() local 291 maps[maps_count] = map = calloc(1, sizeof(*map)); in read_maps() 293 map->proc = proc; in read_maps() 297 &map->start, &map->end, perms, &map->offset, &name_offset); in read_maps() 299 map->name = strdup(line + name_offset); in read_maps() 300 if (!map->name) { in read_maps() 310 if (perms[0] == 'r') map->flags |= PM_MAP_READ; in read_maps() 311 if (perms[1] == 'w') map->flags |= PM_MAP_WRITE; in read_maps() 312 if (perms[2] == 'x') map->flags |= PM_MAP_EXEC; in read_maps()
|
/system/core/include/cutils/ |
D | hashmap.h | 47 void hashmapFree(Hashmap* map); 62 void* hashmapPut(Hashmap* map, void* key, void* value); 68 void* hashmapGet(Hashmap* map, void* key); 73 bool hashmapContainsKey(Hashmap* map, void* key); 82 void* hashmapMemoize(Hashmap* map, void* key, 89 void* hashmapRemove(Hashmap* map, void* key); 94 size_t hashmapSize(Hashmap* map); 100 void hashmapForEach(Hashmap* map, 111 void hashmapLock(Hashmap* map); 116 void hashmapUnlock(Hashmap* map); [all …]
|
/system/core/include/backtrace/ |
D | BacktraceMap.h | 57 virtual void FillIn(uintptr_t addr, backtrace_map_t* map); 62 backtrace_map_t map; in GetFlags() local 63 FillIn(pc, &map); in GetFlags() 64 if (IsValid(map)) { in GetFlags() 65 return map.flags; in GetFlags() 84 static inline bool IsValid(const backtrace_map_t& map) { in IsValid() argument 85 return map.end > 0; in IsValid() 88 static uintptr_t GetRelativePc(const backtrace_map_t& map, uintptr_t pc) { in GetRelativePc() argument 89 if (IsValid(map)) { in GetRelativePc() 90 return pc - map.start + map.load_base; in GetRelativePc() [all …]
|
/system/extras/simpleperf/ |
D | thread_tree.cpp | 90 MapEntry* map = AllocateMap(MapEntry(start_addr, len, pgoff, time, dso)); in AddKernelMap() local 91 FixOverlappedMap(&kernel_map_tree_, map); in AddKernelMap() 92 auto pair = kernel_map_tree_.insert(map); in AddKernelMap() 115 MapEntry* map = AllocateMap(MapEntry(start_addr, len, pgoff, time, dso)); in AddThreadMap() local 116 FixOverlappedMap(&thread->maps, map); in AddThreadMap() 117 auto pair = thread->maps.insert(map); in AddThreadMap() 131 MapEntry* map = new MapEntry(value); in AllocateMap() local 132 map_storage_.push_back(std::unique_ptr<MapEntry>(map)); in AllocateMap() 133 return map; in AllocateMap() 136 void ThreadTree::FixOverlappedMap(std::set<MapEntry*, MapComparator>* map_set, const MapEntry* map)… in FixOverlappedMap() argument [all …]
|
D | sample_tree_test.cpp | 37 ASSERT_TRUE(sample.map != nullptr); in SampleMatchExpectation() 38 ASSERT_EQ(expected.dso_name, sample.map->dso->Path()); in SampleMatchExpectation() 39 ASSERT_EQ(expected.map_start_addr, sample.map->start_addr); in SampleMatchExpectation() 63 if (sample1.map->dso->Path() != sample2.map->dso->Path()) { in CompareSampleFunction() 64 return sample1.map->dso->Path() > sample2.map->dso->Path() ? 1 : -1; in CompareSampleFunction() 66 if (sample1.map->start_addr != sample2.map->start_addr) { in CompareSampleFunction() 67 return sample1.map->start_addr - sample2.map->start_addr; in CompareSampleFunction()
|
D | read_elf_test.cpp | 37 void ParseSymbol(const ElfFileSymbol& symbol, std::map<std::string, ElfFileSymbol>* symbols) { in ParseSymbol() 41 void CheckElfFileSymbols(const std::map<std::string, ElfFileSymbol>& symbols) { in CheckElfFileSymbols() 52 std::map<std::string, ElfFileSymbol> symbols; in TEST() 59 std::map<std::string, ElfFileSymbol> symbols; in TEST() 67 std::map<std::string, ElfFileSymbol> symbols; in TEST() 73 std::map<std::string, ElfFileSymbol> symbols; in TEST()
|
/system/extras/libpagemap/include/pagemap/ |
D | pagemap.h | 208 #define pm_map_name(map) ((map)->name) argument 209 #define pm_map_flags(map) ((map)->flags) argument 214 #define pm_map_start(map) ((map)->start) argument 215 #define pm_map_end(map) ((map)->end) argument 216 #define pm_map_offset(map) ((map)->offset) argument 221 int pm_map_pagemap(pm_map_t *map, uint64_t **pagemap_out, size_t *len); 224 int pm_map_usage(pm_map_t *map, pm_memusage_t *usage_out); 228 int pm_map_usage_flags(pm_map_t *map, pm_memusage_t *usage_out, 232 int pm_map_workingset(pm_map_t *map, pm_memusage_t *ws_out);
|
/system/bt/osi/src/ |
D | hash_map_utils.c | 39 hash_map_t *map = hash_map_new(BUCKETS_NUM, hash_function_string, osi_free, in hash_map_utils_new_from_string_params() local 41 if (!map) in hash_map_utils_new_from_string_params() 73 hash_map_set(map, key, value); in hash_map_utils_new_from_string_params() 84 return map; in hash_map_utils_new_from_string_params() 87 void hash_map_utils_dump_string_keys_string_values(hash_map_t *map) { in hash_map_utils_dump_string_keys_string_values() argument 88 if (!map) { in hash_map_utils_dump_string_keys_string_values() 92 hash_map_foreach(map, dump_entry, NULL); in hash_map_utils_dump_string_keys_string_values()
|
/system/core/libutils/ |
D | PropertyMap.cpp | 112 void PropertyMap::addAll(const PropertyMap* map) { in addAll() argument 113 for (size_t i = 0; i < map->mProperties.size(); i++) { in addAll() 114 mProperties.add(map->mProperties.keyAt(i), map->mProperties.valueAt(i)); in addAll() 126 PropertyMap* map = new PropertyMap(); in load() local 127 if (!map) { in load() 134 Parser parser(map, tokenizer); in load() 143 delete map; in load() 145 *outMap = map; in load() 156 PropertyMap::Parser::Parser(PropertyMap* map, Tokenizer* tokenizer) : in Parser() argument 157 mMap(map), mTokenizer(tokenizer) { in Parser()
|
/system/extras/showmap/ |
D | showmap.cpp | 130 static void enqueue_map(mapinfo **head, mapinfo *map, int sort_by_address, int coalesce_by_name) { in enqueue_map() argument 134 if (!map) { in enqueue_map() 139 if (current && coalesce_by_name && !strcmp(map->name, current->name)) { in enqueue_map() 140 current->size += map->size; in enqueue_map() 141 current->rss += map->rss; in enqueue_map() 142 current->pss += map->pss; in enqueue_map() 143 current->shared_clean += map->shared_clean; in enqueue_map() 144 current->shared_dirty += map->shared_dirty; in enqueue_map() 145 current->private_clean += map->private_clean; in enqueue_map() 146 current->private_dirty += map->private_dirty; in enqueue_map() [all …]
|
/system/sepolicy/tools/sepolicy-analyze/ |
D | utils.c | 29 void *map; in load_policy() local 42 map = mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in load_policy() 43 if (map == MAP_FAILED) { in load_policy() 51 pf->data = map; in load_policy() 56 munmap(map, sb.st_size); in load_policy() 63 munmap(map, sb.st_size); in load_policy()
|
/system/connectivity/shill/ |
D | rpc_task_unittest.cc | 24 using std::map; 40 virtual void Notify(const string& reason, const map<string, string>& dict); 48 map<string, string> last_notify_dict_; 60 const map<string, string>& dict) { in Notify() 67 map<string, string> env = task_.GetEnvironment(); in TEST_F() 88 map<string, string> dict; in TEST_F()
|
D | property_store.h | 121 const std::map<std::string, std::string>& values, 126 const std::vector<std::map<std::string, std::string>>& values, 276 const std::map<std::string, 285 std::map<std::string, std::shared_ptr<AccessorInterface<V>>>* collection, 290 std::map<std::string, BoolAccessor> bool_properties_; 291 std::map<std::string, Int16Accessor> int16_properties_; 292 std::map<std::string, Int32Accessor> int32_properties_; 293 std::map<std::string, KeyValueStoreAccessor> key_value_store_properties_; 294 std::map<std::string, RpcIdentifierAccessor> rpc_identifier_properties_; 295 std::map<std::string, RpcIdentifiersAccessor> rpc_identifiers_properties_; [all …]
|
D | rpc_task.cc | 25 using std::map; 50 void RPCTask::Notify(const string& reason, const map<string, string>& dict) { in Notify() 54 map<string, string> RPCTask::GetEnvironment() const { in GetEnvironment() 55 map<string, string> env; in GetEnvironment()
|