/aosp12/packages/modules/NeuralNetworks/common/ |
H A D | SharedMemoryAndroid.cpp | 53 auto handle = Memory::Fd{ in createSharedMemoryFromUniqueFd() 59 return std::make_shared<const Memory>(Memory{.handle = std::move(handle)}); in createSharedMemoryFromUniqueFd() 109 auto handle = Memory::Ashmem{ in allocateSharedMemory() 113 return std::make_shared<const Memory>(Memory{.handle = std::move(handle)}); in allocateSharedMemory() 169 size_t getSize(const Memory::Ashmem& memory) { in getSize() 173 size_t getSize(const Memory::Fd& memory) { in getSize() 177 size_t getSize(const Memory::HardwareBuffer& memory) { in getSize() 183 size_t getSize(const Memory::Unknown& memory) { in getSize() 192 GeneralResult<Mapping> map(const Memory::Fd& memory) { in map() 275 Memory::HardwareBuffer handle = {.handle = Memory::HardwareBuffer::Handle(ahwb, deleter)}; in createSharedMemoryFromAHWB() [all …]
|
/aosp12/hardware/interfaces/neuralnetworks/aidl/utils/src/ |
H A D | Utils.cpp | 62 nn::GeneralResult<Memory> clone(const Memory& memory) { in clone() 64 case Memory::Tag::ashmem: { in clone() 65 const auto& ashmem = memory.get<Memory::Tag::ashmem>(); in clone() 70 return Memory::make<Memory::Tag::ashmem>(std::move(handle)); in clone() 72 case Memory::Tag::mappableFile: { in clone() 73 const auto& memFd = memory.get<Memory::Tag::mappableFile>(); in clone() 80 return Memory::make<Memory::Tag::mappableFile>(std::move(handle)); in clone() 82 case Memory::Tag::hardwareBuffer: { in clone() 83 const auto& hardwareBuffer = memory.get<Memory::Tag::hardwareBuffer>(); in clone() 88 return Memory::make<Memory::Tag::hardwareBuffer>(std::move(handle)); in clone() [all …]
|
H A D | Conversions.cpp | 351 using Tag = aidl_hal::Memory::Tag; in unvalidatedConvert() 360 auto handle = Memory::Ashmem{ in unvalidatedConvert() 364 return std::make_shared<const Memory>(Memory{.handle = std::move(handle)}); in unvalidatedConvert() 651 nn::GeneralResult<Memory> unvalidatedConvert(const nn::Memory::Ashmem& memory) { in unvalidatedConvert() 667 return Memory::make<Memory::Tag::ashmem>(std::move(handle)); in unvalidatedConvert() 670 nn::GeneralResult<Memory> unvalidatedConvert(const nn::Memory::Fd& memory) { in unvalidatedConvert() 693 return Memory::make<Memory::Tag::mappableFile>(std::move(handle)); in unvalidatedConvert() 696 nn::GeneralResult<Memory> unvalidatedConvert(const nn::Memory::HardwareBuffer& memory) { in unvalidatedConvert() 723 return Memory::make<Memory::Tag::hardwareBuffer>(std::move(hardwareBuffer)); in unvalidatedConvert() 726 nn::GeneralResult<Memory> unvalidatedConvert(const nn::Memory::Unknown& /*memory*/) { in unvalidatedConvert() [all …]
|
/aosp12/system/unwinding/libunwindstack/include/unwindstack/ |
H A D | Elf.h | 45 Elf(Memory* memory) : memory_(memory) {} in Elf() 62 bool StepIfSignalHandler(uint64_t rel_pc, Regs* regs, Memory* process_memory); 64 bool Step(uint64_t rel_pc, Regs* regs, Memory* process_memory, bool* finished, 67 ElfInterface* CreateInterfaceFromMemory(Memory* memory); 89 Memory* memory() { return memory_.get(); } in memory() 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); 116 std::unique_ptr<Memory> memory_; [all …]
|
H A D | Memory.h | 31 class Memory { 33 Memory() = default; 34 virtual ~Memory() = default; 36 static std::shared_ptr<Memory> CreateProcessMemory(pid_t pid); 37 static std::shared_ptr<Memory> CreateProcessMemoryCached(pid_t pid); 38 static std::shared_ptr<Memory> CreateProcessMemoryThreadCached(pid_t pid); 39 static std::shared_ptr<Memory> CreateOfflineMemory(const uint8_t* data, uint64_t start, 41 static std::unique_ptr<Memory> CreateFileMemory(const std::string& path, uint64_t offset,
|
H A D | ElfInterface.h | 35 class Memory; variable 73 ElfInterface(Memory* memory) : memory_(memory) {} in ElfInterface() 88 virtual bool Step(uint64_t rel_pc, Regs* regs, Memory* process_memory, bool* finished, 95 std::unique_ptr<Memory> CreateGnuDebugdataMemory(); 97 Memory* memory() { return memory_; } in memory() 131 static int64_t GetLoadBias(Memory* memory); 134 static std::string ReadBuildIDFromMemory(Memory* memory); 139 Memory* memory_; 197 ElfInterfaceImpl(Memory* memory) : ElfInterface(memory) {} in ElfInterfaceImpl() 212 static void GetMaxSize(Memory* memory, uint64_t* size);
|
H A D | DwarfSection.h | 36 class Memory; variable 43 DwarfSection(Memory* memory); 93 virtual bool Eval(const DwarfCie*, Memory*, const DwarfLocations&, Regs*, bool*) = 0; 110 bool Step(uint64_t pc, Regs* regs, Memory* process_memory, bool* finished, bool* is_signal_frame); 128 DwarfSectionImpl(Memory* memory) : DwarfSection(memory) {} in DwarfSectionImpl() 143 bool Eval(const DwarfCie* cie, Memory* regular_memory, const DwarfLocations& loc_regs, Regs* regs, 165 bool EvalExpression(const DwarfLocation& loc, Memory* regular_memory, AddressType* value,
|
/aosp12/art/cmdline/ |
H A D | memory_representation.h | 31 struct Memory { struct 34 static Memory<kDivisor> FromBytes(size_t bytes) { in FromBytes() argument 36 return Memory<kDivisor>(bytes); in FromBytes() 39 Memory() : Value(0u) {} in Memory() argument 40 Memory(size_t value) : Value(value) { // NOLINT [runtime/explicit] [5] in Memory() argument 62 std::ostream& operator<<(std::ostream& stream, Memory<kDivisor> memory) { argument 66 using MemoryKiB = Memory<1024>;
|
/aosp12/hardware/interfaces/tests/memory/1.0/default/ |
H A D | MemoryTest.cpp | 38 Return<void> Memory::haveSomeMemory(const hidl_memory& mem, haveSomeMemory_cb _hidl_cb) { in haveSomeMemory() 43 Return<void> Memory::fillMemory(const hidl_memory& memory_in, uint8_t filler) { in fillMemory() 64 Return<void> Memory::haveSomeMemoryBlock(const MemoryBlock& blk, haveSomeMemoryBlock_cb _hidl_cb) { in haveSomeMemoryBlock() 69 Return<void> Memory::set(const hidl_memory& mem) { in set() 77 Return<sp<IMemoryToken>> Memory::get() { in get() 82 return new Memory(); in HIDL_FETCH_IMemoryTest()
|
/aosp12/system/unwinding/libunwindstack/benchmarks/ |
H A D | local_unwind_benchmarks.cpp | 35 std::shared_ptr<unwindstack::Memory>& process_memory; 86 auto process_memory = unwindstack::Memory::CreateProcessMemory(getpid()); in BM_local_unwind_uncached_process_memory() 98 auto process_memory = unwindstack::Memory::CreateProcessMemoryCached(getpid()); in BM_local_unwind_cached_process_memory() 110 auto process_memory = unwindstack::Memory::CreateProcessMemory(getpid()); in BM_local_unwind_local_updatable_maps_uncached() 122 auto process_memory = unwindstack::Memory::CreateProcessMemoryCached(getpid()); in BM_local_unwind_local_updatable_maps_cached() 134 auto process_memory = unwindstack::Memory::CreateProcessMemoryThreadCached(getpid()); in BM_local_unwind_local_updatable_maps_thread_cached() 156 auto process_memory = unwindstack::Memory::CreateProcessMemory(getpid()); in BM_local_unwind_uncached_process_memory_no_func_names() 168 auto process_memory = unwindstack::Memory::CreateProcessMemoryCached(getpid()); in BM_local_unwind_cached_process_memory_no_func_names() 180 auto process_memory = unwindstack::Memory::CreateProcessMemory(getpid()); in BM_local_unwind_local_updatable_maps_uncached_no_func_names() 192 auto process_memory = unwindstack::Memory::CreateProcessMemoryCached(getpid()); in BM_local_unwind_local_updatable_maps_cached_no_func_names()
|
/aosp12/packages/providers/MediaProvider/tests/src/com/android/providers/media/util/ |
H A D | MemoryTest.java | 34 new Memory(); in testConstructor() 40 Memory.pokeInt(buf, 0, expected, ByteOrder.BIG_ENDIAN); in testBigEndian() 41 final int actual = Memory.peekInt(buf, 0, ByteOrder.BIG_ENDIAN); in testBigEndian() 48 Memory.pokeInt(buf, 0, expected, ByteOrder.LITTLE_ENDIAN); in testLittleEndian() 49 final int actual = Memory.peekInt(buf, 0, ByteOrder.LITTLE_ENDIAN); in testLittleEndian()
|
/aosp12/system/unwinding/libunwindstack/ |
H A D | MemoryCache.h | 32 class MemoryCacheBase : public Memory { 34 MemoryCacheBase(Memory* memory) : impl_(memory) {} in MemoryCacheBase() 39 const std::shared_ptr<Memory>& UnderlyingMemory() { return impl_; } in UnderlyingMemory() 62 std::shared_ptr<Memory> impl_; 67 MemoryCache(Memory* memory) : MemoryCacheBase(memory) {} in MemoryCache() 82 MemoryThreadCache(Memory* memory);
|
H A D | Symbols.h | 32 class Memory; variable 47 bool GetName(uint64_t addr, Memory* elf_memory, SharedString* name, uint64_t* func_offset); 50 bool GetGlobal(Memory* elf_memory, const std::string& name, uint64_t* memory_address); 59 Info* BinarySearch(uint64_t addr, Memory* elf_memory, uint64_t* func_offset); 62 void BuildRemapTable(Memory* elf_memory);
|
H A D | Memory.cpp | 171 bool Memory::ReadFully(uint64_t addr, void* dst, size_t size) { in ReadFully() 176 bool Memory::ReadString(uint64_t addr, std::string* dst, size_t max_read) { in ReadString() 204 std::unique_ptr<Memory> Memory::CreateFileMemory(const std::string& path, uint64_t offset, in CreateFileMemory() 215 std::shared_ptr<Memory> Memory::CreateProcessMemory(pid_t pid) { in CreateProcessMemory() 217 return std::shared_ptr<Memory>(new MemoryLocal()); in CreateProcessMemory() 219 return std::shared_ptr<Memory>(new MemoryRemote(pid)); in CreateProcessMemory() 222 std::shared_ptr<Memory> Memory::CreateProcessMemoryCached(pid_t pid) { in CreateProcessMemoryCached() 224 return std::shared_ptr<Memory>(new MemoryCache(new MemoryLocal())); in CreateProcessMemoryCached() 226 return std::shared_ptr<Memory>(new MemoryCache(new MemoryRemote(pid))); in CreateProcessMemoryCached() 229 std::shared_ptr<Memory> Memory::CreateProcessMemoryThreadCached(pid_t pid) { in CreateProcessMemoryThreadCached() [all …]
|
H A D | ArmExidx.h | 28 class Memory; variable 56 ArmExidx(RegsArm* regs, Memory* elf_memory, Memory* process_memory) in ArmExidx() 113 Memory* elf_memory_; 114 Memory* process_memory_;
|
H A D | MemoryRange.h | 33 class MemoryRange : public Memory { 35 MemoryRange(const std::shared_ptr<Memory>& memory, uint64_t begin, uint64_t length, 45 std::shared_ptr<Memory> memory_; 51 class MemoryRanges : public Memory {
|
H A D | DexFiles.cpp | 30 bool GlobalDebugInterface<DexFile>::Load(Maps* maps, std::shared_ptr<Memory>& memory, uint64_t addr, in Load() 36 std::unique_ptr<DexFiles> CreateDexFiles(ArchEnum arch, std::shared_ptr<Memory>& memory, in CreateDexFiles() 44 bool GlobalDebugInterface<DexFile>::Load(Maps*, std::shared_ptr<Memory>&, uint64_t, uint64_t, 49 std::unique_ptr<DexFiles> CreateDexFiles(ArchEnum, std::shared_ptr<Memory>&,
|
H A D | Symbols.cpp | 50 Symbols::Info* Symbols::BinarySearch(uint64_t addr, Memory* elf_memory, uint64_t* func_offset) { in BinarySearch() 91 void Symbols::BuildRemapTable(Memory* elf_memory) { in BuildRemapTable() 126 bool Symbols::GetName(uint64_t addr, Memory* elf_memory, SharedString* name, in GetName() 167 bool Symbols::GetGlobal(Memory* elf_memory, const std::string& name, uint64_t* memory_address) { in GetGlobal() 203 template bool Symbols::GetName<Elf32_Sym>(uint64_t, Memory*, SharedString*, uint64_t*); 204 template bool Symbols::GetName<Elf64_Sym>(uint64_t, Memory*, SharedString*, uint64_t*); 206 template bool Symbols::GetGlobal<Elf32_Sym>(Memory*, const std::string&, uint64_t*); 207 template bool Symbols::GetGlobal<Elf64_Sym>(Memory*, const std::string&, uint64_t*);
|
H A D | MapInfo.cpp | 63 Memory* MapInfo::GetFileMemory() { in GetFileMemory() 136 Memory* MapInfo::CreateMemory(const std::shared_ptr<Memory>& process_memory) { in CreateMemory() 150 Memory* memory = GetFileMemory(); in CreateMemory() 215 Elf* MapInfo::GetElf(const std::shared_ptr<Memory>& process_memory, ArchEnum expected_arch) { in GetElf() 234 Memory* memory = CreateMemory(process_memory); in GetElf() 289 uint64_t MapInfo::GetLoadBias(const std::shared_ptr<Memory>& process_memory) { in GetLoadBias() 312 std::unique_ptr<Memory> memory(CreateMemory(process_memory)); in GetLoadBias() 348 std::unique_ptr<Memory> memory(GetFileMemory()); in GetBuildID()
|
/aosp12/frameworks/base/core/java/android/os/ |
H A D | FileBridge.java | 29 import libcore.io.Memory; 104 final int cmd = Memory.peekInt(temp, 0, ByteOrder.BIG_ENDIAN); in run() 107 int len = Memory.peekInt(temp, 4, ByteOrder.BIG_ENDIAN); in run() 168 Memory.pokeInt(mTemp, 0, cmd, ByteOrder.BIG_ENDIAN); in writeCommandAndBlock() 173 if (Memory.peekInt(mTemp, 0, ByteOrder.BIG_ENDIAN) == cmd) { in writeCommandAndBlock() 184 Memory.pokeInt(mTemp, 0, CMD_WRITE, ByteOrder.BIG_ENDIAN); in write() 185 Memory.pokeInt(mTemp, 4, byteCount, ByteOrder.BIG_ENDIAN); in write()
|
/aosp12/packages/modules/NeuralNetworks/runtime/include/ |
H A D | NeuralNetworksWrapper.h | 184 class Memory { 188 Memory(const NnApiSupportLibrary* nnapi, ANeuralNetworksMemory* memory) in Memory() function 194 Memory(size_t size, int protect, int fd, size_t offset) { 201 Memory(const NnApiSupportLibrary* nnapi, AHardwareBuffer* buffer) : mNnApi(nnapi) { function 203 Memory(AHardwareBuffer* buffer) { 209 ~Memory() { 218 Memory(const Memory&) = delete; 219 Memory& operator=(const Memory&) = delete; 224 Memory(Memory&& other) { *this = std::move(other); } function 225 Memory& operator=(Memory&& other) { [all …]
|
/aosp12/packages/modules/NeuralNetworks/runtime/test/ |
H A D | TestNeuralNetworksWrapper.h | 55 class Memory { 58 Memory(ANeuralNetworksMemory* memory) : mMemory(memory) {} in Memory() function 60 Memory(size_t size, int protect, int fd, size_t offset) { in Memory() function 65 Memory(AHardwareBuffer* buffer) { in Memory() function 70 virtual ~Memory() { ANeuralNetworksMemory_free(mMemory); } in ~Memory() 75 Memory(const Memory&) = delete; 76 Memory& operator=(const Memory&) = delete; 81 Memory(Memory&& other) { *this = std::move(other); } in Memory() function 82 Memory& operator=(Memory&& other) { 409 Result setInputFromMemory(uint32_t index, const Memory* memory, uint32_t offset, [all …]
|
/aosp12/packages/modules/NeuralNetworks/shim_and_sl/include/ |
H A D | SupportLibraryWrapper.h | 48 class Memory { 51 Memory(const NnApiSupportLibrary* nnapi, ANeuralNetworksMemory* memory) in Memory() function 70 Memory(const NnApiSupportLibrary* nnapi, ANeuralNetworksMemoryDesc* desc, size_t size) in Memory() function 76 virtual ~Memory() { in ~Memory() 91 Memory(const Memory&) = delete; 92 Memory& operator=(const Memory&) = delete; 97 Memory(Memory&& other) { *this = std::move(other); } in Memory() function 98 Memory& operator=(Memory&& other) { 126 Result copyTo(Memory& other) { in copyTo() 526 Result setInputFromMemory(uint32_t index, const Memory* memory, uint32_t offset, [all …]
|
/aosp12/hardware/interfaces/neuralnetworks/aidl/android/hardware/neuralnetworks/ |
H A D | IBuffer.aidl | 19 import android.hardware.neuralnetworks.Memory; 41 void copyFrom(in Memory src, in int[] dimensions); in copyFrom() 56 void copyTo(in Memory dst); in copyTo()
|
/aosp12/system/unwinding/libunwindstack/tests/ |
H A D | ElfFake.h | 52 ElfFake(Memory* memory) : Elf(memory) { valid_ = true; } in ElfFake() 69 ElfInterfaceFake(Memory* memory) : ElfInterface(memory) {} in ElfInterfaceFake() 80 bool Step(uint64_t, Regs*, Memory*, bool*, bool*) override; 125 ElfInterface32Fake(Memory* memory) : ElfInterface32(memory) {} in ElfInterface32Fake() 136 ElfInterface64Fake(Memory* memory) : ElfInterface64(memory) {} in ElfInterface64Fake() 147 ElfInterfaceArmFake(Memory* memory) : ElfInterfaceArm(memory) {} in ElfInterfaceArmFake()
|