/system/unwinding/libunwindstack/tests/ |
D | MemoryTest.cpp | 32 MemoryFakeAlwaysReadZero memory; in TEST() local 35 ASSERT_TRUE(memory.Read32(0, &data)); in TEST() 40 MemoryFakeAlwaysReadZero memory; in TEST() local 43 ASSERT_TRUE(memory.Read64(0, &data)); in TEST() 57 MemoryFake memory; in TEST() local 59 memory.SetMemory(100, name.c_str(), name.size() + 1); in TEST() 62 ASSERT_TRUE(memory.ReadString(100, &dst_name, 100)); in TEST() 65 ASSERT_TRUE(memory.ReadString(107, &dst_name, 100)); in TEST() 69 ASSERT_TRUE(memory.ReadString(107, &dst_name, 10)); in TEST() 72 ASSERT_FALSE(memory.ReadString(107, &dst_name, 9)); in TEST() [all …]
|
D | DexFileTest.cpp | 62 MemoryFake memory; in TEST() local 64 EXPECT_TRUE(DexFile::Create(0, sizeof(kDexData), &memory, &info) != nullptr); in TEST() 70 MemoryFake memory; in TEST() local 72 memory.SetMemory(0x1000, kDexData, sizeof(kDexData)); in TEST() 77 EXPECT_TRUE(DexFile::Create(0x1000, sizeof(kDexData), &memory, nullptr) != nullptr); in TEST() 90 MemoryFake memory; in TEST() local 92 EXPECT_TRUE(DexFile::Create(0x500, sizeof(kDexData), &memory, &info) != nullptr); in TEST() 103 MemoryFake memory; in TEST() local 105 EXPECT_TRUE(DexFile::Create(0x600, sizeof(kDexData), &memory, &info) != nullptr); in TEST() 116 MemoryFake memory; in TEST() local [all …]
|
D | MemoryOfflineTest.cpp | 37 memory = std::make_unique<MemoryOffline>(); in SetUp() 38 ASSERT_TRUE(memory != nullptr); in SetUp() 40 ASSERT_TRUE(memory->Init(temp_file.path, 0)); in SetUp() 46 std::unique_ptr<MemoryOffline> memory; member in unwindstack::MemoryOfflineTest 51 ASSERT_EQ(0U, memory->Read(offset - 1, &buf, 1)); in TEST_F() 52 ASSERT_EQ(0U, memory->Read(offset + data.size(), &buf, 1)); in TEST_F() 53 ASSERT_EQ(1U, memory->Read(offset, &buf, 1)); in TEST_F() 55 ASSERT_EQ(1U, memory->Read(offset + data.size() - 1, &buf, 1)); in TEST_F() 62 ASSERT_EQ(data.size(), memory->Read(offset, buf.data(), buf.size())); in TEST_F()
|
D | MapInfoCreateMemoryTest.cpp | 94 std::unique_ptr<Memory> memory(info.CreateMemory(process_memory_)); in TEST_F() local 95 ASSERT_TRUE(memory.get() == nullptr); in TEST_F() 98 memory.reset(info.CreateMemory(process_memory_)); in TEST_F() 99 ASSERT_TRUE(memory.get() == nullptr); in TEST_F() 103 memory.reset(info.CreateMemory(process_memory_)); in TEST_F() 104 ASSERT_TRUE(memory.get() != nullptr); in TEST_F() 113 std::unique_ptr<Memory> memory(info.CreateMemory(process_memory_)); in TEST_F() local 114 ASSERT_TRUE(memory.get() != nullptr); in TEST_F() 121 ASSERT_TRUE(memory->ReadFully(0, buffer.data(), 1024)); in TEST_F() 128 ASSERT_FALSE(memory->ReadFully(1024, buffer.data(), 1)); in TEST_F() [all …]
|
D | GlobalDebugImplTest.cpp | 35 std::shared_ptr<Memory> memory; in TEST() local 37 GlobalDebugImpl<Elf, uint64_t, Uint64_P> debug(ARCH_X86_64, memory, libs, nullptr); in TEST() 44 std::shared_ptr<Memory> memory; in TEST() local 46 GlobalDebugImpl<Elf, uint64_t, Uint64_P> debug(ARCH_ARM64, memory, libs, nullptr); in TEST()
|
D | ElfFake.h | 52 ElfFake(Memory* memory) : Elf(memory) { valid_ = true; } in ElfFake() argument 69 ElfInterfaceFake(Memory* memory) : ElfInterface(memory) {} in ElfInterfaceFake() argument 125 ElfInterface32Fake(Memory* memory) : ElfInterface32(memory) {} in ElfInterface32Fake() argument 136 ElfInterface64Fake(Memory* memory) : ElfInterface64(memory) {} in ElfInterface64Fake() argument 147 ElfInterfaceArmFake(Memory* memory) : ElfInterfaceArm(memory) {} in ElfInterfaceArmFake() argument
|
D | MemoryRangesTest.cpp | 31 MemoryFake* memory = new MemoryFake; in SetUp() local 32 process_memory_.reset(memory); in SetUp() 33 memory->SetMemoryBlock(1000, 5000, 0x15); in SetUp() 34 memory->SetMemoryBlock(6000, 12000, 0x26); in SetUp() 35 memory->SetMemoryBlock(14000, 20000, 0x37); in SetUp() 36 memory->SetMemoryBlock(20000, 22000, 0x48); in SetUp()
|
D | MemoryFake.cpp | 37 void MemoryFake::SetMemory(uint64_t addr, const void* memory, size_t length) { in SetMemory() argument 38 const uint8_t* src = reinterpret_cast<const uint8_t*>(memory); in SetMemory() 49 size_t MemoryFake::Read(uint64_t addr, void* memory, size_t size) { in Read() argument 50 uint8_t* dst = reinterpret_cast<uint8_t*>(memory); in Read()
|
D | DwarfDebugFrameTest.cpp | 51 static void SetCie32(MemoryFake* memory, uint64_t offset, uint32_t length, in SetCie32() argument 53 memory->SetData32(offset, length); in SetCie32() 56 memory->SetData32(offset, 0xffffffff); in SetCie32() 58 memory->SetMemory(offset, data); in SetCie32() 61 static void SetCie64(MemoryFake* memory, uint64_t offset, uint64_t length, in SetCie64() argument 63 memory->SetData32(offset, 0xffffffff); in SetCie64() 65 memory->SetData64(offset, length); in SetCie64() 68 memory->SetData64(offset, 0xffffffffffffffffUL); in SetCie64() 70 memory->SetMemory(offset, data); in SetCie64() 73 static void SetFde32(MemoryFake* memory, uint64_t offset, uint32_t length, uint64_t cie_offset, in SetFde32() argument [all …]
|
/system/libhidl/transport/allocator/1.0/vts/functional/ |
D | VtsHidlAllocatorV1_0TargetTest.cpp | 31 using ::android::hidl::memory::V1_0::IMemory; 44 sp<IMemory> memory; in expectAllocateSuccess() local 49 memory = mapMemory(mem); in expectAllocateSuccess() 51 EXPECT_NE(nullptr, memory.get()); in expectAllocateSuccess() 52 EXPECT_EQ(memory->getSize(), size) in expectAllocateSuccess() 53 << "Allocated " << size << " but got IMemory with size " << memory->getSize(); in expectAllocateSuccess() 54 return memory; in expectAllocateSuccess() 71 for (const sp<IMemory>& memory : memories) { in expectBatchAllocateSuccess() local 72 EXPECT_NE(nullptr, memory.get()); in expectBatchAllocateSuccess() 73 EXPECT_EQ(memory->getSize(), size) in expectBatchAllocateSuccess() [all …]
|
/system/unwinding/libunwindstack/tests/fuzz/ |
D | UnwinderComponentCreator.cpp | 185 void WriteDescriptor32(MemoryFake* memory, uint64_t addr, uint32_t entry) { in WriteDescriptor32() argument 188 memory->SetData32(addr, 1); in WriteDescriptor32() 190 memory->SetData32(addr + 4, 0); in WriteDescriptor32() 192 memory->SetData32(addr + 8, 0); in WriteDescriptor32() 194 memory->SetData32(addr + 12, entry); in WriteDescriptor32() 197 void WriteDescriptor64(MemoryFake* memory, uint64_t addr, uint64_t entry) { in WriteDescriptor64() argument 200 memory->SetData32(addr, 1); in WriteDescriptor64() 202 memory->SetData32(addr + 4, 0); in WriteDescriptor64() 204 memory->SetData64(addr + 8, 0); in WriteDescriptor64() 206 memory->SetData64(addr + 16, entry); in WriteDescriptor64() [all …]
|
/system/unwinding/libunwindstack/ |
D | MapInfo.cpp | 37 bool MapInfo::InitFileMemoryFromPreviousReadOnlyMap(MemoryFileAtOffset* memory) { in InitFileMemoryFromPreviousReadOnlyMap() argument 45 if (!memory->Init(name(), prev_real_map()->offset(), map_size)) { in InitFileMemoryFromPreviousReadOnlyMap() 50 if (!Elf::GetInfo(memory, &max_size) || max_size < map_size) { in InitFileMemoryFromPreviousReadOnlyMap() 54 if (!memory->Init(name(), prev_real_map()->offset(), max_size)) { in InitFileMemoryFromPreviousReadOnlyMap() 64 std::unique_ptr<MemoryFileAtOffset> memory(new MemoryFileAtOffset); in GetFileMemory() local 66 if (memory->Init(name(), 0)) { in GetFileMemory() 67 return memory.release(); in GetFileMemory() 87 if (!memory->Init(name(), offset(), map_size)) { in GetFileMemory() 93 if (Elf::GetInfo(memory.get(), &max_size)) { in GetFileMemory() 96 if (memory->Init(name(), offset(), max_size)) { in GetFileMemory() [all …]
|
D | Elf.cpp | 205 bool Elf::IsValidElf(Memory* memory) { in IsValidElf() argument 206 if (memory == nullptr) { in IsValidElf() 212 if (!memory->ReadFully(0, e_ident, SELFMAG)) { in IsValidElf() 222 bool Elf::GetInfo(Memory* memory, uint64_t* size) { in GetInfo() argument 223 if (!IsValidElf(memory)) { in GetInfo() 229 if (!memory->ReadFully(EI_CLASS, &class_type, 1)) { in GetInfo() 235 ElfInterface32::GetMaxSize(memory, size); in GetInfo() 237 ElfInterface64::GetMaxSize(memory, size); in GetInfo() 278 ElfInterface* Elf::CreateInterfaceFromMemory(Memory* memory) { in CreateInterfaceFromMemory() argument 279 if (!IsValidElf(memory)) { in CreateInterfaceFromMemory() [all …]
|
D | JitDebug.cpp | 27 bool GlobalDebugInterface<Elf>::Load(Maps*, std::shared_ptr<Memory>& memory, uint64_t addr, in Load() argument 30 if (!copy->Resize(size) || !memory->ReadFully(addr, copy->GetPtr(0), size)) { in Load() 37 std::unique_ptr<JitDebug> CreateJitDebug(ArchEnum arch, std::shared_ptr<Memory>& memory, in CreateJitDebug() argument 39 return CreateGlobalDebugImpl<Elf>(arch, memory, search_libs, "__jit_debug_descriptor"); in CreateJitDebug()
|
D | DexFiles.cpp | 30 bool GlobalDebugInterface<DexFile>::Load(Maps* maps, std::shared_ptr<Memory>& memory, uint64_t addr, in Load() argument 32 dex = DexFile::Create(addr, size, memory.get(), maps->Find(addr)); in Load() 36 std::unique_ptr<DexFiles> CreateDexFiles(ArchEnum arch, std::shared_ptr<Memory>& memory, in CreateDexFiles() argument 38 return CreateGlobalDebugImpl<DexFile>(arch, memory, search_libs, "__dex_debug_descriptor"); in CreateDexFiles()
|
D | MemoryCache.h | 34 MemoryCacheBase(Memory* memory) : impl_(memory) {} in MemoryCacheBase() argument 67 MemoryCache(Memory* memory) : MemoryCacheBase(memory) {} in MemoryCache() argument 82 MemoryThreadCache(Memory* memory);
|
/system/libhidl/transport/allocator/1.0/ |
D | IAllocator.hal | 20 * Interface which allocates the required memory. 25 * Return memory must have instance name corresponding to this type of memory. 27 * @param size Size of memory to allocate in bytes. 29 * @return memory Unmapped memory object. 31 allocate(uint64_t size) generates (bool success, memory mem); 34 * Return memory must have instance name corresponding to this type of memory. 36 * @param size Size of memory to allocate in bytes. 37 * @param count Number of memory instances to allocate. 39 * @return batch Unmapped memory objects. 41 batchAllocate(uint64_t size, uint64_t count) generates (bool success, vec<memory> batch);
|
/system/libhidl/libhidlmemory/ |
D | mapping.cpp | 30 using android::hidl::memory::V1_0::IMemory; 31 using android::hidl::memory::V1_0::IMapper; 53 sp<IMemory> mapMemory(const hidl_memory& memory) { in mapMemory() argument 55 sp<IMapper> mapper = getMapperService(memory.name()); in mapMemory() 58 LOG(ERROR) << "Could not fetch mapper for " << memory.name() << " shared memory"; in mapMemory() 70 if (memory.size() > SIZE_MAX) { in mapMemory() 71 LOG(ERROR) << "Cannot map " << memory.size() << " bytes of memory because it is too large."; in mapMemory() 76 Return<sp<IMemory>> ret = mapper->mapMemory(memory); in mapMemory()
|
/system/extras/memory_replay/ |
D | Alloc.cpp | 102 void* memory = malloc(entry.size); in MallocExecute() local 103 MakeAllocationResident(memory, entry.size, pagesize); in MallocExecute() 106 pointers->Add(entry.ptr, memory); in MallocExecute() 114 void* memory = calloc(entry.u.n_elements, entry.size); in CallocExecute() local 115 MakeAllocationResident(memory, entry.u.n_elements * entry.size, pagesize); in CallocExecute() 118 pointers->Add(entry.ptr, memory); in CallocExecute() 131 void* memory = realloc(old_memory, entry.size); in ReallocExecute() local 132 MakeAllocationResident(memory, entry.size, pagesize); in ReallocExecute() 135 pointers->Add(entry.ptr, memory); in ReallocExecute() 143 void* memory = memalign(entry.u.align, entry.size); in MemalignExecute() local [all …]
|
/system/libhidl/transport/allocator/1.0/default/ |
D | AshmemAllocator.cpp | 44 static void cleanup(hidl_memory&& memory) { in cleanup() argument 45 if (memory.handle() == nullptr) { in cleanup() 49 native_handle_close(const_cast<native_handle_t *>(memory.handle())); in cleanup() 50 native_handle_delete(const_cast<native_handle_t *>(memory.handle())); in cleanup() 54 hidl_memory memory = allocateOne(size); in allocate() local 55 _hidl_cb(memory.handle() != nullptr /* success */, memory); in allocate() 56 cleanup(std::move(memory)); in allocate()
|
/system/unwinding/libunwindstack/include/unwindstack/ |
D | Elf.h | 45 Elf(Memory* memory) : memory_(memory) {} in Elf() argument 67 ElfInterface* CreateInterfaceFromMemory(Memory* memory); 89 Memory* memory() { return memory_.get(); } in memory() function 95 static bool IsValidElf(Memory* memory); 97 static bool GetInfo(Memory* memory, uint64_t* size); 99 static int64_t GetLoadBias(Memory* memory); 101 static std::string GetBuildID(Memory* memory);
|
/system/libhidl/transport/memory/token/1.0/ |
D | IMemoryToken.hal | 16 package android.hidl.memory.token@1.0; 19 * Interface which composes shared memory 23 * The returned instance of memory must always be a reference to the same memory. 26 get() generates (memory mem);
|
/system/libhidl/ |
D | CleanSpec.mk | 47 $(call add-clean-step, rm -f $(PRODUCT_OUT)/system/bin/hw/android.hidl.memory@1.0-service) 48 $(call add-clean-step, rm -f $(PRODUCT_OUT)/system/etc/init/android.hidl.memory@1.0-service.rc) 51 $(call add-clean-step, rm -f $(PRODUCT_OUT)/system/lib/hw/android.hidl.memory@1.0-impl.so)
|
/system/unwinding/libunwindstack/tools/ |
D | unwind_reg_info.cpp | 52 void PrintExpression(Memory* memory, uint8_t class_type, uint64_t end, uint64_t length) { in PrintExpression() argument 54 DwarfMemory dwarf_memory(memory); in PrintExpression() 67 void PrintRegInformation(DwarfSection* section, Memory* memory, uint64_t pc, uint8_t class_type, in PrintRegInformation() argument 122 PrintExpression(memory, class_type, loc->values[1], loc->values[0]); in PrintRegInformation() 128 PrintExpression(memory, class_type, loc->values[1], loc->values[0]); in PrintRegInformation() 155 ArmExidx arm(nullptr, interface->memory(), nullptr); in PrintArmRegInformation() 208 PrintRegInformation(section, elf.memory(), pc, elf.class_type(), elf.arch()); in GetInfo() 216 PrintRegInformation(section, elf.memory(), pc, elf.class_type(), elf.arch()); in GetInfo() 228 PrintRegInformation(section, gnu_debugdata_interface->memory(), pc, elf.class_type(), in GetInfo() 238 PrintRegInformation(section, gnu_debugdata_interface->memory(), pc, elf.class_type(), in GetInfo()
|
/system/libhidl/transport/memory/1.0/default/ |
D | AshmemMemory.cpp | 23 namespace memory { namespace 27 AshmemMemory::AshmemMemory(const hidl_memory& memory, void* data) in AshmemMemory() argument 28 : mMemory(memory), in AshmemMemory()
|