/system/update_engine/payload_consumer/ |
D | extent_reader_unittest.cc | 81 DirectExtentReader reader; in TEST_F() local 82 EXPECT_TRUE(reader.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F() 83 EXPECT_TRUE(reader.Seek(0)); in TEST_F() 85 EXPECT_TRUE(reader.Read(blob1.data(), blob1.size())); in TEST_F() 93 DirectExtentReader reader; in TEST_F() local 94 EXPECT_TRUE(reader.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F() 95 EXPECT_TRUE(reader.Seek(0)); in TEST_F() 97 EXPECT_TRUE(reader.Read(blob.data(), 0)); in TEST_F() 98 EXPECT_FALSE(reader.Read(blob.data(), 1)); in TEST_F() 102 DirectExtentReader reader; in TEST_F() local [all …]
|
D | partition_writer.cc | 113 BsdiffExtentFile(std::unique_ptr<ExtentReader> reader, size_t size) in BsdiffExtentFile() argument 114 : BsdiffExtentFile(std::move(reader), nullptr, size) {} in BsdiffExtentFile() 154 BsdiffExtentFile(std::unique_ptr<ExtentReader> reader, in BsdiffExtentFile() argument 157 : reader_(std::move(reader)), in BsdiffExtentFile() 174 PuffinExtentStream(std::unique_ptr<ExtentReader> reader, uint64_t size) in PuffinExtentStream() argument 175 : PuffinExtentStream(std::move(reader), nullptr, size) {} in PuffinExtentStream() 222 PuffinExtentStream(std::unique_ptr<ExtentReader> reader, in PuffinExtentStream() argument 225 : reader_(std::move(reader)), in PuffinExtentStream() 487 auto reader = std::make_unique<DirectExtentReader>(); in PerformSourceBsdiffOperation() local 489 reader->Init(source_fd, operation.src_extents(), block_size_)); in PerformSourceBsdiffOperation() [all …]
|
D | file_descriptor_utils.cc | 50 DirectExtentReader reader; in CommonHashExtents() local 51 TEST_AND_RETURN_FALSE(reader.Init(source, src_extents, block_size)); in CommonHashExtents() 56 TEST_AND_RETURN_FALSE(reader.Read(buf.data(), read_blocks * block_size)); in CommonHashExtents()
|
/system/nvram/messages/ |
D | message_codec.cpp | 90 ProtoReader* reader, in Decode() argument 94 return decoder.Decode(reader); in Decode() 97 bool MessageDecoderBase::Decode(ProtoReader* reader) { in Decode() argument 98 NestedInputStreamBuffer nested_stream_buffer(reader->stream_buffer(), in Decode() 99 reader->field_size()); in Decode() 104 bool MessageDecoderBase::DecodeData(ProtoReader* reader) { in DecodeData() argument 105 while (!reader->Done()) { in DecodeData() 106 if (!reader->ReadWireTag()) { in DecodeData() 109 const FieldDescriptor* desc = FindDescriptor(reader); in DecodeData() 111 if (!desc->decode_function(object_, reader)) { in DecodeData() [all …]
|
/system/core/fs_mgr/libsnapshot/ |
D | snapshot_reader_test.cpp | 74 auto reader = writer->OpenReader(); in TestBlockReads() local 75 ASSERT_NE(reader, nullptr); in TestBlockReads() 85 ASSERT_EQ(reader->Seek(i * kBlockSize, SEEK_SET), i * kBlockSize); in TestBlockReads() 86 ASSERT_EQ(reader->Read(block.data(), block.size()), kBlockSize); in TestBlockReads() 92 ASSERT_EQ(reader->Seek(3 * kBlockSize, SEEK_SET), 3 * kBlockSize); in TestBlockReads() 93 ASSERT_EQ(reader->Read(block.data(), block.size()), kBlockSize); in TestBlockReads() 96 ASSERT_EQ(reader->Seek(5 * kBlockSize, SEEK_SET), 5 * kBlockSize); in TestBlockReads() 97 ASSERT_EQ(reader->Read(block.data(), block.size()), kBlockSize); in TestBlockReads() 102 ASSERT_EQ(reader->Seek(7 * kBlockSize, SEEK_SET), 7 * kBlockSize); in TestBlockReads() 103 ASSERT_EQ(reader->Read(two_blocks.data(), two_blocks.size()), two_blocks.size()); in TestBlockReads() [all …]
|
D | cow_api_test.cpp | 82 CowReader reader; in TEST_F() local 85 ASSERT_TRUE(reader.Parse(cow_->fd)); in TEST_F() 86 ASSERT_TRUE(reader.GetHeader(&header)); in TEST_F() 87 ASSERT_TRUE(reader.GetFooter(&footer)); in TEST_F() 94 auto iter = reader.GetOpIter(); in TEST_F() 115 ASSERT_TRUE(reader.ReadData(*op, &sink)); in TEST_F() 159 CowReader reader; in TEST_F() local 160 ASSERT_TRUE(reader.Parse(cow_->fd)); in TEST_F() 162 auto iter = reader.GetOpIter(); in TEST_F() 173 ASSERT_TRUE(reader.ReadData(*op, &sink)); in TEST_F() [all …]
|
D | inspect_cow.cpp | 63 static void ShowBad(CowReader& reader, const struct CowOperation& op) { in ShowBad() argument 67 if (!reader.GetRawBytes(op.source, buffer.get(), op.data_length, &count)) { in ShowBad() 88 CowReader reader; in Inspect() local 89 if (!reader.Parse(fd)) { in Inspect() 95 if (!reader.GetHeader(&header)) { in Inspect() 101 if (reader.GetFooter(&footer)) has_footer = true; in Inspect() 117 auto iter = reader.GetOpIter(); in Inspect() 126 if (!reader.ReadData(op, &sink)) { in Inspect() 129 if (show_bad) ShowBad(reader, op); in Inspect()
|
D | snapshot_writer.cpp | 83 auto reader = std::make_unique<CompressedSnapshotReader>(); in OpenReader() local 84 if (!reader->SetCow(std::move(cow))) { in OpenReader() 89 reader->SetSourceDevice(*source_device_); in OpenReader() 94 reader->SetBlockDeviceSize(*cow_options.max_blocks * cow_options.block_size); in OpenReader() 97 return reader; in OpenReader()
|
/system/nvram/messages/include/nvram/messages/ |
D | proto.hpp | 142 NVRAM_NOINLINE bool DecodeField(Type& value, ProtoReader* reader) { in DecodeField() argument 143 return Codec::Decode(value, reader); in DecodeField() 157 static bool Decode(Blob& blob, ProtoReader* reader) { in Decode() 158 return blob.Resize(reader->field_size()) && in Decode() 159 reader->ReadLengthDelimited(blob.data(), blob.size()); in Decode() 193 static bool Decode(Type& value, ProtoReader* reader) { in Decode() 195 if (!reader->ReadVarint(&raw_value)) { in Decode() 218 static bool Decode(Vector<ElementType>& vector, ProtoReader* reader) { in Decode() 220 DecodeField<ElementCodec>(vector[vector.size() - 1], reader); in Decode() 234 static bool Decode(Optional<ValueType>& value, ProtoReader* reader) { in Decode() [all …]
|
D | message_codec.h | 42 using DecodeFunction = bool(void* object, ProtoReader* reader); 112 ProtoReader* reader, 118 bool Decode(ProtoReader* reader); 123 bool DecodeData(ProtoReader* reader); 129 const FieldDescriptor* FindDescriptor(ProtoReader* reader) const;
|
/system/extras/simpleperf/ |
D | cmd_merge.cpp | 181 auto get_arch = [](std::unique_ptr<RecordFileReader>& reader) { in CheckFeatureSection() argument 182 return reader->ReadFeatureString(PerfFileFormat::FEAT_ARCH); in CheckFeatureSection() 184 auto get_kernel_version = [](std::unique_ptr<RecordFileReader>& reader) { in CheckFeatureSection() argument 185 return reader->ReadFeatureString(PerfFileFormat::FEAT_OSRELEASE); in CheckFeatureSection() 187 auto get_meta_info = [](std::unique_ptr<RecordFileReader>& reader, const char* key) { in CheckFeatureSection() argument 188 auto it = reader->GetMetaInfoFeature().find(key); in CheckFeatureSection() 189 return it == reader->GetMetaInfoFeature().end() ? "" : it->second; in CheckFeatureSection() 191 auto get_simpleperf_version = [&](std::unique_ptr<RecordFileReader>& reader) { in CheckFeatureSection() argument 192 return get_meta_info(reader, "simpleperf_version"); in CheckFeatureSection() 194 auto get_trace_offcpu = [&](std::unique_ptr<RecordFileReader>& reader) { in CheckFeatureSection() argument [all …]
|
D | record_file_test.cpp | 86 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(tmpfile_.path); in TEST_F() local 87 ASSERT_TRUE(reader != nullptr); in TEST_F() 88 std::vector<EventAttrWithId> attrs = reader->AttrSection(); in TEST_F() 94 std::vector<std::unique_ptr<Record>> records = reader->DataSection(); in TEST_F() 99 std::vector<BuildIdRecord> read_build_id_records = reader->ReadBuildIdFeature(); in TEST_F() 103 ASSERT_TRUE(reader->Close()); in TEST_F() 120 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(tmpfile_.path); in TEST_F() local 121 ASSERT_TRUE(reader != nullptr); in TEST_F() 122 std::vector<EventAttrWithId> attrs = reader->AttrSection(); in TEST_F() 149 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(tmpfile_.path); in TEST_F() local [all …]
|
D | cmd_record_test.cpp | 99 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(record_file); in CheckEventType() local 100 ASSERT_TRUE(reader); in CheckEventType() 101 std::vector<EventAttrWithId> attrs = reader->AttrSection(); in CheckEventType() 152 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(tmpfile.path); in TEST() local 153 ASSERT_TRUE(reader != nullptr); in TEST() 154 std::vector<std::unique_ptr<Record>> records = reader->DataSection(); in TEST() 172 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(tmpfile.path); in TEST() local 173 ASSERT_TRUE(reader != nullptr); in TEST() 174 const FileHeader& file_header = reader->FileHeader(); in TEST() 176 ASSERT_GT(reader->FeatureSectionDescriptors().size(), 0u); in TEST() [all …]
|
D | kallsyms.cpp | 44 LineReader reader(kKallsymsPath); in CanReadKernelSymbolAddresses() local 45 if (!reader.Ok()) { in CanReadKernelSymbolAddresses() 51 std::string* line = reader.ReadLine(); in CanReadKernelSymbolAddresses() 174 LineReader reader(kProcModulesPath); in GetLoadedModules() local 175 if (!reader.Ok()) { in GetLoadedModules() 182 while ((line = reader.ReadLine()) != nullptr) { in GetLoadedModules() 212 LineReader reader(kKallsymsPath); in GetKernelStartAddress() local 213 if (!reader.Ok()) { in GetKernelStartAddress() 217 while ((line = reader.ReadLine()) != nullptr) { in GetKernelStartAddress()
|
D | utils_test.cpp | 82 LineReader reader(tmpfile.path); in TEST() local 83 ASSERT_TRUE(reader.Ok()); in TEST() 84 std::string* line = reader.ReadLine(); in TEST() 87 line = reader.ReadLine(); in TEST() 90 ASSERT_TRUE(reader.ReadLine() == nullptr); in TEST()
|
D | cmd_api_test.cpp | 50 auto reader = RecordFileReader::CreateInstance(filename); in CheckPerfDataFile() local 51 ASSERT_TRUE(reader); in CheckPerfDataFile() 53 ASSERT_TRUE(reader->ReadDataSection([&](std::unique_ptr<Record> r) { in CheckPerfDataFile()
|
/system/logging/logd/ |
D | SerializedLogChunk.cpp | 60 void SerializedLogChunk::AttachReader(SerializedFlushToState* reader) { in AttachReader() argument 61 readers_.emplace_back(reader); in AttachReader() 65 void SerializedLogChunk::DetachReader(SerializedFlushToState* reader) { in DetachReader() argument 66 auto it = std::find(readers_.begin(), readers_.end(), reader); in DetachReader() 75 for (auto& reader : readers) { in NotifyReadersOfPrune() local 76 reader->Prune(log_id); in NotifyReadersOfPrune()
|
D | LogBufferTest.h | 149 auto reader = TestReaderThread(params, *this); in ReadLogMessagesNonBlockingThread() local 150 reader.WaitUntilReleased(); in ReadLogMessagesNonBlockingThread() 154 return reader.read_log_messages(); in ReadLogMessagesNonBlockingThread() 160 for (auto& reader : reader_list_.reader_threads()) { in ReleaseAndJoinReaders() 161 reader->Release(); in ReleaseAndJoinReaders()
|
D | SimpleLogBuffer.cpp | 341 void SimpleLogBuffer::KickReader(LogReaderThread* reader, log_id_t id, unsigned long prune_rows) { in KickReader() argument 345 LOG(WARNING) << "Kicking blocked reader, " << reader->name() in KickReader() 347 reader->Release(); in KickReader() 348 } else if (reader->deadline().time_since_epoch().count() != 0) { in KickReader() 350 reader->TriggerReader(); in KickReader() 353 LOG(WARNING) << "Skipping " << prune_rows << " entries from slow reader, " << reader->name() in KickReader() 355 reader->TriggerSkip(id, prune_rows); in KickReader()
|
/system/bt/gd/rust/hal/src/ |
D | rootcanal_hal.rs | 44 let (reader, writer) = TcpStream::connect(&config.to_socket_addr().unwrap()) in provide_rootcanal_hal() 49 rt.spawn(dispatch_incoming(inner_hal.evt_tx, inner_hal.acl_tx, inner_hal.iso_tx, reader)); in provide_rootcanal_hal() 78 reader: R, in dispatch_incoming() 83 let mut reader = BufReader::new(reader); in dispatch_incoming() localVariable 87 reader.read_exact(&mut buffer).await?; in dispatch_incoming() 90 reader.read_exact(&mut buffer).await?; in dispatch_incoming() 94 reader.read_exact(&mut payload).await?; in dispatch_incoming() 103 reader.read_exact(&mut buffer).await?; in dispatch_incoming() 107 reader.read_exact(&mut payload).await?; in dispatch_incoming() 116 reader.read_exact(&mut buffer).await?; in dispatch_incoming() [all …]
|
/system/bt/profile/sdp/common/test/ |
D | data_element_reader_test.cc | 195 DataElementReader reader(packet->begin(), packet->end()); in TEST_P() local 196 auto read_value = reader.ReadNext(); in TEST_P() 201 ASSERT_EQ(reader.ReadNext(), DataElement(std::monostate())); in TEST_P() 220 DataElementReader reader(packet->begin(), packet->end()); in TEST() local 223 auto data_element = reader.ReadNext(); in TEST() 239 data_element = reader.ReadNext(); in TEST() 245 ASSERT_EQ(reader.ReadNext(), DataElement(std::monostate())); in TEST() 251 DataElementReader reader(packet->begin(), packet->end()); in TEST() local 253 ASSERT_EQ(reader.ReadNext(), DataElement(std::monostate())); in TEST() 259 DataElementReader reader(packet->begin(), packet->end()); in TEST() local [all …]
|
/system/update_engine/aosp/ |
D | logging_android.cc | 57 base::DirReaderPosix reader(kLogsRoot.c_str()); in DeleteOldLogs() local 58 if (!reader.IsValid()) { in DeleteOldLogs() 64 while (reader.Next()) { in DeleteOldLogs() 65 if (reader.name()[0] == '.') in DeleteOldLogs() 72 if (sscanf(reader.name(), in DeleteOldLogs() 76 old_logs.push_back(reader.name()); in DeleteOldLogs() 78 LOG(WARNING) << "Unrecognized log file " << reader.name(); in DeleteOldLogs()
|
/system/nvram/core/ |
D | persistence.cpp | 69 ProtoReader reader(&stream); in DecodeObject() local 70 if (!reader.ReadWireTag() || reader.field_number() != magic || in DecodeObject() 71 reader.wire_type() != WireType::kLengthDelimited || in DecodeObject() 72 !proto::detail::MessageDecoder<Object>::Decode(*object, &reader)) { in DecodeObject()
|
/system/core/fs_mgr/liblp/ |
D | reader.cpp | 167 static bool ReadMetadataHeader(Reader* reader, LpMetadata* metadata) { in ReadMetadataHeader() argument 172 if (!reader->ReadFully(&header, sizeof(LpMetadataHeaderV1_0))) { in ReadMetadataHeader() 201 if (!reader->ReadFully(offset, remaining_bytes)) { in ReadMetadataHeader() 247 Reader* reader) { in ParseMetadata() argument 252 if (!ReadMetadataHeader(reader, metadata.get())) { in ParseMetadata() 271 if (!reader->ReadFully(buffer.get(), header.tables_size)) { in ParseMetadata() 367 MemoryReader reader(buffer, size); in ParseMetadata() local 368 return ParseMetadata(geometry, &reader); in ParseMetadata() 372 FileReader reader(fd); in ParseMetadata() local 373 return ParseMetadata(geometry, &reader); in ParseMetadata()
|
/system/extras/libjsonpb/verify/ |
D | verify.cpp | 139 std::unique_ptr<Json::CharReader> reader(builder.newCharReader()); in AllFieldsAreKnown() local 141 if (!reader->parse(&*json.begin(), &*json.end(), &value, error)) { in AllFieldsAreKnown() 157 std::unique_ptr<Json::CharReader> reader(builder.newCharReader()); in EqReformattedJson() local 159 if (!reader->parse(&*json.begin(), &*json.end(), &old_json, error)) { in EqReformattedJson() 169 if (!reader->parse(&*new_json_string->begin(), &*new_json_string->end(), &new_json, error)) { in EqReformattedJson()
|