Home
last modified time | relevance | path

Searched refs:file_offset (Results 1 – 25 of 29) sorted by relevance

12

/system/extras/simpleperf/
Dread_dex_file.cpp36 static void ReadSymbols(art_api::dex::DexFile& dex_file, uint64_t file_offset, in ReadSymbols() argument
42 DexFileSymbol symbol{std::string_view(name, name_size), file_offset + offset, code_size}; in ReadSymbols()
51 for (uint64_t file_offset : dex_file_offsets) { in ReadSymbolsFromDexFileInMemory() local
53 if (__builtin_sub_overflow(size, file_offset, &max_file_size)) { in ReadSymbolsFromDexFileInMemory()
55 << file_offset << ")"; in ReadSymbolsFromDexFileInMemory()
58 uint8_t* file_addr = static_cast<uint8_t*>(addr) + file_offset; in ReadSymbolsFromDexFileInMemory()
64 << file_offset << "): " << error_msg.ToString(); in ReadSymbolsFromDexFileInMemory()
67 ReadSymbols(*dex_file, file_offset, symbol_callback); in ReadSymbolsFromDexFileInMemory()
Dread_apk.cpp40 EmbeddedElf* ApkInspector::FindElfInApkByOffset(const std::string& apk_path, uint64_t file_offset) { in FindElfInApkByOffset() argument
43 auto it = node.offset_map.find(file_offset); in FindElfInApkByOffset()
47 std::unique_ptr<EmbeddedElf> elf = FindElfInApkByOffsetWithoutCache(apk_path, file_offset); in FindElfInApkByOffset()
49 node.offset_map[file_offset] = std::move(elf); in FindElfInApkByOffset()
73 const std::string& apk_path, uint64_t file_offset) { in FindElfInApkByOffsetWithoutCache() argument
86 if (entry.method == kCompressStored && file_offset >= static_cast<uint64_t>(entry.offset) && in FindElfInApkByOffsetWithoutCache()
87 file_offset < static_cast<uint64_t>(entry.offset) + entry.uncompressed_length) { in FindElfInApkByOffsetWithoutCache()
Dread_elf.h66 uint64_t file_offset = 0; member
75 uint64_t file_offset = 0; member
104 virtual bool VaddrToOff(uint64_t vaddr, uint64_t* file_offset) = 0;
111 ElfStatus IsValidElfFile(int fd, uint64_t file_offset = 0);
DJITDebugReader.h60 uint64_t file_offset; member
68 const std::string& file_path, uint64_t file_offset) in JITDebugInfo()
75 file_offset(file_offset) {} in JITDebugInfo()
85 file_offset(0), in JITDebugInfo()
Dread_elf.cpp84 ElfStatus IsValidElfFile(int fd, uint64_t file_offset) { in IsValidElfFile() argument
86 if (!android::base::ReadFullyAtOffset(fd, buf, 4, file_offset)) { in IsValidElfFile()
149 static ElfStatus OpenObjectFile(const std::string& filename, uint64_t file_offset, in OpenObjectFile() argument
164 ElfStatus status = IsValidElfFile(fd, file_offset); in OpenObjectFile()
168 auto buffer_or_err = llvm::MemoryBuffer::getOpenFileSlice(fd, filename, file_size, file_offset); in OpenObjectFile()
330 segments[i].file_offset = phdr.p_offset; in GetProgramHeader()
352 sections[i].file_offset = shdr.sh_offset; in GetSectionHeader()
439 uint64_t ReadMinExecutableVaddr(uint64_t* file_offset) { in ReadMinExecutableVaddr() argument
446 *file_offset = it->p_offset; in ReadMinExecutableVaddr()
454 *file_offset = 0; in ReadMinExecutableVaddr()
[all …]
Dread_apk.h65 static EmbeddedElf* FindElfInApkByOffset(const std::string& apk_path, uint64_t file_offset);
71 uint64_t file_offset);
Drecord_file.h241 uint64_t file_offset; member
243 AuxDataLocation(uint64_t aux_offset, uint64_t aux_size, uint64_t file_offset) in AuxDataLocation()
244 : aux_offset(aux_offset), aux_size(aux_size), file_offset(file_offset) {} in AuxDataLocation()
DJITDebugReader.cpp449 uint64_t file_offset; in GetDescriptorsLocation() local
450 uint64_t min_vaddr_in_file = elf->ReadMinExecutableVaddr(&file_offset); in GetDescriptorsLocation()
638 uint64_t file_offset = symfile->GetOffset(); in ReadJITCodeDebugInfo() local
649 StringPrintf(":%" PRIu64 "-%" PRIu64, file_offset, file_offset + jit_entry.symfile_size); in ReadJITCodeDebugInfo()
651 symfile->GetPath() + location_in_file, file_offset); in ReadJITCodeDebugInfo()
Ddso.h174 virtual void GetMinExecutableVaddr(uint64_t* min_vaddr, uint64_t* file_offset) { in GetMinExecutableVaddr() argument
176 *file_offset = 0; in GetMinExecutableVaddr()
Ddso.cpp558 void SetMinExecutableVaddr(uint64_t min_vaddr, uint64_t file_offset) override { in SetMinExecutableVaddr() argument
560 file_offset_of_min_vaddr_ = file_offset; in SetMinExecutableVaddr()
563 void GetMinExecutableVaddr(uint64_t* min_vaddr, uint64_t* file_offset) override { in GetMinExecutableVaddr() argument
565 return dex_file_dso_->GetMinExecutableVaddr(min_vaddr, file_offset); in GetMinExecutableVaddr()
583 *file_offset = file_offset_of_min_vaddr_; in GetMinExecutableVaddr()
815 kernel_start_file_offset_ = section.file_offset; in ParseKernelStartAddr()
Drecord_file_reader.cpp377 auxtrace->location.file_offset = header_.data.offset + read_record_size_; in ReadRecord()
799 if (!ReadAtOffset(aux_offset - location->aux_offset + location->file_offset, buf.data(), size)) { in ReadAuxData()
825 OverflowResult file_end = SafeAdd(location.file_offset, location.aux_size); in BuildAuxDataLocation()
DETMDecoder.cpp869 segments_[0].file_offset = section.file_offset; in Init()
918 uint64_t offset = vaddr - segment.vaddr + segment.file_offset; in ReadMem()
Dread_elf_test.cpp257 ASSERT_EQ(sections[13].file_offset, 0x400); in TEST()
/system/core/trusty/apploader/
Dapploader.cpp134 off64_t file_offset = 0; in read_file() local
135 while (file_offset < file_size) { in read_file()
137 pread(file_fd, (char*)shm + file_offset, file_size - file_offset, file_offset)); in read_file()
149 file_offset += (off64_t)num_read; in read_file()
154 if (file_offset < file_size) { in read_file()
158 assert(file_offset == file_size); in read_file()
/system/core/fs_mgr/libsnapshot/snapuserd/dm-snapshot-merge/
Dsnapuserd_readahead.cpp256 if (bm->new_block == 0 && bm->file_offset == 0) { in ReconstructDataFromCow()
260 loff_t buffer_offset = bm->file_offset - start_data_offset; in ReconstructDataFromCow()
324 bm->file_offset = 0; in ReadAheadIOStart()
330 loff_t file_offset = snapuserd_->GetBufferDataOffset(); in ReadAheadIOStart() local
372 bm->file_offset = file_offset; in ReadAheadIOStart()
375 file_offset += BLOCK_SZ; in ReadAheadIOStart()
399 bm->file_offset = 0; in ReadAheadIOStart()
Dsnapuserd.cpp697 off_t file_offset = offset; in ReadBlocksToCache() local
706 if (!android::base::ReadFullyAtOffset(fd.get(), buf.data(), to_read, file_offset)) { in ReadBlocksToCache()
708 << " at offset: " << file_offset in ReadBlocksToCache()
714 file_offset += to_read; in ReadBlocksToCache()
/system/core/fs_mgr/libsnapshot/snapuserd/user-space-merge/
Dsnapuserd_verify.cpp104 loff_t file_offset = offset; in VerifyBlocks() local
120 size_t to_read = std::min((dev_sz - file_offset), read_sz); in VerifyBlocks()
122 if (!android::base::ReadFullyAtOffset(fd.get(), buffer.get(), to_read, file_offset)) { in VerifyBlocks()
125 << " at offset: " << file_offset << " read-size: " << to_read in VerifyBlocks()
131 file_offset += (skip_blocks * kBlockSizeVerify); in VerifyBlocks()
132 if (file_offset >= dev_sz) { in VerifyBlocks()
Dsnapuserd_readahead.cpp135 if (bm->new_block == 0 && bm->file_offset == 0) { in ReconstructDataFromCow()
139 loff_t buffer_offset = bm->file_offset - start_data_offset; in ReconstructDataFromCow()
365 bm->file_offset = 0; in UpdateScratchMetadata()
367 loff_t file_offset = snapuserd_->GetBufferDataOffset(); in UpdateScratchMetadata() local
376 bm->file_offset = file_offset; in UpdateScratchMetadata()
379 file_offset += BLOCK_SZ; in UpdateScratchMetadata()
388 bm->file_offset = 0; in UpdateScratchMetadata()
542 bm->file_offset = 0; in ReadAheadSyncIO()
544 loff_t file_offset = snapuserd_->GetBufferDataOffset(); in ReadAheadSyncIO() local
590 bm->file_offset = file_offset; in ReadAheadSyncIO()
[all …]
/system/libbase/
Dmapped_file.cpp51 off64_t file_offset = offset - slop; in FromOsHandle() local
67 (file_offset >> 32), file_offset, file_length); in FromOsHandle()
75 void* base = mmap(nullptr, file_length, prot, MAP_SHARED, h, file_offset); in FromOsHandle()
/system/core/libsparse/include/sparse/
Dsparse.h118 int sparse_file_add_file(struct sparse_file* s, const char* filename, int64_t file_offset,
144 int sparse_file_add_fd(struct sparse_file* s, int fd, int64_t file_offset, uint64_t len,
/system/core/libsparse/
Dsparse.cpp62 int sparse_file_add_file(struct sparse_file* s, const char* filename, int64_t file_offset, in sparse_file_add_file() argument
64 return backed_block_add_file(s->backed_block_list, filename, file_offset, len, block); in sparse_file_add_file()
67 int sparse_file_add_fd(struct sparse_file* s, int fd, int64_t file_offset, uint64_t len, in sparse_file_add_fd() argument
69 return backed_block_add_fd(s->backed_block_list, fd, file_offset, len, block); in sparse_file_add_fd()
/system/core/fs_mgr/libsnapshot/include/libsnapshot/
Dcow_format.h179 uint64_t file_offset; member
/system/extras/simpleperf/scripts/
Dpprof_proto_generator.py147 print('%sfile_offset: %x' % (space, mapping.file_offset))
235 self.file_offset = pgoff
244 self.file_offset,
582 profile_mapping.file_offset = mapping.file_offset
/system/unwinding/libunwindstack/tests/
DMapInfoCreateMemoryTest.cpp45 static void InitElf(int fd, uint64_t file_offset, uint64_t sh_offset, uint8_t class_type) { in InitElf() argument
56 memcpy(&buffer[file_offset], &ehdr, sizeof(ehdr)); in InitElf()
/system/extras/simpleperf/scripts/test/
Dpprof_proto_generator_test.py196 addr = location.address - mapping.memory_start + mapping.file_offset

12