/art/dexlayout/ |
D | dex_writer.cc | 29 size_t EncodeIntValue(int32_t value, uint8_t* buffer) { in EncodeIntValue() argument 33 buffer[length++] = static_cast<uint8_t>(value); in EncodeIntValue() 38 buffer[length++] = static_cast<uint8_t>(value); in EncodeIntValue() 42 buffer[length++] = static_cast<uint8_t>(value); in EncodeIntValue() 46 size_t EncodeUIntValue(uint32_t value, uint8_t* buffer) { in EncodeUIntValue() argument 49 buffer[length++] = static_cast<uint8_t>(value); in EncodeUIntValue() 55 size_t EncodeLongValue(int64_t value, uint8_t* buffer) { in EncodeLongValue() argument 59 buffer[length++] = static_cast<uint8_t>(value); in EncodeLongValue() 64 buffer[length++] = static_cast<uint8_t>(value); in EncodeLongValue() 68 buffer[length++] = static_cast<uint8_t>(value); in EncodeLongValue() [all …]
|
/art/compiler/debug/ |
D | elf_debug_frame_writer.h | 34 std::vector<uint8_t>* buffer) { in WriteCIE() argument 61 WriteCIE(is64bit, return_reg, opcodes, format, buffer); in WriteCIE() 84 WriteCIE(is64bit, return_reg, opcodes, format, buffer); in WriteCIE() 108 WriteCIE(is64bit, return_reg, opcodes, format, buffer); in WriteCIE() 134 WriteCIE(is64bit, return_reg, opcodes, format, buffer); in WriteCIE() 160 WriteCIE(is64bit, return_reg, opcodes, format, buffer); in WriteCIE() 219 std::vector<uint8_t> buffer; // Small temporary buffer. in WriteCFISection() local 220 WriteCIE(builder->GetIsa(), format, &buffer); in WriteCFISection() 221 cfi_section->WriteFully(buffer.data(), buffer.size()); in WriteCFISection() 222 buffer_address += buffer.size(); in WriteCFISection() [all …]
|
D | elf_gnu_debugdata_writer.h | 56 const uint8_t* buffer = reinterpret_cast<const uint8_t*>(buf); in XzCompress() local 57 ctx->dst_->insert(ctx->dst_->end(), buffer, buffer + size); in XzCompress() 86 std::vector<uint8_t> buffer; in MakeMiniDebugInfoInternal() local 87 buffer.reserve(KB); in MakeMiniDebugInfoInternal() 88 VectorOutputStream out("Mini-debug-info ELF file", &buffer); in MakeMiniDebugInfoInternal() 103 compressed_buffer.reserve(buffer.size() / 4); in MakeMiniDebugInfoInternal() 104 XzCompress(&buffer, &compressed_buffer); in MakeMiniDebugInfoInternal()
|
D | elf_debug_writer.cc | 118 std::vector<uint8_t> buffer; in WriteDebugElfFileForMethodsInternal() local 119 buffer.reserve(KB); in WriteDebugElfFileForMethodsInternal() 120 VectorOutputStream out("Debug ELF file", &buffer); in WriteDebugElfFileForMethodsInternal() 130 return buffer; in WriteDebugElfFileForMethodsInternal() 150 std::vector<uint8_t> buffer; in WriteDebugElfFileForClassesInternal() local 151 buffer.reserve(KB); in WriteDebugElfFileForClassesInternal() 152 VectorOutputStream out("Debug ELF file", &buffer); in WriteDebugElfFileForClassesInternal() 164 return buffer; in WriteDebugElfFileForClassesInternal()
|
D | elf_debug_line_writer.h | 266 std::vector<uint8_t> buffer; in WriteCompilationUnit() local 267 buffer.reserve(opcodes.data()->size() + KB); in WriteCompilationUnit() 269 WriteDebugLineTable(directories, files, opcodes, offset, &buffer, &debug_line_patches_); in WriteCompilationUnit() 270 builder_->GetDebugLine()->WriteFully(buffer.data(), buffer.size()); in WriteCompilationUnit() 271 return buffer.size(); in WriteCompilationUnit()
|
/art/runtime/base/unix_file/ |
D | fd_file_test.cc | 77 uint8_t buffer[16]; in TEST_F() local 78 EXPECT_FALSE(file.ReadFully(&buffer, 4)); in TEST_F() 108 char buffer[sizeof(read_suffix)]; in TEST_F() local 109 EXPECT_TRUE(file.PreadFully(buffer, sizeof(read_suffix), offset)); in TEST_F() 110 EXPECT_STREQ(&read_suffix[0], &buffer[0]); in TEST_F() 212 uint8_t buffer[16] = { 0 }; in TEST_F() local 213 EXPECT_TRUE(file.WriteFully(&buffer, sizeof(buffer))); in TEST_F() 224 std::vector<uint8_t> buffer; in TEST_F() local 227 buffer.push_back(static_cast<uint8_t>(i)); in TEST_F() 237 EXPECT_TRUE(tmp.GetFile()->WriteFully(&buffer[0], length)); in TEST_F() [all …]
|
D | fd_file.cc | 251 static bool ReadFullyGeneric(int fd, void* buffer, size_t byte_count, size_t offset) { in ReadFullyGeneric() argument 252 char* ptr = static_cast<char*>(buffer); in ReadFullyGeneric() 267 bool FdFile::ReadFully(void* buffer, size_t byte_count) { in ReadFully() argument 268 return ReadFullyGeneric<ReadIgnoreOffset>(fd_, buffer, byte_count, 0); in ReadFully() 271 bool FdFile::PreadFully(void* buffer, size_t byte_count, size_t offset) { in PreadFully() argument 272 return ReadFullyGeneric<pread>(fd_, buffer, byte_count, offset); in PreadFully() 276 bool FdFile::WriteFullyGeneric(const void* buffer, size_t byte_count, size_t offset) { in WriteFullyGeneric() argument 280 const char* ptr = static_cast<const char*>(buffer); in WriteFullyGeneric() 295 bool FdFile::PwriteFully(const void* buffer, size_t byte_count, size_t offset) { in PwriteFully() argument 296 return WriteFullyGeneric<true>(buffer, byte_count, offset); in PwriteFully() [all …]
|
D | fd_file.h | 125 bool ReadFully(void* buffer, size_t byte_count) WARN_UNUSED; 126 bool PreadFully(void* buffer, size_t byte_count, size_t offset) WARN_UNUSED; 127 bool WriteFully(const void* buffer, size_t byte_count) WARN_UNUSED; 128 bool PwriteFully(const void* buffer, size_t byte_count, size_t offset) WARN_UNUSED; 179 bool WriteFullyGeneric(const void* buffer, size_t byte_count, size_t offset);
|
/art/runtime/jit/ |
D | profile_compilation_info.cc | 258 static bool WriteBuffer(int fd, const uint8_t* buffer, size_t byte_count) { in WriteBuffer() argument 260 int bytes_written = TEMP_FAILURE_RETRY(write(fd, buffer, byte_count)); in WriteBuffer() 265 buffer += bytes_written; // Move the buffer forward. in WriteBuffer() 271 static void AddStringToBuffer(std::vector<uint8_t>* buffer, const std::string& value) { in AddStringToBuffer() argument 272 buffer->insert(buffer->end(), value.begin(), value.end()); in AddStringToBuffer() 277 static void AddUintToBuffer(std::vector<uint8_t>* buffer, T value) { in AddUintToBuffer() argument 279 buffer->push_back((value >> (i * kBitsPerByte)) & 0xff); in AddUintToBuffer() 316 std::vector<uint8_t> buffer; in Save() local 324 AddUintToBuffer(&buffer, static_cast<uint8_t>(info_.size())); in Save() 348 AddUintToBuffer(&buffer, required_capacity); in Save() [all …]
|
/art/tools/ahat/src/heapdump/ |
D | AhatClassInstance.java | 185 public final byte[] buffer; field in AhatClassInstance.BitmapInfo 187 public BitmapInfo(int width, int height, byte[] buffer) { in BitmapInfo() argument 190 this.buffer = buffer; in BitmapInfo() 213 byte[] buffer = getByteArrayField("mBuffer"); in getBitmapInfo() 214 if (buffer == null) { in getBitmapInfo() 218 if (buffer.length < 4 * height * width) { in getBitmapInfo() 222 return new BitmapInfo(width, height, buffer); in getBitmapInfo() 237 (((int) info.buffer[i * 4 + 3] & 0xFF) << 24) in asBitmap() 238 + (((int) info.buffer[i * 4 + 0] & 0xFF) << 16) in asBitmap() 239 + (((int) info.buffer[i * 4 + 1] & 0xFF) << 8) in asBitmap() [all …]
|
/art/compiler/optimizing/ |
D | liveness_test.cc | 35 std::ostream& buffer, in DumpBitVector() argument 38 buffer << prefix; in DumpBitVector() 39 buffer << '('; in DumpBitVector() 41 buffer << vector->IsBitSet(i); in DumpBitVector() 43 buffer << ")\n"; in DumpBitVector() 58 std::ostringstream buffer; in TestCode() local 60 buffer << "Block " << block->GetBlockId() << std::endl; in TestCode() 63 DumpBitVector(live_in, buffer, ssa_values, " live in: "); in TestCode() 65 DumpBitVector(live_out, buffer, ssa_values, " live out: "); in TestCode() 67 DumpBitVector(kill, buffer, ssa_values, " kill: "); in TestCode() [all …]
|
/art/compiler/utils/ |
D | assembler.h | 182 explicit EnsureCapacity(AssemblerBuffer* buffer) { in EnsureCapacity() argument 183 if (buffer->cursor() > buffer->limit()) { in EnsureCapacity() 184 buffer->ExtendCapacity(buffer->Size() + kMinimumGap); in EnsureCapacity() 190 buffer_ = buffer; in EnsureCapacity() 196 CHECK(!buffer->HasEnsuredCapacity()); // Cannot nest. in EnsureCapacity() 197 buffer->has_ensured_capacity_ = true; in EnsureCapacity() 223 explicit EnsureCapacity(AssemblerBuffer* buffer) { in EnsureCapacity() argument 224 if (buffer->cursor() > buffer->limit()) { in EnsureCapacity() 225 buffer->ExtendCapacity(buffer->Size() + kMinimumGap); in EnsureCapacity() 296 explicit DebugFrameOpCodeWriterForAssembler(Assembler* buffer) in DebugFrameOpCodeWriterForAssembler() argument [all …]
|
/art/test/070-nio-buffer/ |
D | expected.txt | 1 Direct byte buffer has array: true 2 Got expected buffer overflow exception 4 Got expected buffer overflow exception
|
/art/compiler/linker/ |
D | buffered_output_stream.cc | 32 bool BufferedOutputStream::WriteFully(const void* buffer, size_t byte_count) { in WriteFully() argument 37 return out_->WriteFully(buffer, byte_count); in WriteFully() 44 const uint8_t* src = reinterpret_cast<const uint8_t*>(buffer); in WriteFully()
|
D | vector_output_stream.h | 34 bool WriteFully(const void* buffer, size_t byte_count) OVERRIDE { in WriteFully() argument 36 const uint8_t* start = reinterpret_cast<const uint8_t*>(buffer); in WriteFully() 42 memcpy(&(*vector_)[offset_], buffer, byte_count); in WriteFully()
|
D | file_output_stream.cc | 28 bool FileOutputStream::WriteFully(const void* buffer, size_t byte_count) { in WriteFully() argument 29 return file_->WriteFully(buffer, byte_count); in WriteFully()
|
D | error_delaying_output_stream.h | 37 bool WriteFully(const void* buffer, size_t byte_count) OVERRIDE { in WriteFully() argument 39 if (!output_->WriteFully(buffer, byte_count)) { in WriteFully()
|
/art/runtime/ |
D | utils_test.cc | 422 char buffer[64]; in TEST_F() local 423 const char* buffer_end = buffer + ArrayCount(buffer); in TEST_F() 424 EXPECT_EQ(BoundsCheckedCast<const uint64_t*>(nullptr, buffer, buffer_end), nullptr); in TEST_F() 425 EXPECT_EQ(BoundsCheckedCast<const uint64_t*>(buffer, buffer, buffer_end), in TEST_F() 426 reinterpret_cast<const uint64_t*>(buffer)); in TEST_F() 427 EXPECT_EQ(BoundsCheckedCast<const uint64_t*>(buffer + 56, buffer, buffer_end), in TEST_F() 428 reinterpret_cast<const uint64_t*>(buffer + 56)); in TEST_F() 429 EXPECT_EQ(BoundsCheckedCast<const uint64_t*>(buffer - 1, buffer, buffer_end), nullptr); in TEST_F() 430 EXPECT_EQ(BoundsCheckedCast<const uint64_t*>(buffer + 57, buffer, buffer_end), nullptr); in TEST_F()
|
/art/compiler/debug/dwarf/ |
D | expression.h | 114 explicit Expression(std::vector<uint8_t>* buffer) : Writer<>(buffer) { in Expression() argument 115 buffer->clear(); in Expression()
|
D | writer.h | 125 void PushData(const Vector* buffer) { in PushData() argument 126 data_->insert(data_->end(), buffer->begin(), buffer->end()); in PushData() 171 explicit Writer(Vector* buffer) : data_(buffer) { } in Writer() argument
|
D | debug_abbrev_writer.h | 44 explicit DebugAbbrevWriter(Vector* buffer) in DebugAbbrevWriter() argument 45 : Writer<Vector>(buffer), in DebugAbbrevWriter() 46 current_abbrev_(buffer->get_allocator()) { in DebugAbbrevWriter()
|
D | headers.h | 45 std::vector<uint8_t>* buffer) { in WriteCIE() argument 48 Writer<> writer(buffer); in WriteCIE() 88 std::vector<uint8_t>* buffer, in WriteFDE() argument 93 Writer<> writer(buffer); in WriteFDE() 97 uint32_t cie_pointer = (buffer_address + buffer->size()) - cie_address; in WriteFDE() 106 code_address -= buffer_address + buffer->size(); in WriteFDE() 110 patch_locations->push_back(buffer_address + buffer->size() - section_address); in WriteFDE()
|
/art/runtime/base/ |
D | bit_vector.cc | 330 std::ostringstream buffer; in Dump() local 331 DumpHelper(prefix, buffer); in Dump() 332 os << buffer.str() << std::endl; in Dump() 335 void BitVector::DumpHelper(const char* prefix, std::ostringstream& buffer) const { in DumpHelper() 338 buffer << prefix; in DumpHelper() 341 buffer << '('; in DumpHelper() 343 buffer << IsBitSet(i); in DumpHelper() 345 buffer << ')'; in DumpHelper()
|
/art/compiler/ |
D | verifier_deps_test.cc | 1098 std::vector<uint8_t> buffer; in TEST_F() local 1099 verifier_deps_->Encode(dex_files_, &buffer); in TEST_F() 1100 ASSERT_FALSE(buffer.empty()); in TEST_F() 1102 VerifierDeps decoded_deps(dex_files_, ArrayRef<const uint8_t>(buffer)); in TEST_F() 1110 std::vector<uint8_t> buffer; in TEST_F() local 1111 verifier_deps_->Encode(dex_files_, &buffer); in TEST_F() 1112 ASSERT_FALSE(buffer.empty()); in TEST_F() 1128 VerifierDeps decoded_deps(dex_files, ArrayRef<const uint8_t>(buffer)); in TEST_F() 1198 std::vector<uint8_t> buffer; in TEST_F() local 1199 verifier_deps_->Encode(dex_files_, &buffer); in TEST_F() [all …]
|
/art/tools/ahat/test/ |
D | SnapshotBuilder.java | 50 InMemoryBuffer buffer = new InMemoryBuffer(os.toByteArray()); in makeSnapshot() local 51 return AhatSnapshot.fromDataBuffer(buffer, new ProguardMap()); in makeSnapshot()
|