Home
last modified time | relevance | path

Searched refs:memory_ (Results 1 – 25 of 59) sorted by relevance

123

/aosp12/system/unwinding/libunwindstack/tests/
H A DDwarfEhFrameWithHdrTest.cpp60 memory_.Clear(); in SetUp()
67 MemoryFake memory_; member in unwindstack::DwarfEhFrameWithHdrTest
75 this->memory_.SetMemory( in TYPED_TEST_P()
96 this->memory_.SetData32(0x1006, 0); in TYPED_TEST_P()
102 this->memory_.SetData8(0x1000, 0); in TYPED_TEST_P()
105 this->memory_.SetData8(0x1000, 2); in TYPED_TEST_P()
114 this->memory_.SetData32(0x1006, 1); in TYPED_TEST_P()
120 this->memory_.SetData32(0x1304, 0); in TYPED_TEST_P()
128 this->memory_.SetData16(0x1410, 0); in TYPED_TEST_P()
255 this->memory_.SetMemory( in TYPED_TEST_P()
[all …]
H A DMemoryBufferTest.cpp32 memory_.reset(new MemoryBuffer); in SetUp()
38 ASSERT_EQ(0U, memory_->Size()); in TEST_F()
46 ASSERT_TRUE(memory_->Resize(256)); in TEST_F()
47 ASSERT_EQ(256U, memory_->Size()); in TEST_F()
53 uint8_t* data = memory_->GetPtr(0); in TEST_F()
66 ASSERT_TRUE(memory_->Resize(100)); in TEST_F()
76 ASSERT_TRUE(memory_->Resize(100)); in TEST_F()
83 ASSERT_TRUE(memory_->Resize(256)); in TEST_F()
84 ASSERT_EQ(256U, memory_->Size()); in TEST_F()
90 uint8_t* data = memory_->GetPtr(0); in TEST_F()
[all …]
H A DElfInterfaceArmTest.cpp36 memory_.Clear(); in SetUp()
40 MemoryFake memory_; member in unwindstack::ElfInterfaceArmTest
46 memory_.SetData32(0x1000, 0x230000); in TEST_F()
92 memory_.SetData32(0x1000, 0x6000); in TEST_F()
113 memory_.SetData32(0x1000, 0x6000); in TEST_F()
114 memory_.SetData32(0x1008, 0x7000); in TEST_F()
125 memory_.SetData32(0x1000, 0x6000); in TEST_F()
133 memory_.SetData32(0x1000, 0x8000); in TEST_F()
142 memory_.SetData32(0x1000, 0x6000); in TEST_F()
143 memory_.SetData32(0x1008, 0x8000); in TEST_F()
[all …]
H A DSymbolsTest.cpp45 void SetUp() override { memory_.Clear(); } in SetUp()
56 MemoryFake memory_; member in unwindstack::SymbolsTest
66 this->memory_.SetMemory(offset, &sym, sizeof(sym)); in TYPED_TEST_P()
93 this->memory_.SetMemory(offset, &sym, sizeof(sym)); in TYPED_TEST_P()
107 this->memory_.SetMemory(offset, &sym, sizeof(sym)); in TYPED_TEST_P()
115 this->memory_.SetMemory(offset, &sym, sizeof(sym)); in TYPED_TEST_P()
129 this->memory_.SetMemory(offset, &sym, sizeof(sym)); in TYPED_TEST_P()
135 this->memory_.SetMemory(offset, &sym, sizeof(sym)); in TYPED_TEST_P()
291 this->memory_.Clear(); in TYPED_TEST_P()
295 this->memory_.Clear(); in TYPED_TEST_P()
[all …]
H A DJitDebugTest.cpp82 memory_ = new MemoryFake; in SetUp()
83 process_memory_.reset(memory_); in SetUp()
186 MemoryFake* memory_; member in unwindstack::JitDebugTest
194 memory_->SetData32(addr, 1); in WriteDescriptor32()
206 memory_->SetData32(addr, 1); in WriteDescriptor64()
219 memory_->SetData32(addr, next); in WriteEntry32Pack()
232 memory_->SetData32(addr, next); in WriteEntry32Pad()
318 memory_->Clear(); in TEST_F()
357 memory_->Clear(); in TEST_F()
375 memory_->Clear(); in TEST_F()
[all …]
H A DElfInterfaceTest.cpp52 memory_.Clear(); in SetUp()
163 MemoryFake memory_; member in unwindstack::ElfInterfaceTest
666 ElfType elf(&memory_); in InitHeadersEhFrameTest()
673 memory_.SetMemory(0x10000, in InitHeadersEhFrameTest()
676 memory_.SetData32(0x10008, 250); in InitHeadersEhFrameTest()
694 ElfType elf(&memory_); in InitHeadersDebugFrame()
701 memory_.SetData32(0x5000, 0xfc); in InitHeadersDebugFrame()
705 memory_.SetData32(0x5100, 0xfc); in InitHeadersDebugFrame()
706 memory_.SetData32(0x5104, 0); in InitHeadersDebugFrame()
1453 memory_.SetData32(0x704, 0); in TEST_F()
[all …]
H A DMemoryFileTest.cpp42 MemoryFileAtOffset memory_; member in unwindstack::MemoryFileTest
50 ASSERT_TRUE(memory_.Init(tf_->path, 0)); in TEST_F()
52 ASSERT_TRUE(memory_.ReadFully(0, buffer.data(), 10)); in TEST_F()
60 ASSERT_TRUE(memory_.Init(tf_->path, 10)); in TEST_F()
76 ASSERT_TRUE(memory_.Init(tf_->path, pagesize + 15)); in TEST_F()
92 ASSERT_TRUE(memory_.Init(tf_->path, 2 * pagesize)); in TEST_F()
137 ASSERT_FALSE(memory_.Init(tf_->path, file_size)); in TEST_F()
154 ASSERT_TRUE(memory_.Init(tf_->path, 0)); in TEST_F()
177 ASSERT_TRUE(memory_.Init(tf_->path, 0)); in TEST_F()
261 ASSERT_TRUE(memory_.Init(tf_->path, 0)); in TEST_F()
[all …]
H A DDwarfEhFrameTest.cpp35 memory_.Clear(); in SetUp()
42 MemoryFake memory_; member in unwindstack::DwarfEhFrameTest
54 this->memory_.SetData32(0x5000, 0xfc); in TYPED_TEST_P()
56 this->memory_.SetData32(0x5004, 0); in TYPED_TEST_P()
60 this->memory_.SetData32(0x5100, 0xfc); in TYPED_TEST_P()
61 this->memory_.SetData32(0x5104, 0x104); in TYPED_TEST_P()
62 this->memory_.SetData32(0x5108, 0x1500); in TYPED_TEST_P()
63 this->memory_.SetData32(0x510c, 0x200); in TYPED_TEST_P()
92 this->memory_.SetData64(0x5004, 0xfc); in TYPED_TEST_P()
94 this->memory_.SetData64(0x500c, 0); in TYPED_TEST_P()
[all …]
H A DElfTest.cpp114 Elf elf(memory_); in TEST_F()
121 Elf elf(memory_); in TEST_F()
167 Elf elf(memory_); in TEST_F()
180 Elf elf(memory_); in TEST_F()
193 Elf elf(memory_); in TEST_F()
205 Elf elf(memory_); in TEST_F()
217 Elf elf(memory_); in TEST_F()
229 Elf elf(memory_); in TEST_F()
241 Elf elf(memory_); in TEST_F()
253 Elf elf(memory_); in TEST_F()
[all …]
H A DDwarfCfaLogTest.cpp44 memory_.Clear(); in SetUp()
46 dmem_.reset(new DwarfMemory(&memory_)); in SetUp()
64 MemoryFake memory_; member in unwindstack::DwarfCfaLogTest
80 this->memory_.SetMemory(0x2000, std::vector<uint8_t>{i}); in TYPED_TEST_P()
92 this->memory_.SetMemory(0x2000, std::vector<uint8_t>{0x00}); in TYPED_TEST_P()
167 this->memory_.SetMemory(0x2000, std::vector<uint8_t>{0xc2}); in TYPED_TEST_P()
229 this->memory_.SetMemory(0x50, buffer, sizeof(buffer)); in TYPED_TEST_P()
254 this->memory_.SetMemory(0x200, std::vector<uint8_t>{0x44}); in TYPED_TEST_P()
577 this->memory_.SetMemory(0x200, ops); in TYPED_TEST_P()
615 this->memory_.SetMemory(0x200, ops); in TYPED_TEST_P()
[all …]
H A DMemoryOfflineBufferTest.cpp40 std::unique_ptr<MemoryOfflineBuffer> memory_; member in unwindstack::MemoryOfflineBufferTest
58 ASSERT_FALSE(memory_->ReadFully(0, buffer.data(), 1)); in TEST_F()
59 ASSERT_FALSE(memory_->ReadFully(0xfff, buffer.data(), 1)); in TEST_F()
60 ASSERT_FALSE(memory_->ReadFully(0xfff, buffer.data(), 2)); in TEST_F()
61 ASSERT_FALSE(memory_->ReadFully(0x3000, buffer.data(), 1)); in TEST_F()
62 ASSERT_FALSE(memory_->ReadFully(0x3001, buffer.data(), 1)); in TEST_F()
67 ASSERT_TRUE(memory_->ReadFully(kStart, buffer.data(), 10)); in TEST_F()
70 ASSERT_TRUE(memory_->ReadFully(kStart + 555, buffer.data(), 40)); in TEST_F()
85 ASSERT_TRUE(memory_->ReadFully(kStart, buffer.data(), 100)); in TEST_F()
88 memory_->Reset(&buffer_[10], 0x12000, 0x13000); in TEST_F()
[all …]
H A DDwarfSectionImplTest.cpp62 memory_.Clear(); in SetUp()
63 section_ = new TestDwarfSectionImpl<TypeParam>(&memory_); in SetUp()
69 MemoryFake memory_; member in unwindstack::DwarfSectionImplTest
123 this->memory_.SetMemory(0x5000, std::vector<uint8_t>{0x96, 0x96, 0x96}); in TYPED_TEST_P()
141 this->memory_.SetMemory(0x80000000, &cfa_value, sizeof(cfa_value)); in TYPED_TEST_P()
175 this->memory_.SetMemory(0x5000, std::vector<uint8_t>{0x50, 0x96, 0x96}); in TYPED_TEST_P()
358 this->memory_.SetData64(0x2150, 0x12345678abcdef00ULL); in TYPED_TEST_P()
360 this->memory_.SetData32(0x2150, 0x12345678); in TYPED_TEST_P()
467 this->memory_.SetMemory(0x80000000, &cfa_value, sizeof(cfa_value)); in TYPED_TEST_P()
596 this->memory_.SetMemory(0x5000, std::vector<uint8_t>{0x00}); in TYPED_TEST_P()
[all …]
H A DDwarfDebugFrameTest.cpp37 memory_.Clear(); in SetUp()
44 MemoryFake memory_; member in unwindstack::DwarfDebugFrameTest
123 SetFourFdes32(&this->memory_); in TYPED_TEST_P()
165 SetFourFdes32(&this->memory_); in TYPED_TEST_P()
189 SetFourFdes32(&this->memory_); in TYPED_TEST_P()
199 SetFourFdes32(&this->memory_); in TYPED_TEST_P()
223 SetFourFdes32(&this->memory_); in TYPED_TEST_P()
247 SetFourFdes32(&this->memory_); in TYPED_TEST_P()
271 SetFourFdes64(&this->memory_); in TYPED_TEST_P()
313 SetFourFdes64(&this->memory_); in TYPED_TEST_P()
[all …]
H A DDexFilesTest.cpp96 memory_ = new MemoryFake; in SetUp()
97 process_memory_.reset(memory_); in SetUp()
120 MemoryFake* memory_; member in unwindstack::DexFilesTest
127 memory_->SetData32(addr, 1); in WriteDescriptor32()
129 memory_->SetData32(addr + 4, 0); in WriteDescriptor32()
131 memory_->SetData32(addr + 8, 0); in WriteDescriptor32()
133 memory_->SetData32(addr + 12, entry); in WriteDescriptor32()
138 memory_->SetData32(addr, 1); in WriteDescriptor64()
140 memory_->SetData32(addr + 4, 0); in WriteDescriptor64()
142 memory_->SetData64(addr + 8, 0); in WriteDescriptor64()
[all …]
H A DMemoryCacheTest.cpp31 memory_ = new MemoryFake; in SetUp()
34 memory_->SetMemoryBlock(0x8000, 4096, 0xab); in SetUp()
35 memory_->SetMemoryBlock(0x9000, 4096, 0xde); in SetUp()
36 memory_->SetMemoryBlock(0xa000, 3000, 0x50); in SetUp()
39 MemoryFake* memory_; member in unwindstack::MemoryCacheTest
54 memory_->SetMemoryBlock(0x8000, 4096, 0xff); in TEST_F()
73 memory_->SetMemoryBlock(0x8000, 4096, 0xff); in TEST_F()
91 memory_->SetMemoryBlock(0x8000, 4096, 0xff); in TEST_F()
92 memory_->SetMemoryBlock(0x9000, 4096, 0xff); in TEST_F()
106 memory_->SetMemoryBlock(0x8000, 4096, 0xff); in TEST_F()
[all …]
H A DDwarfMemoryTest.cpp33 memory_.Clear(); in SetUp()
60 MemoryFake memory_; member in unwindstack::DwarfMemoryTest
89 memory_.SetData8(1, 200); in TEST_F()
97 memory_.SetData16(0x12, 50100); in TEST_F()
258 memory_.SetData32(0, 0x12345678); in TEST_F()
281 memory_.SetData32(4, 0x12345678); in TEST_F()
325 memory_.SetData8(0, 0xe0); in ReadEncodedValue_data1()
346 memory_.SetData16(0, 0xe000); in ReadEncodedValue_data2()
367 memory_.SetData32(0, 0xe0000000); in ReadEncodedValue_data4()
427 memory_.SetData64(0, 0); in ReadEncodedValue_overflow()
[all …]
H A DDwarfCfaTest.cpp44 memory_.Clear(); in SetUp()
46 dmem_.reset(new DwarfMemory(&memory_)); in SetUp()
63 MemoryFake memory_; member in unwindstack::DwarfCfaTest
79 this->memory_.SetMemory(0x2000, std::vector<uint8_t>{i}); in TYPED_TEST_P()
92 this->memory_.SetMemory(0x2000, std::vector<uint8_t>{0x00}); in TYPED_TEST_P()
199 this->memory_.SetMemory(0x2000, std::vector<uint8_t>{0xc2}); in TYPED_TEST_P()
274 this->memory_.SetMemory(0x50, buffer, sizeof(buffer)); in TYPED_TEST_P()
469 this->memory_.SetMemory( in TYPED_TEST_P()
737 this->memory_.SetMemory(0x200, ops); in TYPED_TEST_P()
771 this->memory_.SetMemory(0x200, ops); in TYPED_TEST_P()
[all …]
H A DElfCacheTest.cpp64 static std::shared_ptr<Memory> memory_; member in unwindstack::ElfCacheTest
67 std::shared_ptr<Memory> ElfCacheTest::memory_; member in unwindstack::ElfCacheTest
84 Elf* elf1 = info1.GetElf(memory_, ARCH_ARM); in VerifySameMap()
86 Elf* elf2 = info2.GetElf(memory_, ARCH_ARM); in VerifySameMap()
134 Elf* elf0_1 = info0_1.GetElf(memory_, ARCH_ARM); in VerifyWithinSameMap()
137 Elf* elf0_2 = info0_2.GetElf(memory_, ARCH_ARM); in VerifyWithinSameMap()
148 Elf* elf100_1 = info100_1.GetElf(memory_, ARCH_X86); in VerifyWithinSameMap()
151 Elf* elf100_2 = info100_2.GetElf(memory_, ARCH_X86); in VerifyWithinSameMap()
176 Elf* elf300_1 = info300_1.GetElf(memory_, ARCH_ARM); in VerifyWithinSameMap()
179 Elf* elf300_2 = info300_2.GetElf(memory_, ARCH_ARM); in VerifyWithinSameMap()
[all …]
H A DMemoryThreadCacheTest.cpp32 memory_ = new MemoryFake; in SetUp()
35 memory_->SetMemoryBlock(0x8000, 4096, 0xab); in SetUp()
36 memory_->SetMemoryBlock(0x9000, 4096, 0xde); in SetUp()
37 memory_->SetMemoryBlock(0xa000, 3000, 0x50); in SetUp()
40 MemoryFake* memory_; member in unwindstack::MemoryThreadCacheTest
55 memory_->SetMemoryBlock(0x8000, 4096, 0xff); in TEST_F()
74 memory_->SetMemoryBlock(0x8000, 4096, 0xff); in TEST_F()
92 memory_->SetMemoryBlock(0x8000, 4096, 0xff); in TEST_F()
93 memory_->SetMemoryBlock(0x9000, 4096, 0xff); in TEST_F()
107 memory_->SetMemoryBlock(0x8000, 4096, 0xff); in TEST_F()
[all …]
/aosp12/system/unwinding/libunwindstack/
H A DDwarfSection.cpp76 memory_.set_data_offset(entries_offset_); in GetCieFromOffset()
77 memory_.set_cur_offset(offset); in GetCieFromOffset()
165 memory_.set_cur_offset(memory_.cur_offset() + 1); in FillInCie()
263 memory_.set_cur_offset(offset); in GetFdeFromOffset()
342 memory_.set_cur_offset(cur_offset); in FillInFde()
345 memory_.set_pc_offset(section_bias_); in FillInFde()
349 memory_.set_pc_offset(0); in FillInFde()
367 memory_.set_pc_offset(pc_offset_); in FillInFde()
624 memory_.clear_func_offset(); in Init()
625 memory_.clear_text_offset(); in Init()
[all …]
H A DDwarfEhFrameWithHdr.cpp42 memory_.clear_func_offset(); in Init()
43 memory_.clear_text_offset(); in Init()
44 memory_.set_data_offset(offset); in Init()
45 memory_.set_cur_offset(offset); in Init()
51 if (!memory_.ReadBytes(data, 4)) { in Init()
53 last_error_.address = memory_.cur_offset(); in Init()
77 memory_.set_pc_offset(memory_.cur_offset()); in Init()
81 last_error_.address = memory_.cur_offset(); in Init()
85 memory_.set_pc_offset(memory_.cur_offset()); in Init()
97 hdr_entries_offset_ = memory_.cur_offset(); in Init()
[all …]
H A DDwarfCfa.cpp53 memory_->set_cur_offset(start_offset); in GetLocationInfo()
70 if (!memory_->ReadBytes(&cfa_value, 1)) { in GetLocationInfo()
126 memory_->set_cur_offset(memory_->cur_offset() + block_length); in GetLocationInfo()
186 if (!memory_->ReadULEB128(&offset)) { in LogOffsetRegisterString()
190 memory_->set_cur_offset(cfa_offset); in LogOffsetRegisterString()
195 if (!memory_->ReadBytes(&value, 1)) { in LogOffsetRegisterString()
229 end_offset += memory_->cur_offset(); in LogInstruction()
233 memory_->set_cur_offset(end_offset); in LogInstruction()
246 memory_->set_cur_offset(cfa_offset); in LogInstruction()
250 if (!memory_->ReadBytes(&value, 1)) { in LogInstruction()
[all …]
H A DDwarfOp.cpp1485 memory_->set_cur_offset(start); in Eval()
1493 if (memory_->cur_offset() < end) { in Eval()
1506 if (memory_->cur_offset() < end) { in Eval()
1519 while (memory_->cur_offset() < end) { in Eval()
1536 if (!memory_->ReadBytes(&cur_op_, 1)) { in Decode()
1572 memory_->set_cur_offset(start); in GetLogInfo()
1573 while (memory_->cur_offset() < end) { in GetLogInfo()
1575 if (!memory_->ReadBytes(&cur_op, 1)) { in GetLogInfo()
1604 memory_->set_cur_offset(end_offset); in GetLogInfo()
1827 memory_->set_cur_offset(cur_offset); in op_bra()
[all …]
H A DElfInterface.cpp111 eh_frame_.reset(new DwarfEhFrame<AddressType>(memory_)); in InitHeaders()
127 debug_frame_.reset(new DwarfDebugFrame<AddressType>(memory_)); in InitHeaders()
139 if (!memory_->ReadFully(0, &ehdr, sizeof(ehdr))) { in ReadAllHeaders()
180 if (!memory_->ReadFully(offset, &phdr, sizeof(phdr))) { in ReadProgramHeaders()
239 if (!memory_->ReadFully(gnu_build_id_offset_ + offset, &hdr, sizeof(hdr))) { in ReadBuildID()
288 if (memory_->ReadFully(sh_offset, &shdr, sizeof(shdr))) { in ReadSectionHeaders()
297 if (!memory_->ReadFully(offset, &shdr, sizeof(shdr))) { in ReadSectionHeaders()
309 if (!memory_->ReadFully(str_offset, &str_shdr, sizeof(str_shdr))) { in ReadSectionHeaders()
388 if (!memory_->ReadFully(offset, &dyn, sizeof(dyn))) { in GetSoname()
431 if (symbol->template GetName<SymType>(addr, memory_, name, func_offset)) { in GetFunctionName()
[all …]
/aosp12/art/libartbase/base/
H A Dmalloc_arena_pool.cc53 memory_ = unaligned_memory_; in MallocArena()
55 memory_ = AlignUp(unaligned_memory_, ArenaAllocator::kArenaAlignment); in MallocArena()
57 size_t head = memory_ - unaligned_memory_; in MallocArena()
60 MEMORY_TOOL_MAKE_NOACCESS(memory_ + size, tail); in MallocArena()
63 DCHECK_ALIGNED(memory_, ArenaAllocator::kArenaAlignment); in MallocArena()
70 size_t head = memory_ - unaligned_memory_; in ~MallocArena()
73 MEMORY_TOOL_MAKE_UNDEFINED(memory_ + size_, tail); in ~MallocArena()
137 MEMORY_TOOL_MAKE_UNDEFINED(arena->memory_, arena->bytes_allocated_); in FreeArenaChain()

123