/system/extras/memory_replay/tests/ |
D | AllocTest.cpp | 27 AllocEntry entry; in TEST() local 28 AllocGetData(line, &entry); in TEST() 29 EXPECT_EQ(MALLOC, entry.type); in TEST() 30 EXPECT_EQ(1234, entry.tid); in TEST() 31 EXPECT_EQ(0xabd0000U, entry.ptr); in TEST() 32 EXPECT_EQ(20U, entry.size); in TEST() 33 EXPECT_EQ(0U, entry.u.align); in TEST() 38 AllocEntry entry; in TEST() local 39 EXPECT_DEATH(AllocGetData(line, &entry), ""); in TEST() 42 EXPECT_DEATH(AllocGetData(line, &entry), ""); in TEST() [all …]
|
/system/core/fs_mgr/tests/ |
D | fs_mgr_test.cpp | 296 auto& entry = fstab[i]; in TEST() local 298 EXPECT_EQ(mentry->mnt_fsname, entry.blk_device); in TEST() 299 EXPECT_EQ(mentry->mnt_dir, entry.mount_point); in TEST() 300 EXPECT_EQ(mentry->mnt_type, entry.fs_type); in TEST() 307 if (!entry.fs_options.empty()) { in TEST() 308 for (auto& s : android::base::Split(entry.fs_options, ",")) { in TEST() 336 if (mount_flags[f].flag & entry.flags) { in TEST() 340 if (!(entry.flags & MS_RDONLY)) { in TEST() 375 FstabEntry* entry = GetEntryForMountPoint(&fstab, "/"); in TEST() local 376 ASSERT_NE(nullptr, entry); in TEST() [all …]
|
/system/extras/memory_replay/ |
D | Alloc.cpp | 27 bool AllocDoesFree(const AllocEntry& entry) { in AllocDoesFree() argument 28 switch (entry.type) { in AllocDoesFree() 36 return entry.ptr != 0; in AllocDoesFree() 39 return entry.u.old_ptr != 0; in AllocDoesFree() 43 static uint64_t MallocExecute(const AllocEntry& entry, Pointers* pointers) { in MallocExecute() argument 46 void* memory = malloc(entry.size); in MallocExecute() 47 MakeAllocationResident(memory, entry.size, pagesize); in MallocExecute() 50 pointers->Add(entry.ptr, memory); in MallocExecute() 55 static uint64_t CallocExecute(const AllocEntry& entry, Pointers* pointers) { in CallocExecute() argument 58 void* memory = calloc(entry.u.n_elements, entry.size); in CallocExecute() [all …]
|
D | FilterTrace.cpp | 111 static void PrintEntry(const AllocEntry& entry, size_t size, bool print_trace_format) { in PrintEntry() argument 113 switch (entry.type) { in PrintEntry() 115 if (entry.u.old_ptr == 0) { in PrintEntry() 117 printf("%d: malloc %p %zu\n", entry.tid, reinterpret_cast<void*>(entry.ptr), entry.size); in PrintEntry() 119 printf("%d: realloc %p %p %zu\n", entry.tid, reinterpret_cast<void*>(entry.ptr), in PrintEntry() 120 reinterpret_cast<void*>(entry.u.old_ptr), entry.size); in PrintEntry() 124 printf("%d: malloc %p %zu\n", entry.tid, reinterpret_cast<void*>(entry.ptr), entry.size); in PrintEntry() 127 printf("%d: memalign %p %zu %zu\n", entry.tid, reinterpret_cast<void*>(entry.ptr), in PrintEntry() 128 entry.u.align, entry.size); in PrintEntry() 131 printf("%d: calloc %p %zu %zu\n", entry.tid, reinterpret_cast<void*>(entry.ptr), in PrintEntry() [all …]
|
D | AllocParser.cpp | 25 void AllocGetData(const std::string& line, AllocEntry* entry) { in AllocGetData() argument 34 if (sscanf(line.c_str(), "%d: %127s %" SCNx64 " %n", &entry->tid, name, &entry->ptr, in AllocGetData() 40 entry->type = THREAD_DONE; in AllocGetData() 47 if (sscanf(args_beg, "%zu%n", &entry->size, &args_offset) != 1) { in AllocGetData() 50 entry->type = MALLOC; in AllocGetData() 54 entry->type = FREE; in AllocGetData() 58 if (sscanf(args_beg, "%" SCNd64 " %zu%n", &entry->u.n_elements, &entry->size, in AllocGetData() 62 entry->type = CALLOC; in AllocGetData() 66 if (sscanf(args_beg, "%" SCNx64 " %zu%n", &entry->u.old_ptr, &entry->size, in AllocGetData() 70 entry->type = REALLOC; in AllocGetData() [all …]
|
D | TraceBenchmark.cpp | 102 AllocEntry* entry = &trace_data->entries[i]; in GetTraceData() local 103 switch (entry->type) { in GetTraceData() 108 ptr_to_index[entry->ptr] = idx; in GetTraceData() 109 entry->ptr = idx; in GetTraceData() 113 if (entry->u.old_ptr != 0) { in GetTraceData() 114 auto idx_entry = ptr_to_index.find(entry->u.old_ptr); in GetTraceData() 116 errx(1, "File Error: Failed to find realloc pointer %" PRIx64, entry->u.old_ptr); in GetTraceData() 121 entry->u.old_ptr = old_pointer_idx + 1; in GetTraceData() 124 ptr_to_index[entry->ptr] = idx; in GetTraceData() 125 entry->ptr = idx; in GetTraceData() [all …]
|
/system/core/fs_mgr/ |
D | fs_mgr_overlayfs_mount.cpp | 132 static bool fs_mgr_update_blk_device(FstabEntry* entry) { in fs_mgr_update_blk_device() argument 133 if (entry->fs_mgr_flags.logical) { in fs_mgr_update_blk_device() 134 fs_mgr_update_logical_partition(entry); in fs_mgr_update_blk_device() 136 if (access(entry->blk_device.c_str(), F_OK) == 0) { in fs_mgr_update_blk_device() 139 if (entry->blk_device != "/dev/root") { in fs_mgr_update_blk_device() 151 entry->blk_device = blk_device; in fs_mgr_update_blk_device() 195 static bool fs_mgr_overlayfs_enabled(FstabEntry* entry) { in fs_mgr_overlayfs_enabled() argument 199 if (!fs_mgr_filesystem_has_space(entry->mount_point)) { in fs_mgr_overlayfs_enabled() 205 if (!fs_mgr_update_blk_device(entry)) { in fs_mgr_overlayfs_enabled() 210 if (fs_mgr_is_read_only_f2fs(entry->blk_device)) { in fs_mgr_overlayfs_enabled() [all …]
|
D | fs_mgr.cpp | 371 static void tune_quota(const std::string& blk_device, const FstabEntry& entry, in tune_quota() argument 374 bool want_quota = entry.fs_mgr_flags.quota; in tune_quota() 412 static void tune_reserved_size(const std::string& blk_device, const FstabEntry& entry, in tune_reserved_size() argument 414 if (entry.reserved_size == 0) { in tune_reserved_size() 421 uint64_t reserved_blocks = entry.reserved_size / EXT4_BLOCK_SIZE(sb); in tune_reserved_size() 454 static void tune_encrypt(const std::string& blk_device, const FstabEntry& entry, in tune_encrypt() argument 456 if (!entry.fs_mgr_flags.file_encryption) { in tune_encrypt() 464 if (!android::fscrypt::ParseOptions(entry.encryption_options, &options)) { in tune_encrypt() 466 << entry.encryption_options; in tune_encrypt() 499 static void tune_verity(const std::string& blk_device, const FstabEntry& entry, in tune_verity() argument [all …]
|
/system/media/camera/docs/ |
D | metadata_validate.py | 43 def fully_qualified_name(entry): argument 60 parents = [i['name'] for i in entry.parents if i.name in filter_tags] 62 if entry.name == 'entry': 63 name = entry['name'] 64 elif entry.name == 'clone': 65 name = entry['entry'].split(".")[-1] # "a.b.c" => "c" 68 %(entry.name, entry)) 267 for entry in soup.find_all("entry"): 268 entry_container = entry.attrs.get('container') 271 container_tag = entry.find(entry_container) [all …]
|
D | metadata_parser_xml.py | 142 for entry in self.soup.find_all(entry_filter): 143 if entry.name == 'entry': 145 'name': fully_qualified_name(entry), 146 'type': entry['type'], 147 'kind': find_kind(entry), 148 'type_notes': entry.attrs.get('type_notes') 151 d2 = self._parse_entry(entry) 155 'name': entry['entry'], 156 'kind': find_kind(entry), 157 'target_kind': entry['kind'], [all …]
|
D | metadata_helpers.py | 97 def find_parent_section(entry): argument 107 return entry.find_parent_first(_is_sec_or_ins) 134 for entry in i.entries: 135 d[entry.name] = entry 180 def protobuf_type(entry): argument 189 if entry.typedef is None: 190 typeName = entry.type 192 typeName = entry.typedef.name 224 (entry.name, entry.type, entry.typedef), file=sys.stderr) 229 if entry.container == 'array': [all …]
|
D | CameraMetadataKeys.mako | 29 <%def name="generate_key(entry)">\ 34 if entry.description: 35 description = dedent(entry.description) + "\n\n" 37 if entry.details: 38 details = dedent(entry.details) 40 extra_detail = generate_extra_javadoc_detail(entry)("") 47 % if entry.enum and not (entry.typedef and entry.typedef.languages.get('java')): 48 % for value in entry.enum.values: 49 % if not value.hidden and (value.aconfig_flag == entry.aconfig_flag): 50 * @see #${jenum_value(entry, value)} [all …]
|
D | ndk_camera_metadata_tags.mako | 61 def annotated_type(entry): 62 type = entry.type 63 if entry.container == 'array': 64 type += '[' + '*'.join(entry.container_sizes) + ']' 65 if entry.enum: 66 type += ' (acamera_metadata_enum_%s_t)'%(csym(entry.name).lower()) 102 % for idx,entry in enumerate(remove_synthetic(find_unique_entries(sec))): 103 % if entry.applied_ndk_visible == "true": 104 % if entry.deprecated: 105 ${ndk(entry.name) + " = " | csym,ljust(60)}// Deprecated! DO NOT USE [all …]
|
D | HidlMetadata.mako | 18 def annotated_type(entry): 19 if entry.enum: 22 type = entry.type 23 if entry.container == 'array': 28 def annotated_enum_type(entry): 29 if entry.type == 'int64' and entry.container == 'array': 108 …% for idx,entry in enumerate(filter_added_in_hal_version(remove_hal_non_visible(find_unique_entrie… 110 /** ${entry.name} [${entry.kind}, ${annotated_type(entry)}, ${entry.applied_visibility}] 111 % if entry.description: 113 ${entry.description | hidldoc(metadata)}\ [all …]
|
/system/unwinding/libunwindstack/tests/ |
D | ElfFake.cpp | 40 auto& entry = functions_.front(); in GetFunctionName() local 41 *name = SharedString(std::move(entry.name)); in GetFunctionName() 42 *offset = entry.offset; in GetFunctionName() 48 auto entry = globals_.find(global); in GetGlobalVariable() local 49 if (entry == globals_.end()) { in GetGlobalVariable() 52 *offset = entry->second; in GetGlobalVariable() 60 auto entry = steps_.front(); in Step() local 63 if (entry.pc == 0 && entry.sp == 0 && !entry.finished) { in Step() 69 fake_regs->set_pc(entry.pc); in Step() 70 fake_regs->set_sp(entry.sp); in Step() [all …]
|
/system/core/fs_mgr/libfstab/ |
D | fstab.cpp | 106 void ParseFileEncryption(const std::string& arg, FstabEntry* entry) { in ParseFileEncryption() argument 107 entry->fs_mgr_flags.file_encryption = true; in ParseFileEncryption() 108 entry->encryption_options = arg; in ParseFileEncryption() 111 bool SetMountFlag(const std::string& flag, FstabEntry* entry) { in SetMountFlag() argument 114 entry->flags |= value; in SetMountFlag() 121 void ParseMountFlags(const std::string& flags, FstabEntry* entry) { in ParseMountFlags() argument 124 if (!SetMountFlag(flag, entry)) { in ParseMountFlags() 133 if (entry->fs_type == "f2fs" && StartsWith(flag, "reserve_root=")) { in ParseMountFlags() 139 entry->reserved_size = size_in_4k_blocks << 12; in ParseMountFlags() 142 entry->lowerdir = arg; in ParseMountFlags() [all …]
|
/system/core/libcutils/ |
D | hashmap.cpp | 114 Entry* entry = map->buckets[i]; in expandIfNecessary() local 115 while (entry != NULL) { in expandIfNecessary() 116 Entry* next = entry->next; in expandIfNecessary() 117 size_t index = calculateIndex(newBucketCount, entry->hash); in expandIfNecessary() 118 entry->next = newBuckets[index]; in expandIfNecessary() 119 newBuckets[index] = entry; in expandIfNecessary() 120 entry = next; in expandIfNecessary() 142 Entry* entry = map->buckets[i]; in hashmapFree() local 143 while (entry != NULL) { in hashmapFree() 144 Entry* next = entry->next; in hashmapFree() [all …]
|
/system/libziparchive/ |
D | ziptool.cpp | 223 static void TestOne(ZipArchiveHandle zah, const ZipEntry64& entry, const std::string& name) { in TestOne() argument 226 int err = ExtractToWriter(zah, &entry, &writer); in TestOne() 230 if (writer.crc == entry.crc32) { in TestOne() 234 printf("bad CRC %08" PRIx32 " (should be %08" PRIx32 ")\n", writer.crc, entry.crc32); in TestOne() 240 static void ExtractToPipe(ZipArchiveHandle zah, const ZipEntry64& entry, const std::string& name) { in ExtractToPipe() argument 243 if (entry.uncompressed_length > SIZE_MAX) { in ExtractToPipe() 244 die(0, "entry size %" PRIu64 " is too large to extract.", entry.uncompressed_length); in ExtractToPipe() 246 auto uncompressed_length = static_cast<size_t>(entry.uncompressed_length); in ExtractToPipe() 248 int err = ExtractToMemory(zah, &entry, buffer, uncompressed_length); in ExtractToPipe() 258 static void ExtractOne(ZipArchiveHandle zah, const ZipEntry64& entry, std::string name) { in ExtractOne() argument [all …]
|
/system/core/libutils/include/utils/ |
D | LruCache.h | 88 size_t operator() (const KeyedEntry* entry) const { in operator() 89 return hash_type(entry->getKey()); in operator() 103 void attachToCache(Entry& entry); 104 void detachFromCache(Entry& entry); 197 Entry *entry = reinterpret_cast<Entry*>(*find_result); in get() local 198 detachFromCache(*entry); in get() 199 attachToCache(*entry); in get() 200 return entry->value; in get() 227 Entry* entry = reinterpret_cast<Entry*>(*find_result); in remove() local 228 mSet->erase(entry); in remove() [all …]
|
/system/update_engine/scripts/ |
D | trim_ota_package.py | 7 def readPayloadMetadata(zfp: zipfile.ZipFile, entry): argument 12 with zfp.open(entry) as fp: 29 for entry in inzfp.infolist(): 30 …if entry.filename.startswith("META") or entry.filename.endswith(".map") or entry.filename.endswith… 31 outzfp.writestr(entry, inzfp.read(entry)) 32 elif entry.filename == "payload.bin": 33 outzfp.writestr(entry, readPayloadMetadata(inzfp, entry))
|
/system/media/camera/docs/aidl/ |
D | CameraMetadataTag.mako | 18 def annotated_type(entry): 19 if entry.enum: 22 type = entry.type 23 if entry.container == 'array': 28 def annotated_enum_type(entry): 29 if entry.type == 'int64' and entry.container == 'array': 59 % for idx,entry in enumerate(remove_synthetic(find_unique_entries(sec))): 60 % if entry.visibility in ('fwk_only', 'fwk_java_public'): 66 * ${entry.name} [${entry.kind}, ${annotated_type(entry)}, ${entry.applied_visibility}] 67 % if entry.description: [all …]
|
/system/unwinding/libunwindstack/ |
D | ThreadUnwinder.cpp | 49 ThreadEntry* entry = ThreadEntry::Get(android::base::GetThreadId(), false); in SignalHandler() local 50 if (!entry) { in SignalHandler() 54 entry->CopyUcontextFromSigcontext(sigcontext); in SignalHandler() 57 entry->Wake(); in SignalHandler() 62 if (entry->Wait(WAIT_FOR_UNWIND_TO_COMPLETE)) { in SignalHandler() 65 entry->Wake(); in SignalHandler() 90 ThreadEntry* entry = ThreadEntry::Get(tid); in SendSignalToThread() local 91 entry->Lock(); in SendSignalToThread() 98 ThreadEntry::Remove(entry); in SendSignalToThread() 113 ThreadEntry::Remove(entry); in SendSignalToThread() [all …]
|
/system/logging/logd/ |
D | SerializedLogBuffer.cpp | 62 for (const auto& entry : *chunk) { in ClearLogsByUid() 63 if (entry.uid() == uid) { in ClearLogsByUid() 78 for (const auto& entry : *chunk) { in ClearLogsByUid() 79 if (entry.uid() == uid) { in ClearLogsByUid() 81 stats->Subtract(entry.ToLogStatisticsElement(log_id)); in ClearLogsByUid() 84 LogToLogBuffer(new_logs, max_size, entry.sequence(), entry.realtime(), entry.uid(), in ClearLogsByUid() 85 entry.pid(), entry.tid(), entry.msg(), entry.msg_len()); in ClearLogsByUid() 154 auto entry = LogToLogBuffer(logs_[log_id], max_size_[log_id], sequence, realtime, uid, pid, tid, in Log() local 156 stats_->Add(entry->ToLogStatisticsElement(log_id)); in Log() 179 for (const auto& entry : chunk) { in RemoveChunkFromStats() local [all …]
|
/system/core/init/ |
D | mount_handler.cpp | 61 auto entry = GetEntryForMountPoint(&fstab, "/"); in ParseMount() local 62 if (entry || (entry = GetEntryForMountPoint(&fstab, "/system"))) { in ParseMount() 63 fields[0] = entry->blk_device; in ParseMount() 97 for (const auto& entry : std::filesystem::directory_iterator("/sys/block", ec)) { in GetRootDisk() local 98 const std::string path = entry.path().string(); in GetRootDisk() 106 void SetMountProperty(const MountHandlerEntry& entry, bool add) { in SetMountProperty() argument 108 if (!android::base::StartsWith(entry.blk_device, devblock)) return; in SetMountProperty() 109 auto target = entry.blk_device.substr(strlen(devblock)); in SetMountProperty() 116 if (stat(entry.mount_point.c_str(), &sb) || !S_ISDIR(sb.st_mode)) rootdisk = ""; in SetMountProperty() 119 if (android::base::StartsWith(entry.mount_point, "/apex/")) rootdisk = ""; in SetMountProperty() [all …]
|
/system/gsid/tests/ |
D | boot_tests.cpp | 55 auto entry = GetEntryForMountPoint(&fstab, "/metadata"); in TEST() local 56 ASSERT_NE(entry, nullptr); in TEST() 59 auto entry = GetEntryForMountPoint(&fstab, "/metadata"); in TEST() local 60 ASSERT_NE(entry, nullptr); in TEST() 61 EXPECT_TRUE(entry->fs_mgr_flags.first_stage_mount); in TEST() 76 auto entry = GetEntryForMountPoint(&fstab, "/metadata"); in TEST() local 77 ASSERT_NE(entry, nullptr); in TEST() 79 unique_fd fd(open(entry->blk_device.c_str(), O_RDONLY | O_CLOEXEC)); in TEST() 126 auto entry = GetEntryForMountPoint(&fstab, mount_point); in TEST() local 127 ASSERT_NE(entry, nullptr); in TEST() [all …]
|