/system/core/debuggerd/ |
H A D | crasher.c | 164 char* map = mmap(NULL, sizeof(int), PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); local 165 munmap(map, sizeof(int)); 166 map[0] = '8';
|
H A D | tombstone.cpp | 242 const backtrace_map_t* map = backtrace->FindMap(stack_content); local 244 if (!map) { 247 map_name = map->name.c_str(); 338 static void dump_map(log_t* log, const backtrace_map_t* map, bool fault_addr) { argument 340 (fault_addr? "--->" : " "), map->start, map->end - 1, 341 (map->flags & PROT_READ) ? 'r' : '-', (map->flags & PROT_WRITE) ? 'w' : '-', 342 (map->flags & PROT_EXEC) ? 'x' : '-', 343 (map 346 dump_nearby_maps(BacktraceMap* map, log_t* log, pid_t tid) argument 390 dump_sibling_thread_report( log_t* log, pid_t pid, pid_t tid, int* total_sleep_time_usec, BacktraceMap* map) argument [all...] |
/system/core/healthd/ |
H A D | BatteryMonitor.cpp | 49 struct sysfsStringEnumMap map[]) { 50 for (int i = 0; map[i].s; i++) 51 if (!strcmp(str, map[i].s)) 52 return map[i].val; 48 mapSysfsString(const char* str, struct sysfsStringEnumMap map[]) argument
|
/system/core/include/backtrace/ |
H A D | Backtrace.h | 42 const backtrace_map_t* map; // The map associated with the given pc. member in struct:backtrace_frame_data_t 68 // If map is NULL, then create the map and manage it internally. 69 // If map is not NULL, the map is still owned by the caller. 70 static Backtrace* Create(pid_t pid, pid_t tid, BacktraceMap* map = NULL); 81 // Find the map associated with the given pc. 114 Backtrace(BacktraceImpl* impl, pid_t pid, BacktraceMap* map);
|
H A D | BacktraceMap.h | 44 // If uncached is true, then parse the current process map as of the call. 45 // Passing a map created with uncached set to true to Backtrace::Create() 51 // Get the map data structure for the given address. 57 const backtrace_map_t* map = Find(pc); local 58 if (map) { 59 return map->flags; 81 virtual bool ParseLine(const char* line, backtrace_map_t* map);
|
/system/core/libbacktrace/ |
H A D | BacktraceImpl.cpp | 37 Backtrace::Backtrace(BacktraceImpl* impl, pid_t pid, BacktraceMap* map) argument 38 : pid_(pid), tid_(-1), map_(map), map_shared_(true), impl_(impl) { 102 if (frame->map && !frame->map->name.empty()) { 103 map_name = frame->map->name.c_str(); 109 if (frame->map) { 110 relative_pc = frame->pc - frame->map->start; 139 BacktraceImpl* impl, BacktraceMap* map) : Backtrace(impl, getpid(), map) { 150 const backtrace_map_t* map local 138 BacktraceCurrent( BacktraceImpl* impl, BacktraceMap* map) argument 164 BacktracePtrace( BacktraceImpl* impl, pid_t pid, pid_t tid, BacktraceMap* map) argument 195 Create(pid_t pid, pid_t tid, BacktraceMap* map) argument [all...] |
H A 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 123 backtrace_map_t map; local 141 BacktraceMap* map = new BacktraceMap(pid); local [all...] |
H A D | BacktraceThread.cpp | 150 BacktraceThread::BacktraceThread(BacktraceImpl* impl, pid_t tid, BacktraceMap* map) argument 151 : BacktraceCurrent(impl, map) {
|
H A D | UnwindCurrent.cpp | 140 frame->map = FindMap(frame->pc); 142 frame->map = NULL; 159 Backtrace* CreateCurrentObj(BacktraceMap* map) { argument 160 return new BacktraceCurrent(new UnwindCurrent(), map); 163 Backtrace* CreateThreadObj(pid_t tid, BacktraceMap* map) { argument 164 return new BacktraceThread(new UnwindCurrent(), tid, map);
|
H A D | UnwindMap.cpp | 33 // of maps using the same map cursor. 50 backtrace_map_t map; local 52 map.start = unw_map.start; 53 map.end = unw_map.end; 54 map.flags = unw_map.flags; 55 map.name = unw_map.path; 58 maps_.push_front(map); 79 // It's possible for the map to be regenerated while this loop is occurring. 80 // If that happens, get the map again, but only try at most three times 90 backtrace_map_t map; local 117 const backtrace_map_t* map = BacktraceMap::Find(addr); local 134 BacktraceMap* map; local [all...] |
H A D | UnwindPtrace.cpp | 40 // Remove the map from the address space before destroying it. 61 UnwindMap* map = static_cast<UnwindMap*>(GetMap()); local 62 unw_map_set(addr_space_, map->GetMapCursor()); 109 frame->map = FindMap(frame->pc); 136 Backtrace* CreatePtraceObj(pid_t pid, pid_t tid, BacktraceMap* map) { argument 137 return new BacktracePtrace(new UnwindPtrace(), pid, tid, map);
|
H A D | backtrace_test.cpp | 272 UniquePtr<BacktraceMap> map; local 274 map.reset(BacktraceMap::Create(pid)); 276 UniquePtr<Backtrace> backtrace(Backtrace::Create(pid, tid, map.get())); 661 // This test is for UnwindMaps that should share the same map cursor when 693 frame.map = NULL; 696 backtrace_map_t map; local 697 map.start = 0; 698 map.end = 0; 700 // Check no map set. 709 // Check map nam 768 map_test_t map; local [all...] |
/system/core/libcutils/ |
H A D | hashmap.c | 48 Hashmap* map = malloc(sizeof(Hashmap)); local 49 if (map == NULL) { 55 map->bucketCount = 1; 56 while (map->bucketCount <= minimumBucketCount) { 58 map->bucketCount <<= 1; 61 map->buckets = calloc(map->bucketCount, sizeof(Entry*)); 62 if (map->buckets == NULL) { 63 free(map); 67 map 80 hashKey(Hashmap* map, void* key) argument 93 hashmapSize(Hashmap* map) argument 101 expandIfNecessary(Hashmap* map) argument 132 hashmapLock(Hashmap* map) argument 136 hashmapUnlock(Hashmap* map) argument 140 hashmapFree(Hashmap* map) argument 189 hashmapPut(Hashmap* map, void* key, void* value) argument 221 hashmapGet(Hashmap* map, void* key) argument 236 hashmapContainsKey(Hashmap* map, void* key) argument 251 hashmapMemoize(Hashmap* map, void* key, void* (*initialValue)(void* key, void* context), void* context) argument 284 hashmapRemove(Hashmap* map, void* key) argument 306 hashmapForEach(Hashmap* map, bool (*callback)(void* key, void* value, void* context), void* context) argument 322 hashmapCurrentCapacity(Hashmap* map) argument 327 hashmapCountCollisions(Hashmap* map) argument [all...] |
H A D | str_parms.c | 35 Hashmap *map; member in struct:str_parms 63 str_parms->map = hashmapCreate(5, str_hash_fn, str_eq); 64 if (!str_parms->map) 103 hashmapRemove(ctxt->str_parms->map, key); 115 hashmapForEach(str_parms->map, remove_pair, &ctxt); 124 hashmapForEach(str_parms->map, remove_pair, &ctxt); 125 hashmapFree(str_parms->map); 169 old_val = hashmapPut(str_parms->map, key, value); 215 old_val = hashmapPut(str_parms->map, tmp_key, tmp_val); 266 return hashmapGet(str_parms->map, (voi [all...] |
/system/core/liblog/ |
H A 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); 59 * Open the map file and allocate a structure to manage it. 76 fprintf(stderr, "%s: unable to open map '%s': %s\n", 84 fprintf(stderr, "%s: unable to seek map '%s'\n", OUT_TAG, fileName); 110 * Close the map. 112 void android_closeEventTagMap(EventTagMap* map) argument 114 if (map 126 android_lookupEventTag(const EventTagMap* map, int tag) argument 186 processFile(EventTagMap* map) argument 223 countMapLines(const EventTagMap* map) argument 260 parseMapLines(EventTagMap* map) argument 405 sortTags(EventTagMap* map) argument [all...] |
H A D | logprint.c | 579 AndroidLogEntry *entry, const EventTagMap* map, char* messageBuf, 607 if (map != NULL) { 608 entry->tag = android_lookupEventTag(map, tagIndex); 614 * If we don't have a map, or didn't find the tag number in the map, 578 android_log_processBinaryLogBuffer(struct logger_entry *buf, AndroidLogEntry *entry, const EventTagMap* map, char* messageBuf, int messageBufLen) argument
|
/system/core/libutils/ |
H A D | PropertyMap.cpp | 112 void PropertyMap::addAll(const PropertyMap* map) { argument 113 for (size_t i = 0; i < map->mProperties.size(); i++) { 114 mProperties.add(map->mProperties.keyAt(i), map->mProperties.valueAt(i)); 126 PropertyMap* map = new PropertyMap(); local 127 if (!map) { 128 ALOGE("Error allocating property map."); 134 Parser parser(map, tokenizer); 143 delete map; 145 *outMap = map; 156 Parser(PropertyMap* map, Tokenizer* tokenizer) argument [all...] |
/system/core/libziparchive/ |
H A D | zip_archive.cc | 259 // An I/O related system call (read, lseek, ftruncate, map) failed. 273 * we want to use as little memory as possible. We memory-map the zip 521 android::FileMap* map = MapFileSegment(fd, local 525 if (map == NULL) { 530 archive->directory_map = map; 538 * Find the zip Central Directory and memory-map it. 1134 // Don't attempt to map a region of length 0. We still need the 1141 android::FileMap* map = MapFileSegment(fd, current_offset, declared_length, local 1143 if (map == NULL) { 1148 reinterpret_cast<uint8_t*>(map [all...] |
/system/core/sdcard/ |
H A D | sdcard.c | 1617 Hashmap* map = context; local 1618 hashmapRemove(map, key); 1624 Hashmap* map = context; local 1625 hashmapRemove(map, key);
|
/system/core/toolbox/ |
H A D | load_policy.c | 15 void *map; local 35 map = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0); 36 if (map == MAP_FAILED) { 41 rc = security_load_policy(map, sb.st_size); 46 munmap(map, sb.st_size);
|
H A D | readtty.c | 13 } map[] = { variable in typeref:struct:__anon239 30 for(i = 0; i < sizeof(map) / sizeof(map[0]); i++) { 31 if(key == map[i].key) { 32 next = strchr(map[i].chars, current); 35 return map[i].chars[1]; 45 for(i = 0; i < sizeof(map) / sizeof(map[0]); i++) { 46 if(key == map[i].key) { 47 next = strchr(map[ [all...] |
/system/extras/libpagemap/ |
H A D | pm_map.c | 22 int pm_map_pagemap(pm_map_t *map, uint64_t **pagemap_out, size_t *len) { argument 23 if (!map) 26 return pm_process_pagemap_range(map->proc, map->start, map->end, 30 int pm_map_usage_flags(pm_map_t *map, pm_memusage_t *usage_out, argument 38 if (!map || !usage_out) 41 error = pm_map_pagemap(map, &pagemap, &len); 47 usage.vss += map->proc->ker->pagesize; 55 error = pm_kernel_flags(map 85 pm_map_usage(pm_map_t *map, pm_memusage_t *usage_out) argument 89 pm_map_workingset(pm_map_t *map, pm_memusage_t *ws_out) argument 133 pm_map_destroy(pm_map_t *map) argument [all...] |
H A D | pm_process.c | 248 pm_map_t *map, **maps, **new_maps; local 281 maps[maps_count] = map = calloc(1, sizeof(*map)); 283 map->proc = proc; 287 &map->start, &map->end, perms, &map->offset, name); 289 map->name = malloc(strlen(name) + 1); 290 if (!map->name) { 297 strcpy(map [all...] |
/system/extras/procmem/ |
H A D | procmem.c | 26 pm_map_t *map; member in struct:map_info 164 mi->map = maps[i]; 169 error = pm_map_workingset(mi->map, &mi->usage); 171 error = pm_map_usage(mi->map, &mi->usage); 174 fprintf(stderr, "error getting usage for map.\n"); 182 error = pm_map_pagemap(mi->map, &pagemap, &num_pages); 185 fprintf(stderr, "error getting pagemap for map.\n"); 192 address = pm_map_start(mi->map) + j * ker->pagesize; 253 pm_map_name(mi->map) 265 pm_map_name(mi->map) [all...] |
/system/extras/showmap/ |
H A D | showmap.c | 125 static void enqueue_map(mapinfo **head, mapinfo *map, int sort_by_address, int coalesce_by_name) { argument 129 if (!map) { 134 if (current && coalesce_by_name && !strcmp(map->name, current->name)) { 135 current->size += map->size; 136 current->rss += map->rss; 137 current->pss += map->pss; 138 current->shared_clean += map->shared_clean; 139 current->shared_dirty += map->shared_dirty; 140 current->private_clean += map->private_clean; 141 current->private_dirty += map [all...] |