/system/core/debuggerd/test/ |
D | dump_maps_test.cpp | 96 backtrace_map_t map; in TEST_F() local 98 map.start = 0x123456789abcd000UL; in TEST_F() 99 map.end = 0x123456789abdf000UL; in TEST_F() 101 map.start = 0x1234000; in TEST_F() 102 map.end = 0x1235000; in TEST_F() 104 map_mock_->AddMap(map); in TEST_F() 126 backtrace_map_t map; in TEST_F() local 128 map.start = 0x123456789abcd000UL; in TEST_F() 129 map.end = 0x123456789abdf000UL; in TEST_F() 131 map.start = 0x1234000; in TEST_F() [all …]
|
D | BacktraceMock.h | 36 void AddMap(backtrace_map_t& map) { in AddMap() argument 37 maps_.push_back(map); in AddMap() 44 BacktraceMock(BacktraceMapMock* map) : Backtrace(0, 0, map) { in BacktraceMock() argument
|
/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 | 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.offset = unw_map.offset; in GenerateMap() 55 map.load_base = unw_map.load_base; in GenerateMap() 56 map.flags = unw_map.flags; in GenerateMap() 57 map.name = unw_map.path; in GenerateMap() 60 maps_.push_front(map); in GenerateMap() 92 backtrace_map_t map; in GenerateMap() local 94 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 | 42 Backtrace::Backtrace(pid_t pid, pid_t tid, BacktraceMap* map) in Backtrace() argument 43 : pid_(pid), tid_(tid), map_(map), map_shared_(true) { in Backtrace() 80 if (BacktraceMap::IsValid(frame->map) && !frame->map.name.empty()) { in FormatFrameData() 81 map_name = frame->map.name.c_str(); in FormatFrameData() 86 uintptr_t relative_pc = BacktraceMap::GetRelativePc(frame->map, frame->pc); in FormatFrameData() 91 if (frame->map.offset != 0) { in FormatFrameData() 92 line += " (offset " + StringPrintf("0x%" PRIxPTR, frame->map.offset) + ")"; in FormatFrameData() 105 void Backtrace::FillInMap(uintptr_t pc, backtrace_map_t* map) { in FillInMap() argument 107 map_->FillIn(pc, map); in FillInMap() 111 Backtrace* Backtrace::Create(pid_t pid, pid_t tid, BacktraceMap* map) { in Create() argument [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() 85 if (BacktraceMap::IsValid(frame.map)) { in DiscardFrame() 86 const std::string library = basename(frame.map.name.c_str()); in DiscardFrame()
|
D | backtrace_test.cpp | 226 if (BacktraceMap::IsValid(frame.map)) { in TEST() 227 const std::string name = basename(frame.map.name.c_str()); in TEST() 310 std::unique_ptr<BacktraceMap> map; in VerifyProcTest() local 312 map.reset(BacktraceMap::Create(pid)); in VerifyProcTest() 314 std::unique_ptr<Backtrace> backtrace(Backtrace::Create(pid, tid, map.get())); in VerifyProcTest() 741 backtrace_map_t map; in TEST() local 743 map.start = 1; in TEST() 744 map.end = 3; in TEST() 745 map.flags = 1; in TEST() 746 map.name = "Initialized"; in TEST() [all …]
|
D | UnwindPtrace.cpp | 31 UnwindPtrace::UnwindPtrace(pid_t pid, pid_t tid, BacktraceMap* map) in UnwindPtrace() argument 32 : BacktracePtrace(pid, tid, map), addr_space_(nullptr), upt_info_(nullptr) { in UnwindPtrace() 67 UnwindMap* map = static_cast<UnwindMap*>(GetMap()); in Unwind() local 68 unw_map_set(addr_space_, map->GetMapCursor()); in Unwind() 113 FillInMap(frame->pc, &frame->map); in Unwind()
|
/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/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 285 maps[maps_count] = map = calloc(1, sizeof(*map)); in read_maps() 287 map->proc = proc; in read_maps() 291 &map->start, &map->end, perms, &map->offset, name); in read_maps() 293 map->name = malloc(strlen(name) + 1); in read_maps() 294 if (!map->name) { in read_maps() 302 strcpy(map->name, name); in read_maps() 303 if (perms[0] == 'r') map->flags |= PM_MAP_READ; in read_maps() 304 if (perms[1] == 'w') map->flags |= PM_MAP_WRITE; in read_maps() 305 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 | 54 virtual void FillIn(uintptr_t addr, backtrace_map_t* map); 59 backtrace_map_t map; in GetFlags() local 60 FillIn(pc, &map); in GetFlags() 61 if (IsValid(map)) { in GetFlags() 62 return map.flags; in GetFlags() 81 static inline bool IsValid(const backtrace_map_t& map) { in IsValid() argument 82 return map.end > 0; in IsValid() 85 static uintptr_t GetRelativePc(const backtrace_map_t& map, uintptr_t pc) { in GetRelativePc() argument 86 if (IsValid(map)) { in GetRelativePc() 87 return pc - map.start + map.load_base; in GetRelativePc() [all …]
|
D | Backtrace.h | 42 backtrace_map_t map; // The map associated with the given pc. member 67 static Backtrace* Create(pid_t pid, pid_t tid, BacktraceMap* map = NULL); 79 virtual void FillInMap(uintptr_t pc, backtrace_map_t* map); 117 Backtrace(pid_t pid, pid_t tid, BacktraceMap* map);
|
/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/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/logd/ |
D | LogStatistics.h | 36 std::unordered_map<TKey, TEntry> map; variable 51 for(iterator it = map.begin(); it != map.end(); ++it) { in sort() 80 iterator it = map.find(key); in add() 81 if (it == map.end()) { in add() 82 it = map.insert(std::make_pair(key, TEntry(e))).first; in add() 90 iterator it = map.find(key); in add() 91 if (it == map.end()) { in add() 92 it = map.insert(std::make_pair(key, TEntry(key))).first; in add() 100 iterator it = map.find(key); in subtract() 101 if ((it != map.end()) && it->second.subtract(e)) { in subtract() [all …]
|
/system/extras/perfprofd/ |
D | perf_data_converter.cc | 6 using std::map; 29 map<uint64, uint64> address_count_map; 30 map<RangeTarget, uint64> range_count_map; 41 typedef map<string, BinaryProfile> ModuleProfileMap; in RawPerfDataToAndroidPerfProfile() 42 typedef map<string, ModuleProfileMap> ProgramProfileMap; in RawPerfDataToAndroidPerfProfile() 79 map<string, int> name_id_map; in RawPerfDataToAndroidPerfProfile() 90 map<string, string> name_buildid_map; in RawPerfDataToAndroidPerfProfile()
|
/system/extras/procmem/ |
D | procmem.c | 27 pm_map_t *map; member 165 mi->map = maps[i]; in main() 170 error = pm_map_workingset(mi->map, &mi->usage); in main() 172 error = pm_map_usage(mi->map, &mi->usage); in main() 183 error = pm_map_pagemap(mi->map, &pagemap, &num_pages); in main() 193 address = pm_map_start(mi->map) + j * ker->pagesize; in main() 254 pm_map_name(mi->map) in main() 266 pm_map_name(mi->map) in main()
|
/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 | 255 backtrace_map_t map; in dump_stack_segment() local 256 backtrace->FillInMap(stack_data[i], &map); in dump_stack_segment() 257 if (BacktraceMap::IsValid(map) && !map.name.empty()) { in dump_stack_segment() 258 line += " " + map.name; in dump_stack_segment() 332 static void dump_all_maps(Backtrace* backtrace, BacktraceMap* map, log_t* log, pid_t tid) { in dump_all_maps() argument 349 if (map->begin() != map->end() && addr < map->begin()->start) { in dump_all_maps() 357 for (BacktraceMap::const_iterator it = map->begin(); it != map->end(); ++it) { in dump_all_maps() 422 log_t* log, pid_t pid, pid_t tid, int* total_sleep_time_usec, BacktraceMap* map) { in dump_sibling_thread_report() argument 464 std::unique_ptr<Backtrace> backtrace(Backtrace::Create(pid, new_tid, map)); in dump_sibling_thread_report() 665 std::unique_ptr<BacktraceMap> map(BacktraceMap::Create(pid)); in dump_crash() local [all …]
|