Home
last modified time | relevance | path

Searched refs:chunk (Results 1 – 25 of 31) 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.cpp81 void MoveToFullList(Chunk* chunk, int bucket_);
82 void MoveToFreeList(Chunk* chunk, int bucket_);
90 void MoveToList(Chunk* chunk, LinkedList<Chunk*>* head);
343 Chunk* chunk = free_chunks_[i].next()->data(); in ~HeapImpl() local
344 chunk->node_.remove(); in ~HeapImpl()
345 delete chunk; in ~HeapImpl()
348 Chunk* chunk = full_chunks_[i].next()->data(); in ~HeapImpl() local
349 chunk->node_.remove(); in ~HeapImpl()
350 delete chunk; in ~HeapImpl()
366 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/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.cpp117 auto& chunk = data_chunks[i]; in hmacSha256() local
118 if (!HMAC_Update(ctx.get(), chunk.data, chunk.data_length)) { in hmacSha256()
/system/core/fs_mgr/libsnapshot/snapuserd/dm-snapshot-merge/
Dsnapuserd_worker.cpp386 bool WorkerThread::ReadDiskExceptions(chunk_t chunk, size_t read_size) { in ReadDiskExceptions() argument
392 lldiv_t divresult = lldiv(chunk, stride); in ReadDiskExceptions()
541 bool WorkerThread::ProcessMergeComplete(chunk_t chunk, void* buffer) { in ProcessMergeComplete() argument
548 lldiv_t divresult = lldiv(chunk, stride); in ProcessMergeComplete()
551 SNAP_LOG(ERROR) << "ProcessMergeComplete: Invalid chunk: " << chunk in ProcessMergeComplete()
556 SNAP_LOG(DEBUG) << "ProcessMergeComplete: chunk: " << chunk in ProcessMergeComplete()
591 SNAP_LOG(DEBUG) << "Merge success: " << merged_ops_cur_iter << "chunk: " << chunk; in ProcessMergeComplete()
670 chunk_t chunk = SectorToChunk(header->sector); in DmuserWriteRequest() local
686 SNAP_LOG(ERROR) << "ReadDmUserPayload failed for chunk id: " << chunk in DmuserWriteRequest()
691 if (header->type == DM_USER_RESP_SUCCESS && !ProcessMergeComplete(chunk, buffer)) { in DmuserWriteRequest()
[all …]
Dsnapuserd.h160 bool ReadDiskExceptions(chunk_t chunk, size_t size);
181 bool ProcessMergeComplete(chunk_t chunk, void* buffer);
188 sector_t ChunkToSector(chunk_t chunk) { return chunk << CHUNK_SHIFT; } in ChunkToSector() argument
275 bool IsChunkIdMetadata(chunk_t chunk);
280 sector_t ChunkToSector(chunk_t chunk) { return chunk << CHUNK_SHIFT; } in ChunkToSector() argument
Dsnapuserd.cpp265 bool Snapuserd::IsChunkIdMetadata(chunk_t chunk) { in IsChunkIdMetadata() argument
267 lldiv_t divresult = lldiv(chunk, stride); in IsChunkIdMetadata()
274 chunk_t Snapuserd::GetNextAllocatableChunkId(chunk_t chunk) { in GetNextAllocatableChunkId() argument
275 chunk_t next_chunk = chunk + 1; in GetNextAllocatableChunkId()
/system/core/fs_mgr/libsnapshot/
Dsnapshot_reader.cpp179 for (uint64_t chunk = start_chunk + 1; chunk < end_chunk; chunk++) { in Read() local
180 ssize_t rv = ReadBlock(chunk, &sink, 0); in Read()
227 ssize_t CompressedSnapshotReader::ReadBlock(uint64_t chunk, IByteSink* sink, size_t start_offset, in ReadBlock() argument
239 if (chunk < ops_.size()) { in ReadBlock()
240 op = ops_[chunk]; in ReadBlock()
262 chunk = op->source; in ReadBlock()
265 off64_t offset = (chunk * block_size_) + start_offset; in ReadBlock()
Dsnapshot_reader.h68 ssize_t ReadBlock(uint64_t chunk, IByteSink* sink, size_t start_offset,
/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.py45 chunk = bytearray(data[off:off + 16])
47 ' '.join('%.2x' % c for c in chunk) +
48 ' ' * (16 - len(chunk)) +
50 ''.join(chr(c) if 32 <= c < 127 else '.' for c in chunk))
/system/core/fs_mgr/libsnapshot/libsnapshot_cow/
Dcow_decompress.cpp100 uint8_t chunk[kChunkSize]; in Decompress() local
102 size_t read = std::min(stream_remaining_, sizeof(chunk)); in Decompress()
103 if (!stream_->Read(chunk, read, &read)) { in Decompress()
110 if (!DecompressInput(chunk, read)) { in Decompress()
/system/core/fs_mgr/libsnapshot/snapuserd/user-space-merge/
Dsnapuserd_core.h263 sector_t ChunkToSector(chunk_t chunk) { return chunk << CHUNK_SHIFT; } in ChunkToSector() argument
390 sector_t ChunkToSector(chunk_t chunk) { return chunk << CHUNK_SHIFT; } in ChunkToSector() argument
/system/apex/tools/
Dapex_compression_test.py127 chunk = file.read(h.block_size)
128 if not chunk:
130 h.update(chunk)
/system/keymint/common/src/tag/
Dlegacy.rs43 let chunk: [u8; 4] = data[..4].try_into().unwrap(); // safe: just checked in consume_u32() localVariable
45 Ok(u32::from_ne_bytes(chunk)) in consume_u32()
53 let chunk: [u8; 4] = data[..4].try_into().unwrap(); // safe: just checked in consume_i32() localVariable
55 Ok(i32::from_ne_bytes(chunk)) in consume_i32()
63 let chunk: [u8; 8] = data[..8].try_into().unwrap(); // safe: just checked in consume_u64() localVariable
65 Ok(u64::from_ne_bytes(chunk)) in consume_u64()
73 let chunk: [u8; 8] = data[..8].try_into().unwrap(); // safe: just checked in consume_i64() localVariable
75 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)
/system/security/identity/
DWritableCredential.cpp241 for (const auto& chunk : chunks) { in personalize() local
243 status = halBinder_->addEntryValue(chunk, &encryptedChunk); in personalize()

12