/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 | 109 auto& chunk = data_chunks[i]; in hmacSha256() local 110 if (!HMAC_Update(ctx.get(), chunk.data, chunk.data_length)) { in hmacSha256()
|
/system/core/fs_mgr/libsnapshot/ |
D | estimate_cow_from_nonab_ota.cpp | 330 std::string chunk(kBlockSize, '\0'); in AnalyzePartition() local 334 if (!android::base::ReadFully(fd, chunk.data(), chunk.size())) { in AnalyzePartition() 343 if (chunk == zeroes) { in AnalyzePartition() 356 if (chunk == src_chunk) { in AnalyzePartition() 365 auto hash = SHA256(chunk); in AnalyzePartition() 373 if (!writer->AddRawBlocks(block_number, chunk.data(), chunk.size())) { in AnalyzePartition() 393 std::string chunk(kBlockSize, '\0'); in GetBlockMap() local 398 if (!android::base::ReadFully(fd, chunk.data(), chunk.size())) { in GetBlockMap() 405 auto hash = SHA256(chunk); in GetBlockMap()
|
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 | snapuserd_worker.cpp | 402 bool WorkerThread::ReadDiskExceptions(chunk_t chunk, size_t read_size) { in ReadDiskExceptions() argument 408 lldiv_t divresult = lldiv(chunk, stride); in ReadDiskExceptions() 557 bool WorkerThread::ProcessMergeComplete(chunk_t chunk, void* buffer) { in ProcessMergeComplete() argument 564 lldiv_t divresult = lldiv(chunk, stride); in ProcessMergeComplete() 567 SNAP_LOG(ERROR) << "ProcessMergeComplete: Invalid chunk: " << chunk in ProcessMergeComplete() 572 SNAP_LOG(DEBUG) << "ProcessMergeComplete: chunk: " << chunk in ProcessMergeComplete() 607 SNAP_LOG(DEBUG) << "Merge success: " << merged_ops_cur_iter << "chunk: " << chunk; in ProcessMergeComplete() 686 chunk_t chunk = SectorToChunk(header->sector); in DmuserWriteRequest() local 702 SNAP_LOG(ERROR) << "ReadDmUserPayload failed for chunk id: " << chunk in DmuserWriteRequest() 707 if (header->type == DM_USER_RESP_SUCCESS && !ProcessMergeComplete(chunk, buffer)) { in DmuserWriteRequest() [all …]
|
D | power_test.cpp | 189 uint8_t chunk[4096]; in Create() local 193 size_t bytes = (size_t)std::min((uint64_t)sizeof(chunk), remaining); in Create() 194 if (!android::base::ReadFully(second_fd, chunk, bytes)) { in Create() 198 if (!android::base::WriteFully(snap_fd, chunk, bytes)) { in Create() 290 uint8_t chunk[4096]; in SetupImages() local 294 size_t bytes = (size_t)std::min((uint64_t)sizeof(chunk), remaining); in SetupImages() 295 if (!android::base::ReadFully(first_fd, chunk, bytes)) { in SetupImages() 299 if (!android::base::WriteFully(image_fd, chunk, bytes)) { in SetupImages() 317 memset(chunk, 0, sizeof(chunk)); in SetupImages() 318 if (!android::base::WriteFully(cow_fd, chunk, sizeof(chunk))) { in SetupImages()
|
D | snapuserd.h | 177 bool ReadDiskExceptions(chunk_t chunk, size_t size); 197 bool ProcessMergeComplete(chunk_t chunk, void* buffer); 204 sector_t ChunkToSector(chunk_t chunk) { return chunk << CHUNK_SHIFT; } in ChunkToSector() argument 289 bool IsChunkIdMetadata(chunk_t chunk); 294 sector_t ChunkToSector(chunk_t chunk) { return chunk << CHUNK_SHIFT; } in ChunkToSector() argument
|
D | cow_decompress.cpp | 99 uint8_t chunk[kChunkSize]; in Decompress() local 101 size_t read = std::min(stream_remaining_, sizeof(chunk)); in Decompress() 102 if (!stream_->Read(chunk, read, &read)) { in Decompress() 109 if (!DecompressInput(chunk, read)) { in Decompress()
|
D | snapuserd.cpp | 249 bool Snapuserd::IsChunkIdMetadata(chunk_t chunk) { in IsChunkIdMetadata() argument 251 lldiv_t divresult = lldiv(chunk, stride); in IsChunkIdMetadata() 258 chunk_t Snapuserd::GetNextAllocatableChunkId(chunk_t chunk) { in GetNextAllocatableChunkId() argument 259 chunk_t next_chunk = chunk + 1; in GetNextAllocatableChunkId()
|
D | snapshot_reader.h | 68 ssize_t ReadBlock(uint64_t chunk, IByteSink* sink, size_t start_offset,
|
/system/core/libsparse/ |
D | sparse_read.cpp | 106 int chunk; in GetCrc32() local 109 chunk = std::min(len, COPY_BUF_SIZE); in GetCrc32() 110 ret = read_all(fd, copybuf, chunk); in GetCrc32() 114 *crc32 = sparse_crc32(*crc32, copybuf, chunk); in GetCrc32() 115 len -= chunk; in GetCrc32() 209 int chunk; in process_fill_chunk() local 237 chunk = std::min(len, COPY_BUF_SIZE); in process_fill_chunk() 238 *crc32 = sparse_crc32(*crc32, copybuf, chunk); in process_fill_chunk() 239 len -= chunk; in process_fill_chunk() 258 int chunk = std::min(len, COPY_BUF_SIZE); in process_skip_chunk() local [all …]
|
/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/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/bt/gd/rust/link/src/acl/ |
D | fragment.rs | 103 .map(move |(i, chunk)| { in fragmenting_stream() 112 payload: Some(Bytes::copy_from_slice(chunk)), in fragmenting_stream()
|
/system/apex/tools/ |
D | apex_compression_test.py | 127 chunk = file.read(h.block_size) 128 if not chunk: 130 h.update(chunk)
|
/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)
|