Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 542) sorted by relevance

12345678910>>...22

/system/extras/libfec/
Dfec_read.cpp50 ptrdiff_t offset = &hex[m * 3] - hex; in dump() local
51 snprintf(hex + offset, sizeof(hex) - offset, "%02x ", in dump()
69 static inline bool is_erasure(fec_handle *f, uint64_t offset, in is_erasure() argument
72 if (unlikely(offset >= f->data_size)) { in is_erasure()
80 uint64_t n = offset / FEC_BLOCKSIZE; in is_erasure()
86 static inline bool is_zero(fec_handle *f, uint64_t offset) in is_zero() argument
90 if (hashtree.hash_data.empty() || unlikely(offset >= f->data_size)) { in is_zero()
94 uint64_t hash_offset = (offset / FEC_BLOCKSIZE) * SHA256_DIGEST_LENGTH; in is_zero()
107 static int __ecc_read(fec_handle *f, void *rs, uint8_t *dest, uint64_t offset, in __ecc_read() argument
110 check(offset % FEC_BLOCKSIZE == 0); in __ecc_read()
[all …]
Dfec_open.cpp42 static int find_offset(uint64_t file_size, int roots, uint64_t *offset, in find_offset() argument
45 check(offset); in find_offset()
69 *offset = mi; in find_offset()
89 static int find_verity_offset(fec_handle *f, uint64_t *offset) in find_verity_offset() argument
92 check(offset); in find_verity_offset()
94 return find_offset(f->data_size, 0, offset, get_verity_size, in find_verity_offset()
99 static int parse_ecc_header(fec_handle *f, uint64_t offset) in parse_ecc_header() argument
105 debug("offset = %" PRIu64, offset); in parse_ecc_header()
107 if (offset > f->size - sizeof(fec_header)) { in parse_ecc_header()
115 if (!raw_pread(f->fd, &header, sizeof(fec_header), offset)) { in parse_ecc_header()
[all …]
/system/core/property_service/libpropertyinfoserializer/
Dtrie_node_arena.h29 ArenaObjectPointer(std::string& arena_data, uint32_t offset) in ArenaObjectPointer() argument
30 : arena_data_(arena_data), offset_(offset) {} in ArenaObjectPointer()
48 uint32_t offset; in AllocateObject() local
49 AllocateData(sizeof(T), &offset); in AllocateObject()
50 if (return_offset) *return_offset = offset; in AllocateObject()
51 return ArenaObjectPointer<T>(data_, offset); in AllocateObject()
55 uint32_t offset; in AllocateUint32Array() local
56 AllocateData(sizeof(uint32_t) * length, &offset); in AllocateUint32Array()
57 return offset; in AllocateUint32Array()
60 uint32_t* uint32_array(uint32_t offset) { in uint32_array() argument
[all …]
/system/chre/util/nanoapp/
Ddebug.cc34 size_t offset = 0; in logBuffer() local
48 offset += static_cast<size_t>( in logBuffer()
49 snprintf(&line[offset], sizeof(line) - offset, "%02x ", buffer[i - 1])); in logBuffer()
55 offset = 0; in logBuffer()
58 offset += static_cast<size_t>( in logBuffer()
59 snprintf(&line[offset], sizeof(line) - offset, " ")); in logBuffer()
63 if (offset > 0) { in logBuffer()
66 while (offset < 28) { in logBuffer()
68 offset += 8; in logBuffer()
/system/unwinding/libunwindstack/tests/
DSymbolsTest.cpp65 uint64_t offset = 0x1000; in TYPED_TEST_P() local
66 this->memory_.SetMemory(offset, &sym, sizeof(sym)); in TYPED_TEST_P()
92 uint64_t offset = 0x1000; in TYPED_TEST_P() local
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()
125 uint64_t offset = 0x1000; in TYPED_TEST_P() local
129 this->memory_.SetMemory(offset, &sym, sizeof(sym)); in TYPED_TEST_P()
132 offset += sizeof(sym); in TYPED_TEST_P()
135 this->memory_.SetMemory(offset, &sym, sizeof(sym)); in TYPED_TEST_P()
[all …]
DElfFake.h43 FunctionData(std::string name, uint64_t offset) : name(name), offset(offset) {} in FunctionData()
46 uint64_t offset; member
81 void FakeSetGlobalVariable(const std::string& global, uint64_t offset) { in FakeSetGlobalVariable() argument
82 globals_[global] = offset; in FakeSetGlobalVariable()
102 void FakeSetDataOffset(uint64_t offset) { data_offset_ = offset; } in FakeSetDataOffset() argument
106 void FakeSetDynamicOffset(uint64_t offset) { dynamic_offset_ = offset; } in FakeSetDynamicOffset() argument
110 void FakeSetGnuDebugdataOffset(uint64_t offset) { gnu_debugdata_offset_ = offset; } in FakeSetGnuDebugdataOffset() argument
127 void FakeSetEhFrameOffset(uint64_t offset) { eh_frame_offset_ = offset; } in FakeSetEhFrameOffset() argument
129 void FakeSetDebugFrameOffset(uint64_t offset) { debug_frame_offset_ = offset; } in FakeSetDebugFrameOffset() argument
138 void FakeSetEhFrameOffset(uint64_t offset) { eh_frame_offset_ = offset; } in FakeSetEhFrameOffset() argument
[all …]
DMemoryOfflineTest.cpp34 ASSERT_TRUE(android::base::WriteFully(temp_file.fd, &offset, sizeof(offset))); in SetUp()
44 uint64_t offset = 4096; 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()
DMapInfoGetBuildIDTest.cpp141 off_t offset = 0; in InitElfData() local
142 ASSERT_EQ(offset, lseek(fd, offset, SEEK_SET)); in InitElfData()
161 offset += ehdr.e_shoff + sizeof(shdr); in InitElfData()
162 ASSERT_EQ(offset, lseek(fd, offset, SEEK_SET)); in InitElfData()
171 offset += sizeof(shdr); in InitElfData()
172 ASSERT_EQ(offset, lseek(fd, offset, SEEK_SET)); in InitElfData()
175 offset = 0xf500; in InitElfData()
176 ASSERT_EQ(offset, lseek(fd, offset, SEEK_SET)); in InitElfData()
180 offset = 0xb000; in InitElfData()
181 ASSERT_EQ(offset, lseek(fd, offset, SEEK_SET)); in InitElfData()
/system/extras/ioshark/
Dioshark_bench_mmap.c47 off_t offset; member
59 size_t total_len, off_t offset) in setup_mmap_io_state() argument
69 mio->table[mio->num_entries].offset = offset; in setup_mmap_io_state()
73 offset += mio->table[mio->num_entries].len; in setup_mmap_io_state()
80 off_t *offset) in mmap_getnext_off_len() argument
98 *offset = mio->table[i].offset; in mmap_getnext_off_len()
99 mio->table[i].offset += iolength; in mmap_getnext_off_len()
106 mmap_do_io(void *db_node, int prot, off_t offset, size_t len, in mmap_do_io() argument
117 p, len, offset); in mmap_do_io()
123 len, offset, files_db_get_fd(db_node), in mmap_do_io()
[all …]
/system/unwinding/libunwindstack/offline_files/shared_lib_in_apk_single_map_arm64/
Doutput.txt2 #01 pc 00000000008cdf5c test.apk (offset 0x5000)
3 #02 pc 00000000008cde9c test.apk (offset 0x5000)
4 #03 pc 00000000008cdd70 test.apk (offset 0x5000)
5 #04 pc 00000000008ce408 test.apk (offset 0x5000)
6 #05 pc 00000000008ce8d8 test.apk (offset 0x5000)
7 #06 pc 00000000008ce814 test.apk (offset 0x5000)
8 #07 pc 00000000008bcf60 test.apk (offset 0x5000)
9 #08 pc 0000000000133024 test.apk (offset 0x5000)
10 #09 pc 0000000000134ad0 test.apk (offset 0x5000)
11 #10 pc 0000000000134b64 test.apk (offset 0x5000)
/system/unwinding/libunwindstack/
DMapInfo.cpp80 prev_real_map->offset() >= offset()) { in InitFileMemoryFromPreviousReadOnlyMap()
85 if (!memory->Init(name(), prev_real_map->offset(), map_size)) { in InitFileMemoryFromPreviousReadOnlyMap()
94 if (!memory->Init(name(), prev_real_map->offset(), max_size)) { in InitFileMemoryFromPreviousReadOnlyMap()
98 set_elf_offset(offset() - prev_real_map->offset()); in InitFileMemoryFromPreviousReadOnlyMap()
99 set_elf_start_offset(prev_real_map->offset()); in InitFileMemoryFromPreviousReadOnlyMap()
110 if (offset() == 0) { in GetFileMemory()
136 if (!memory->Init(name(), offset(), map_size)) { in GetFileMemory()
143 set_elf_start_offset(offset()); in GetFileMemory()
145 if (memory->Init(name(), offset(), max_size)) { in GetFileMemory()
149 if (memory->Init(name(), offset(), map_size)) { in GetFileMemory()
[all …]
DElfInterface.cpp155 uint64_t offset = ehdr.e_phoff; in GetLoadBias() local
156 for (size_t i = 0; i < ehdr.e_phnum; i++, offset += ehdr.e_phentsize) { in GetLoadBias()
158 if (!memory->ReadFully(offset, &phdr, sizeof(phdr))) { in GetLoadBias()
172 uint64_t offset = ehdr.e_phoff; in ReadProgramHeaders() local
174 for (size_t i = 0; i < ehdr.e_phnum; i++, offset += ehdr.e_phentsize) { in ReadProgramHeaders()
176 if (!memory_->ReadFully(offset, &phdr, sizeof(phdr))) { in ReadProgramHeaders()
229 uint64_t offset = 0; in ReadBuildID() local
230 while (offset < gnu_build_id_size_) { in ReadBuildID()
231 if (gnu_build_id_size_ - offset < sizeof(NhdrType)) { in ReadBuildID()
235 if (!memory_->ReadFully(gnu_build_id_offset_ + offset, &hdr, sizeof(hdr))) { in ReadBuildID()
[all …]
DSymbols.cpp32 Symbols::Symbols(uint64_t offset, uint64_t size, uint64_t entry_size, uint64_t str_offset, in Symbols() argument
34 : offset_(offset), in Symbols()
79 uint64_t offset = symbol_index * entry_size_; in BinarySearch() local
80 if (__builtin_add_overflow(offset, offset_, &offset)) { in BinarySearch()
85 if (!elf_memory->ReadFully(offset, &sym, sizeof(sym))) { in BinarySearch()
117 uint64_t offset = symbol_idx * entry_size_; in BuildRemapTable() local
118 if (__builtin_add_overflow(offset, offset_, &offset)) { in BuildRemapTable()
122 read_bytes = elf_memory->Read(offset, buffer, read_bytes); in BuildRemapTable()
127 for (uint64_t offset = 0; offset <= read_bytes - sizeof(SymType); in BuildRemapTable() local
128 offset += entry_size_, symbol_idx++) { in BuildRemapTable()
[all …]
/system/chre/test/simulation/inc/
Dtest_event.h38 #define CHRE_SIMULATION_TEST_EVENT_ID(offset) \ argument
39 (CHRE_EVENT_SIMULATION_TEST_FIRST_EVENT + (offset))
58 #define CHRE_SPECIFIC_SIMULATION_TEST_EVENT_ID(offset) \ argument
59 (CHRE_EVENT_SPECIFIC_SIMULATION_TEST_FIRST_EVENT + (offset))
71 #define CREATE_CHRE_TEST_EVENT(name, offset) \ argument
72 constexpr uint16_t name = CHRE_SPECIFIC_SIMULATION_TEST_EVENT_ID(offset)
/system/core/fs_mgr/libvbmeta/
Dwriter.cpp45 const uint64_t offset = PRIMARY_SUPER_VBMETA_TABLE_OFFSET; in WritePrimaryVBMetaTable() local
46 if (lseek(fd, offset, SEEK_SET) < 0) { in WritePrimaryVBMetaTable()
51 return ErrnoError() << "Failed to write primary vbmeta table at offset " << offset; in WritePrimaryVBMetaTable()
57 const uint64_t offset = BACKUP_SUPER_VBMETA_TABLE_OFFSET; in WriteBackupVBMetaTable() local
58 if (lseek(fd, offset, SEEK_SET) < 0) { in WriteBackupVBMetaTable()
63 return ErrnoError() << "Failed to write backup vbmeta table at offset " << offset; in WriteBackupVBMetaTable()
69 const uint64_t offset = IndexOffset(slot_number); in WriteVBMetaImage() local
70 if (lseek(fd, offset, SEEK_SET) < 0) { in WriteVBMetaImage()
75 return ErrnoError() << "Failed to write vbmeta image at offset " << offset; in WriteVBMetaImage()
Dreader.cpp58 Result<void> ReadVBMetaTable(int fd, uint64_t offset, VBMetaTable* table) { in ReadVBMetaTable() argument
62 offset)) { in ReadVBMetaTable()
63 return ErrnoError() << "Couldn't read super vbmeta header at offset " << offset; in ReadVBMetaTable()
71 const uint64_t descriptors_offset = offset + table->header.header_size; in ReadVBMetaTable()
86 uint64_t offset = PRIMARY_SUPER_VBMETA_TABLE_OFFSET; in ReadPrimaryVBMetaTable() local
87 return ReadVBMetaTable(fd, offset, table); in ReadPrimaryVBMetaTable()
91 uint64_t offset = BACKUP_SUPER_VBMETA_TABLE_OFFSET; in ReadBackupVBMetaTable() local
92 return ReadVBMetaTable(fd, offset, table); in ReadBackupVBMetaTable()
96 const uint64_t offset = 2 * SUPER_VBMETA_TABLE_MAX_SIZE + slot * VBMETA_IMAGE_MAX_SIZE; in ReadVBMetaImage() local
98 if (!android::base::ReadFullyAtOffset(fd, buffer.get(), VBMETA_IMAGE_MAX_SIZE, offset)) { in ReadVBMetaImage()
[all …]
/system/core/libutils/include/utils/
DCompat.h32 static inline void* mmap64(void* addr, size_t length, int prot, int flags, int fd, off64_t offset) { in mmap64() argument
33 return mmap(addr, length, prot, flags, fd, offset); in mmap64()
36 static inline off64_t lseek64(int fd, off64_t offset, int whence) { in lseek64() argument
37 return lseek(fd, offset, whence); in lseek64()
40 static inline ssize_t pread64(int fd, void* buf, size_t nbytes, off64_t offset) { in pread64() argument
41 return pread(fd, buf, nbytes, offset); in pread64()
44 static inline ssize_t pwrite64(int fd, const void* buf, size_t nbytes, off64_t offset) { in pwrite64() argument
45 return pwrite(fd, buf, nbytes, offset); in pwrite64()
/system/core/fs_mgr/liblp/include/liblp/
Dsuper_layout_builder.h37 SuperImageExtent(uint64_t offset, uint64_t size, Type type) in SuperImageExtent()
38 : offset(offset), size(size), type(type) {} in SuperImageExtent()
40 SuperImageExtent(uint64_t offset, std::shared_ptr<std::string> blob) in SuperImageExtent()
41 : SuperImageExtent(offset, blob->size(), Type::DATA) { in SuperImageExtent()
45 SuperImageExtent(uint64_t offset, uint64_t size, const std::string& image_name, in SuperImageExtent()
47 : SuperImageExtent(offset, size, Type::PARTITION) { in SuperImageExtent()
55 bool operator<(const SuperImageExtent& other) const { return offset < other.offset; }
59 uint64_t offset = 0; member
/system/update_engine/payload_generator/
Dboot_img_filesystem.cc116 uint64_t offset, in GetFile() argument
120 file.extents = {ExtentForBytes(kBlockSize, offset, size)}; in GetFile()
123 if (utils::ReadFileChunk(filename_, offset, size, &data)) { in GetFile()
129 << offset << " of " << filename_ << ", found " in GetFile()
134 deflate.offset += offset * 8; in GetFile()
145 uint64_t offset = page_size_; in GetFiles() local
146 if (kernel_size_ > 0 && offset + kernel_size_ <= file_size) { in GetFiles()
147 files->emplace_back(GetFile("<kernel>", offset, kernel_size_)); in GetFiles()
149 offset += utils::RoundUp(kernel_size_, page_size_); in GetFiles()
150 if (ramdisk_size_ > 0 && offset + ramdisk_size_ <= file_size) { in GetFiles()
[all …]
/system/core/property_service/libpropertyinfoparser/include/property_info_parser/
Dproperty_info_parser.h74 const char* c_string(uint32_t offset) const { in c_string() argument
75 if (offset != 0 && offset > size()) return nullptr; in c_string()
76 return static_cast<const char*>(data_base_ + offset); in c_string()
79 const uint32_t* uint32_array(uint32_t offset) const { in uint32_array() argument
80 if (offset != 0 && offset > size()) return nullptr; in uint32_array()
81 return reinterpret_cast<const uint32_t*>(data_base_ + offset); in uint32_array()
84 uint32_t uint32(uint32_t offset) const { in uint32() argument
85 if (offset != 0 && offset > size()) return ~0u; in uint32()
86 return *reinterpret_cast<const uint32_t*>(data_base_ + offset); in uint32()
186 TrieNode trie(uint32_t offset) const { in trie() argument
[all …]
/system/extras/simpleperf/
Dtracing.h33 size_t offset = 0; member
40 return name == other.name && offset == other.offset && elem_size == other.elem_size &&
47 uint32_t offset; member
51 return ConvertBytesToValue(raw_data + offset, size); in ReadFromData()
56 uint32_t offset; member
62 memcpy(s, raw_data + offset, size); in ReadFromData()
75 place.offset = field.offset; in GetField()
81 place.offset = field.offset; in GetField()
/system/nfc/src/nfc/nci/
Dnci_hmsgs.cc53 p->offset = NCI_MSG_OFFSET_SIZE; in nci_snd_core_reset()
55 pp = (uint8_t*)(p + 1) + p->offset; in nci_snd_core_reset()
84 p->offset = NCI_MSG_OFFSET_SIZE; in nci_snd_core_init()
86 pp = (uint8_t*)(p + 1) + p->offset; in nci_snd_core_init()
118 p->offset = NCI_MSG_OFFSET_SIZE; in nci_snd_core_get_config()
120 pp = (uint8_t*)(p + 1) + p->offset; in nci_snd_core_get_config()
151 p->offset = NCI_MSG_OFFSET_SIZE; in nci_snd_core_set_config()
152 pp = (uint8_t*)(p + 1) + p->offset; in nci_snd_core_set_config()
200 p->offset = NCI_MSG_OFFSET_SIZE; in nci_snd_core_conn_create()
202 pp = (uint8_t*)(p + 1) + p->offset; in nci_snd_core_conn_create()
[all …]
/system/unwinding/libunwindstack/include/unwindstack/
DDwarfMemory.h51 void set_pc_offset(int64_t offset) { pc_offset_ = offset; } in set_pc_offset() argument
54 void set_data_offset(uint64_t offset) { data_offset_ = offset; } in set_data_offset() argument
57 void set_func_offset(uint64_t offset) { func_offset_ = offset; } in set_func_offset() argument
60 void set_text_offset(uint64_t offset) { text_offset_ = offset; } in set_text_offset() argument
/system/core/libutils/
DFileMap_test.cpp42 off64_t offset = INT32_MAX + 1024LL; in TEST() local
45 ASSERT_EQ(offset, lseek64(tf.fd, offset, SEEK_SET)); in TEST()
50 ASSERT_TRUE(m.create("test", tf.fd, offset, 0, true)); in TEST()
53 ASSERT_EQ(offset, m.getDataOffset()); in TEST()
62 off64_t offset = 200; in TEST() local
66 ASSERT_FALSE(m.create("test", tf.fd, offset, length, true)); in TEST()
/system/incremental_delivery/incfs/util/
Dmap_ptr.cpp41 off64_t IncFsFileMap::offset() const { in offset() function in android::incfs::IncFsFileMap
49 bool IncFsFileMap::Create(int fd, off64_t offset, size_t length, const char* file_name) { in Create() argument
50 return Create(fd, offset, length, file_name, true /* verify */); in Create()
64 bool IncFsFileMap::Create(int fd, off64_t offset, size_t length, const char* file_name, in Create() argument
66 return CreateForceVerification(fd, offset, length, file_name, in Create()
70 bool IncFsFileMap::CreateForceVerification(int fd, off64_t offset, size_t length, in CreateForceVerification() argument
73 if (!map_->create(file_name, fd, offset, length, true /* readOnly */)) { in CreateForceVerification()
82 size_t offset_diff = offset % INCFS_DATA_FILE_BLOCK_SIZE; in CreateForceVerification()
84 start_block_offset_ = offset - offset_diff; in CreateForceVerification()
139 bool IncFsFileMap::Create(int fd, off64_t offset, size_t length, const char* file_name, in Create() argument
[all …]

12345678910>>...22