/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 | 35 Hashmap *map; member 63 str_parms->map = hashmapCreate(5, str_hash_fn, str_eq); in str_parms_create() 64 if (!str_parms->map) in str_parms_create() 103 hashmapRemove(ctxt->str_parms->map, key); in remove_pair() 115 hashmapForEach(str_parms->map, remove_pair, &ctxt); in str_parms_del() 124 hashmapForEach(str_parms->map, remove_pair, &ctxt); in str_parms_destroy() 125 hashmapFree(str_parms->map); in str_parms_destroy() 169 old_val = hashmapPut(str_parms->map, key, value); in str_parms_create_str() 215 old_val = hashmapPut(str_parms->map, tmp_key, tmp_val); in str_parms_add_str() 266 return hashmapGet(str_parms->map, (void *)key) != NULL; in str_parms_has_key() [all …]
|
/system/core/libbacktrace/ |
D | BacktraceMap.cpp | 50 bool BacktraceMap::ParseLine(const char* line, backtrace_map_t* map) { argument 74 map->start = start; 75 map->end = end; 76 map->flags = PROT_NONE; 78 map->flags |= PROT_READ; 81 map->flags |= PROT_WRITE; 84 map->flags |= PROT_EXEC; 90 map->name = line+name_pos; 91 if (!map->name.empty() && map->name[map->name.length()-1] == '\n') { 92 map->name.erase(map->name.length()-1); [all …]
|
D | UnwindMap.cpp | 50 backtrace_map_t map; in GenerateMap() local 52 map.start = unw_map.start; in GenerateMap() 53 map.end = unw_map.end; in GenerateMap() 54 map.flags = unw_map.flags; in GenerateMap() 55 map.name = unw_map.path; in GenerateMap() 58 maps_.push_front(map); in GenerateMap() 90 backtrace_map_t map; in GenerateMap() local 92 map.start = unw_map.start; in GenerateMap() 93 map.end = unw_map.end; in GenerateMap() 94 map.flags = unw_map.flags; in GenerateMap() [all …]
|
D | BacktraceImpl.cpp | 37 Backtrace::Backtrace(BacktraceImpl* impl, pid_t pid, BacktraceMap* map) in Backtrace() argument 38 : pid_(pid), tid_(-1), map_(map), map_shared_(true), impl_(impl) { in Backtrace() 102 if (frame->map && !frame->map->name.empty()) { in FormatFrameData() 103 map_name = frame->map->name.c_str(); in FormatFrameData() 109 if (frame->map) { in FormatFrameData() 110 relative_pc = frame->pc - frame->map->start; in FormatFrameData() 139 BacktraceImpl* impl, BacktraceMap* map) : Backtrace(impl, getpid(), map) { in BacktraceCurrent() argument 150 const backtrace_map_t* map = FindMap(ptr); in ReadWord() local 151 if (map && map->flags & PROT_READ) { in ReadWord() 165 BacktraceImpl* impl, pid_t pid, pid_t tid, BacktraceMap* map) in BacktracePtrace() argument [all …]
|
D | BacktraceImpl.h | 56 BacktraceCurrent(BacktraceImpl* impl, BacktraceMap* map); 64 BacktracePtrace(BacktraceImpl* impl, pid_t pid, pid_t tid, BacktraceMap* map); 70 Backtrace* CreateCurrentObj(BacktraceMap* map); 71 Backtrace* CreatePtraceObj(pid_t pid, pid_t tid, BacktraceMap* map); 72 Backtrace* CreateThreadObj(pid_t tid, BacktraceMap* map);
|
D | UnwindPtrace.cpp | 61 UnwindMap* map = static_cast<UnwindMap*>(GetMap()); in Unwind() local 62 unw_map_set(addr_space_, map->GetMapCursor()); in Unwind() 109 frame->map = FindMap(frame->pc); in Unwind() 136 Backtrace* CreatePtraceObj(pid_t pid, pid_t tid, BacktraceMap* map) { in CreatePtraceObj() argument 137 return new BacktracePtrace(new UnwindPtrace(), pid, tid, map); in CreatePtraceObj()
|
D | UnwindCurrent.cpp | 140 frame->map = FindMap(frame->pc); in UnwindFromContext() 142 frame->map = NULL; in UnwindFromContext() 159 Backtrace* CreateCurrentObj(BacktraceMap* map) { in CreateCurrentObj() argument 160 return new BacktraceCurrent(new UnwindCurrent(), map); in CreateCurrentObj() 163 Backtrace* CreateThreadObj(pid_t tid, BacktraceMap* map) { in CreateThreadObj() argument 164 return new BacktraceThread(new UnwindCurrent(), tid, map); in CreateThreadObj()
|
D | backtrace_test.cpp | 272 UniquePtr<BacktraceMap> map; in VerifyProcTest() local 274 map.reset(BacktraceMap::Create(pid)); in VerifyProcTest() 276 UniquePtr<Backtrace> backtrace(Backtrace::Create(pid, tid, map.get())); in VerifyProcTest() 693 frame.map = NULL; in TEST() 696 backtrace_map_t map; in TEST() local 697 map.start = 0; in TEST() 698 map.end = 0; in TEST() 710 frame.map = ↦ in TEST() 711 map.start = 1; in TEST() 722 frame.map = ↦ in TEST() [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() 47 usage.vss += map->proc->ker->pagesize; in pm_map_usage_flags() 55 error = pm_kernel_flags(map->proc->ker, PM_PAGEMAP_PFN(pagemap[i]), in pm_map_usage_flags() 63 error = pm_kernel_count(map->proc->ker, PM_PAGEMAP_PFN(pagemap[i]), in pm_map_usage_flags() 67 usage.rss += (count >= 1) ? map->proc->ker->pagesize : (0); in pm_map_usage_flags() [all …]
|
D | pm_process.c | 248 pm_map_t *map, **maps, **new_maps; in read_maps() local 281 maps[maps_count] = map = calloc(1, sizeof(*map)); in read_maps() 283 map->proc = proc; in read_maps() 287 &map->start, &map->end, perms, &map->offset, name); in read_maps() 289 map->name = malloc(strlen(name) + 1); in read_maps() 290 if (!map->name) { in read_maps() 297 strcpy(map->name, name); in read_maps() 298 if (perms[0] == 'r') map->flags |= PM_MAP_READ; in read_maps() 299 if (perms[1] == 'w') map->flags |= PM_MAP_WRITE; in read_maps() 300 if (perms[2] == 'x') map->flags |= PM_MAP_EXEC; in read_maps()
|
D | pm_map.h | 22 int pm_map_destroy(pm_map_t *map);
|
/system/core/liblog/ |
D | event_tag_map.c | 51 static int processFile(EventTagMap* map); 52 static int countMapLines(const EventTagMap* map); 53 static int parseMapLines(EventTagMap* map); 55 static int sortTags(EventTagMap* map); 112 void android_closeEventTagMap(EventTagMap* map) in android_closeEventTagMap() argument 114 if (map == NULL) in android_closeEventTagMap() 117 munmap(map->mapAddr, map->mapLen); in android_closeEventTagMap() 118 free(map); in android_closeEventTagMap() 126 const char* android_lookupEventTag(const EventTagMap* map, int tag) in android_lookupEventTag() argument 131 hi = map->numTags-1; in android_lookupEventTag() [all …]
|
/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/extras/libpagemap/include/pagemap/ |
D | pagemap.h | 178 #define pm_map_name(map) ((map)->name) argument 179 #define pm_map_flags(map) ((map)->flags) argument 184 #define pm_map_start(map) ((map)->start) argument 185 #define pm_map_end(map) ((map)->end) argument 186 #define pm_map_offset(map) ((map)->offset) argument 191 int pm_map_pagemap(pm_map_t *map, uint64_t **pagemap_out, size_t *len); 194 int pm_map_usage(pm_map_t *map, pm_memusage_t *usage_out); 198 int pm_map_usage_flags(pm_map_t *map, pm_memusage_t *usage_out, 202 int pm_map_workingset(pm_map_t *map, pm_memusage_t *ws_out);
|
/system/core/toolbox/ |
D | readtty.c | 13 } map[] = { variable 30 for(i = 0; i < sizeof(map) / sizeof(map[0]); i++) { in next_char() 31 if(key == map[i].key) { in next_char() 32 next = strchr(map[i].chars, current); in next_char() 35 return map[i].chars[1]; in next_char() 45 for(i = 0; i < sizeof(map) / sizeof(map[0]); i++) { in prev_char() 46 if(key == map[i].key) { in prev_char() 47 next = strchr(map[i].chars+1, current); in prev_char() 50 return map[i].chars[1]; in prev_char()
|
D | load_policy.c | 15 void *map; in load_policy_main() local 35 map = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in load_policy_main() 36 if (map == MAP_FAILED) { in load_policy_main() 41 rc = security_load_policy(map, sb.st_size); in load_policy_main() 46 munmap(map, sb.st_size); in load_policy_main()
|
/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.c | 125 static void enqueue_map(mapinfo **head, mapinfo *map, int sort_by_address, int coalesce_by_name) { in enqueue_map() argument 129 if (!map) { in enqueue_map() 134 if (current && coalesce_by_name && !strcmp(map->name, current->name)) { in enqueue_map() 135 current->size += map->size; in enqueue_map() 136 current->rss += map->rss; in enqueue_map() 137 current->pss += map->pss; in enqueue_map() 138 current->shared_clean += map->shared_clean; in enqueue_map() 139 current->shared_dirty += map->shared_dirty; in enqueue_map() 140 current->private_clean += map->private_clean; in enqueue_map() 141 current->private_dirty += map->private_dirty; in enqueue_map() [all …]
|
/system/core/include/backtrace/ |
D | BacktraceMap.h | 57 const backtrace_map_t* map = Find(pc); in GetFlags() local 58 if (map) { in GetFlags() 59 return map->flags; in GetFlags() 81 virtual bool ParseLine(const char* line, backtrace_map_t* map);
|
D | Backtrace.h | 42 const backtrace_map_t* map; // The map associated with the given pc. member 70 static Backtrace* Create(pid_t pid, pid_t tid, BacktraceMap* map = NULL); 114 Backtrace(BacktraceImpl* impl, pid_t pid, BacktraceMap* map);
|
/system/core/include/log/ |
D | event_tag_map.h | 39 void android_closeEventTagMap(EventTagMap* map); 44 const char* android_lookupEventTag(const EventTagMap* map, int tag);
|
/system/core/debuggerd/ |
D | tombstone.cpp | 242 const backtrace_map_t* map = backtrace->FindMap(stack_content); in dump_stack_segment() local 244 if (!map) { in dump_stack_segment() 247 map_name = map->name.c_str(); in dump_stack_segment() 338 static void dump_map(log_t* log, const backtrace_map_t* map, bool fault_addr) { in dump_map() argument 340 (fault_addr? "--->" : " "), map->start, map->end - 1, in dump_map() 341 (map->flags & PROT_READ) ? 'r' : '-', (map->flags & PROT_WRITE) ? 'w' : '-', in dump_map() 342 (map->flags & PROT_EXEC) ? 'x' : '-', in dump_map() 343 (map->end - map->start), map->name.c_str()); in dump_map() 346 static void dump_nearby_maps(BacktraceMap* map, log_t* log, pid_t tid) { in dump_nearby_maps() argument 359 if (has_fault_address && (addr < map->begin()->start)) { in dump_nearby_maps() [all …]
|
/system/extras/procmem/ |
D | procmem.c | 26 pm_map_t *map; member 164 mi->map = maps[i]; in main() 169 error = pm_map_workingset(mi->map, &mi->usage); in main() 171 error = pm_map_usage(mi->map, &mi->usage); in main() 182 error = pm_map_pagemap(mi->map, &pagemap, &num_pages); in main() 192 address = pm_map_start(mi->map) + j * ker->pagesize; in main() 253 pm_map_name(mi->map) in main() 265 pm_map_name(mi->map) in main()
|
/system/core/include/utils/ |
D | PropertyMap.h | 75 void addAll(const PropertyMap* map); 89 Parser(PropertyMap* map, Tokenizer* tokenizer);
|