/system/logging/logd/ |
D | SerializedLogChunkTest.cpp | 32 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 …]
|
D | SerializedLogBuffer.cpp | 57 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 …]
|
D | SerializedLogBufferTest.cpp | 75 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 …]
|
D | SerializedFlushToStateTest.cpp | 152 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 …]
|
D | SerializedLogChunk.h | 40 LogEntryIterator(SerializedLogChunk& chunk, int read_offset_) in LogEntryIterator() argument 41 : chunk_(chunk), read_offset_(read_offset_) {} in LogEntryIterator()
|
D | SerializedLogBuffer.h | 65 void RemoveChunkFromStats(log_id_t log_id, SerializedLogChunk& chunk);
|
/system/memory/libmemunreachable/ |
D | Allocator.cpp | 81 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/ |
D | storage.c | 206 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/ |
D | ckdf.cpp | 93 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()
|
D | soft_keymaster_enforcement.cpp | 117 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/ |
D | snapuserd_worker.cpp | 386 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 …]
|
D | snapuserd.h | 160 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
|
D | snapuserd.cpp | 265 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/ |
D | snapshot_reader.cpp | 179 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()
|
D | snapshot_reader.h | 68 ssize_t ReadBlock(uint64_t chunk, IByteSink* sink, size_t start_offset,
|
/system/media/audio_utils/ |
D | tinysndfile.c | 115 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/ |
D | sparse_read.cpp | 109 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/ |
D | MountRegistry.cpp | 282 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/ |
D | payload_info.py | 45 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/ |
D | cow_decompress.cpp | 100 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/ |
D | snapuserd_core.h | 263 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/ |
D | apex_compression_test.py | 127 chunk = file.read(h.block_size) 128 if not chunk: 130 h.update(chunk)
|
/system/keymint/common/src/tag/ |
D | legacy.rs | 43 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/ |
D | pagecache.py | 152 chunk = self._file_object.read(self._chunk_size) 153 if not chunk: 155 self._output_queue.put(chunk)
|
/system/security/identity/ |
D | WritableCredential.cpp | 241 for (const auto& chunk : chunks) { in personalize() local 243 status = halBinder_->addEntryValue(chunk, &encryptedChunk); in personalize()
|