Home
last modified time | relevance | path

Searched refs:chunk (Results 1 – 25 of 32) sorted by relevance

12

/system/logging/logd/
DSerializedLogChunkTest.cpp32 auto chunk = SerializedLogChunk{chunk_size}; in TEST()
33 EXPECT_EQ(chunk_size + sizeof(SerializedLogChunk), chunk.PruneSize()); in TEST()
37 ASSERT_TRUE(chunk.CanLog(expected_total_len)); in TEST()
38 EXPECT_TRUE(chunk.CanLog(chunk_size)); in TEST()
39 EXPECT_FALSE(chunk.CanLog(chunk_size + 1)); in TEST()
42 auto* entry = chunk.Log(1234, time, 0, 1, 2, log_message, sizeof(log_message)); in TEST()
54 EXPECT_FALSE(chunk.CanLog(chunk_size)); in TEST()
55 EXPECT_EQ(static_cast<int>(expected_total_len), chunk.write_offset()); in TEST()
56 EXPECT_EQ(1234U, chunk.highest_sequence_number()); in TEST()
63 auto chunk = SerializedLogChunk{chunk_size}; in TEST()
[all …]
DSerializedLogBuffer.cpp57 auto chunk = it++; in ClearLogsByUid() local
58 chunk->NotifyReadersOfPrune(log_id); in ClearLogsByUid()
59 chunk->IncReaderRefCount(); in ClearLogsByUid()
62 for (const auto& entry : *chunk) { in ClearLogsByUid()
69 chunk->DecReaderRefCount(); in ClearLogsByUid()
70 new_logs.splice(new_logs.end(), log_buffer, chunk); in ClearLogsByUid()
78 for (const auto& entry : *chunk) { in ClearLogsByUid()
88 chunk->DecReaderRefCount(); in ClearLogsByUid()
89 log_buffer.erase(chunk); in ClearLogsByUid()
177 void SerializedLogBuffer::RemoveChunkFromStats(log_id_t log_id, SerializedLogChunk& chunk) { in RemoveChunkFromStats() argument
[all …]
DSerializedLogBufferTest.cpp75 SerializedLogChunk chunk(max_size / SerializedLogBuffer::kChunkSizeDivisor); in CreateChunk() local
78 if (!chunk.CanLog(sizeof(SerializedLogEntry) + entry.msg.size())) { in CreateChunk()
80 return chunk; in CreateChunk()
82 chunk.Log(entry.sequence, entry.realtime, entry.uid, entry.pid, entry.tid, entry.msg.data(), in CreateChunk()
86 chunk.FinishWriting(); in CreateChunk()
88 return chunk; in CreateChunk()
93 int chunk = 0; in VerifyChunks() local
96 for (; expected_it != expected.end() && it != chunks.end(); ++expected_it, ++it, ++chunk) { in VerifyChunks()
97 EXPECT_EQ(expected_it->reader_ref_count_, it->reader_ref_count_) << "chunk #" << chunk; in VerifyChunks()
98 EXPECT_EQ(expected_it->writer_active_, it->writer_active_) << "chunk #" << chunk; in VerifyChunks()
[all …]
DSerializedFlushToStateTest.cpp152 auto chunk = SerializedLogChunk{kChunkSize}; in AddChunkWithMessages()
156 ASSERT_TRUE(chunk.CanLog(message.size() + 1)); in AddChunkWithMessages()
157 chunk.Log(sequence, log_time(), 0, 1, 1, message.c_str(), message.size() + 1); in AddChunkWithMessages()
160 chunk.FinishWriting(); in AddChunkWithMessages()
162 log_chunks_[buffer].emplace_back(std::move(chunk)); in AddChunkWithMessages()
297 auto chunk = SerializedLogChunk{kChunkSize}; in TEST()
298 chunk.Log(1, log_time(), 0, 1, 1, "abc", 3); in TEST()
299 chunk.Log(2, log_time(), 0, 1, 1, "abc", 3); in TEST()
300 chunk.Log(3, log_time(), 0, 1, 1, "abc", 3); in TEST()
301 chunk.FinishWriting(); in TEST()
[all …]
DSerializedLogChunk.h40 LogEntryIterator(SerializedLogChunk& chunk, int read_offset_) in LogEntryIterator() argument
41 : chunk_(chunk), read_offset_(read_offset_) {} in LogEntryIterator()
DSerializedLogBuffer.h65 void RemoveChunkFromStats(log_id_t log_id, SerializedLogChunk& chunk);
/system/memory/libmemunreachable/
DAllocator.cpp79 void MoveToFullList(Chunk* chunk, int bucket_);
80 void MoveToFreeList(Chunk* chunk, int bucket_);
88 void MoveToList(Chunk* chunk, LinkedList<Chunk*>* head);
323 Chunk* chunk = free_chunks_[i].next()->data(); in ~HeapImpl() local
324 chunk->node_.remove(); in ~HeapImpl()
325 delete chunk; in ~HeapImpl()
328 Chunk* chunk = full_chunks_[i].next()->data(); in ~HeapImpl() local
329 chunk->node_.remove(); in ~HeapImpl()
330 delete chunk; in ~HeapImpl()
346 Chunk* chunk = new Chunk(this, bucket); in AllocLocked() local
[all …]
/system/core/trusty/storage/lib/
Dstorage.c206 size_t chunk = MAX_CHUNK_SIZE; in storage_read() local
210 if (chunk > size) in storage_read()
211 chunk = size; in storage_read()
212 rc = _read_chunk(fh, off, ptr, chunk); in storage_read()
243 size_t chunk = MAX_CHUNK_SIZE; in storage_write() local
248 if (chunk >= size) { in storage_write()
250 chunk = size; in storage_write()
253 rc = _write_req(fh, off, ptr, chunk, msg_flags); in storage_write()
256 if ((size_t)rc != chunk) { in storage_write()
260 off += chunk; in storage_write()
[all …]
/system/core/fs_mgr/libsnapshot/libsnapshot_cow/
Dsnapshot_reader.cpp121 for (uint64_t chunk = start_chunk + 1; chunk < end_chunk; chunk++) { in Read() local
122 ssize_t rv = ReadBlock(chunk, 0, buf_pos, buf_remaining); in Read()
148 ssize_t CompressedSnapshotReader::ReadBlock(uint64_t chunk, size_t start_offset, void* buffer, in ReadBlock() argument
157 if (chunk < ops_.size()) { in ReadBlock()
158 op = ops_[chunk]; in ReadBlock()
174 chunk = GetBlockFromOffset(cow_->GetHeader(), source_offset); in ReadBlock()
177 off64_t offset = (chunk * block_size_) + start_offset; in ReadBlock()
195 if (!GetBlockOffset(op, chunk, block_size_, &block_offset)) { in ReadBlock()
Dcow_decompress.cpp104 uint8_t chunk[kChunkSize]; in Decompress() local
106 size_t max_read = std::min(stream_remaining_, sizeof(chunk)); in Decompress()
107 ssize_t read = stream_->Read(chunk, max_read); in Decompress()
115 if (!PartialDecompress(chunk, read)) { in Decompress()
Dwriter_v3.cpp402 size_t chunk = std::min(num_blocks - total_written, batch_size_); in EmitBlocks() local
405 old_block + total_written, offset, type, chunk)) { in EmitBlocks()
415 total_written += chunk; in EmitBlocks()
722 int chunk = std::min(static_cast<int>(data.size() - i), IOV_MAX); in WriteOperation() local
724 const auto ret = pwritev(fd_, data.data() + i, chunk, next_data_pos_ + total_written); in WriteOperation()
726 PLOG(ERROR) << "write failed chunk size of: " << chunk in WriteOperation()
731 i += chunk; in WriteOperation()
Dsnapshot_reader.h48 ssize_t ReadBlock(uint64_t chunk, size_t start_offset, void* buffer, size_t size);
/system/keymaster/km_openssl/
Dckdf.cpp93 for (size_t chunk = 0; chunk < num_chunks; ++chunk) { in DEFINE_OPENSSL_OBJECT_POINTER() local
94 if (!CMAC_Update(ctx.get(), context_chunks[chunk].data, in DEFINE_OPENSSL_OBJECT_POINTER()
95 context_chunks[chunk].data_length)) { in DEFINE_OPENSSL_OBJECT_POINTER()
Dsoft_keymaster_enforcement.cpp121 auto& chunk = data_chunks[i]; in hmacSha256() local
122 if (!HMAC_Update(ctx.get(), chunk.data, chunk.data_length)) { in hmacSha256()
/system/media/audio_utils/
Dtinysndfile.c115 unsigned char chunk[8]; in sf_open_read() local
116 actual = fread(chunk, sizeof(char), sizeof(chunk), stream); in sf_open_read()
117 if (actual != sizeof(chunk)) { in sf_open_read()
119 fprintf(stderr, "actual %zu != %zu\n", actual, sizeof(chunk)); in sf_open_read()
124 unsigned chunkSize = little4u(&chunk[4]); in sf_open_read()
131 if (!memcmp(&chunk[0], "fmt ", 4)) { in sf_open_read()
230 } else if (!memcmp(&chunk[0], "data", 4)) { in sf_open_read()
250 } else if (!memcmp(&chunk[0], "fact", 4)) { in sf_open_read()
259 chunk[0], chunk[1], chunk[2], chunk[3]); in sf_open_read()
/system/core/libsparse/
Dsparse_read.cpp109 int chunk; in GetCrc32() local
112 chunk = std::min(len, COPY_BUF_SIZE); in GetCrc32()
113 ret = read_all(fd, copybuf, chunk); in GetCrc32()
117 *crc32 = sparse_crc32(*crc32, copybuf, chunk); in GetCrc32()
118 len -= chunk; in GetCrc32()
250 int chunk; in process_fill_chunk() local
278 chunk = std::min(len, COPY_BUF_SIZE); in process_fill_chunk()
279 *crc32 = sparse_crc32(*crc32, copybuf, chunk); in process_fill_chunk()
280 len -= chunk; in process_fill_chunk()
299 int chunk = std::min(len, COPY_BUF_SIZE); in process_skip_chunk() local
[all …]
/system/incremental_delivery/incfs/
DMountRegistry.cpp282 auto chunk = std::string_view{nextLine, size_t(readEnd - nextLine)}; in forEachLine()
284 auto lineEnd = chunk.find('\n'); in forEachLine()
285 if (lineEnd == chunk.npos) { in forEachLine()
288 cb(chunk.substr(0, lineEnd)); in forEachLine()
289 chunk.remove_prefix(lineEnd + 1); in forEachLine()
290 } while (!chunk.empty()); in forEachLine()
292 const auto remainingSize = readEnd - chunk.end(); in forEachLine()
293 memmove(buffer, chunk.end(), remainingSize); in forEachLine()
/system/update_engine/scripts/
Dpayload_info.py46 chunk = bytearray(data[off:off + 16])
48 ' '.join('%.2x' % c for c in chunk) +
49 ' ' * (16 - len(chunk)) +
51 ''.join(chr(c) if 32 <= c < 127 else '.' for c in chunk))
/system/core/fs_mgr/libsnapshot/snapuserd/user-space-merge/
Dread_worker.h61 constexpr sector_t ChunkToSector(chunk_t chunk) { return chunk << CHUNK_SHIFT; } in ChunkToSector() argument
Dread_worker.cpp188 uint8_t chunk[buffer_size]; in ProcessCowOp() local
189 if (!ProcessReplaceOp(cow_op, chunk, buffer_size)) { in ProcessCowOp()
192 std::memcpy(buffer, chunk, BLOCK_SZ); in ProcessCowOp()
470 uint8_t chunk[buffer_size]; in ReadUnalignedSector() local
472 if (!ProcessReplaceOp(cow_op, chunk, buffer_size)) { in ReadUnalignedSector()
485 std::memcpy(buffer, (char*)chunk + skip_offset, write_sz); in ReadUnalignedSector()
Dsnapuserd_core.h191 sector_t ChunkToSector(chunk_t chunk) { return chunk << CHUNK_SHIFT; } in ChunkToSector() argument
/system/keymint/common/src/tag/
Dlegacy.rs57 let chunk: [u8; 4] = data[..4].try_into().unwrap(); // safe: just checked in consume_u32() localVariable
59 Ok(u32::from_ne_bytes(chunk)) in consume_u32()
67 let chunk: [u8; 4] = data[..4].try_into().unwrap(); // safe: just checked in consume_i32() localVariable
69 Ok(i32::from_ne_bytes(chunk)) in consume_i32()
77 let chunk: [u8; 8] = data[..8].try_into().unwrap(); // safe: just checked in consume_u64() localVariable
79 Ok(u64::from_ne_bytes(chunk)) in consume_u64()
87 let chunk: [u8; 8] = data[..8].try_into().unwrap(); // safe: just checked in consume_i64() localVariable
89 Ok(i64::from_ne_bytes(chunk)) in consume_i64()
/system/apex/tools/
Dapex_compression_test.py120 chunk = file.read(h.block_size)
121 if not chunk:
123 h.update(chunk)
/system/security/keystore2/src/
Dsw_keyblob.rs322 let chunk: [u8; LEN] = data[..LEN].try_into().unwrap(); // safe: just checked in consume_u32() localVariable
324 Ok(u32::from_ne_bytes(chunk)) in consume_u32()
333 let chunk: [u8; LEN] = data[..LEN].try_into().unwrap(); // safe: just checked in consume_i32() localVariable
335 Ok(i32::from_ne_bytes(chunk)) in consume_i32()
344 let chunk: [u8; LEN] = data[..LEN].try_into().unwrap(); // safe: just checked in consume_i64() localVariable
346 Ok(i64::from_ne_bytes(chunk)) in consume_i64()
/system/extras/pagecache/
Dpagecache.py152 chunk = self._file_object.read(self._chunk_size)
153 if not chunk:
155 self._output_queue.put(chunk)

12