/art/test/712-varhandle-invocations/src/ |
D | VarHandleUnitTestHelpers.java | 96 public static boolean getBytesAs_boolean(ByteBuffer buffer, int index, ByteOrder order) { in getBytesAs_boolean() argument 97 return buffer.order(order).get(index) != 0; in getBytesAs_boolean() 100 public static byte getBytesAs_byte(ByteBuffer buffer, int index, ByteOrder order) { in getBytesAs_byte() argument 101 return buffer.order(order).get(index); in getBytesAs_byte() 104 public static char getBytesAs_char(ByteBuffer buffer, int index, ByteOrder order) { in getBytesAs_char() argument 105 return buffer.order(order).getChar(index); in getBytesAs_char() 108 public static short getBytesAs_short(ByteBuffer buffer, int index, ByteOrder order) { in getBytesAs_short() argument 109 return buffer.order(order).getShort(index); in getBytesAs_short() 112 public static int getBytesAs_int(ByteBuffer buffer, int index, ByteOrder order) { in getBytesAs_int() argument 113 return buffer.order(order).getInt(index); in getBytesAs_int() [all …]
|
D | VarHandleArrayTests.java | 240 for (final ByteBuffer buffer : buffers) { in testByteBufferVarHandle() 244 assertThrowsIOOBE(() -> vhShort.get(buffer, -1)); in testByteBufferVarHandle() 245 assertThrowsIOOBE(() -> vhShort.get(buffer, Integer.MIN_VALUE)); in testByteBufferVarHandle() 246 assertThrowsIOOBE(() -> vhShort.get(buffer, Integer.MAX_VALUE)); in testByteBufferVarHandle() 247 assertThrowsIOOBE(() -> vhShort.get(buffer, buffer.limit())); in testByteBufferVarHandle() 248 assertThrowsIOOBE(() -> vhShort.get(buffer, buffer.limit() - 1)); in testByteBufferVarHandle() 249 final int zeroAlignment = buffer.alignmentOffset(0, Short.BYTES); in testByteBufferVarHandle() 250 for (int i = 0; i < buffer.limit() - 1; ++i) { in testByteBufferVarHandle() 253 vhShort.set(buffer, i, value); in testByteBufferVarHandle() 254 assertEquals(value, (short) vhShort.get(buffer, i)); in testByteBufferVarHandle() [all …]
|
D | VarHandleBadCoordinateTests.java | 587 for (ByteBuffer buffer : buffers) { in doTest() 588 assertThrowsIOOBE(() -> vh.get(buffer, -1)); in doTest() 589 assertThrowsIOOBE(() -> vh.get(buffer, Integer.MIN_VALUE)); in doTest() 590 assertThrowsIOOBE(() -> vh.get(buffer, Integer.MAX_VALUE)); in doTest() 591 assertThrowsIOOBE(() -> vh.get(buffer, buffer.limit())); in doTest() 592 assertThrowsIOOBE(() -> vh.get(buffer, buffer.limit() - BYTES_PER_FLOAT + 1)); in doTest() 593 vh.get(buffer, buffer.limit() - BYTES_PER_FLOAT); in doTest() 622 for (ByteBuffer buffer : buffers) { in doTest() 623 int alignedIndex = VarHandleUnitTestHelpers.alignedOffset_int(buffer, 0); in doTest() 627 vh.set(buffer, i, 380); in doTest() [all …]
|
/art/libprofile/profile/ |
D | profile_helpers.h | 29 inline bool WriteBuffer(int fd, const uint8_t* buffer, size_t byte_count) { in WriteBuffer() argument 31 int bytes_written = TEMP_FAILURE_RETRY(write(fd, buffer, byte_count)); in WriteBuffer() 36 buffer += bytes_written; // Move the buffer forward. in WriteBuffer() 42 inline void AddStringToBuffer(std::vector<uint8_t>* buffer, const std::string& value) { in AddStringToBuffer() argument 43 buffer->insert(buffer->end(), value.begin(), value.end()); in AddStringToBuffer() 48 inline void AddUintToBuffer(std::vector<uint8_t>* buffer, T value) { in AddUintToBuffer() argument 50 buffer->push_back((value >> (i * kBitsPerByte)) & 0xff); in AddUintToBuffer()
|
D | profile_boot_info.cc | 42 std::vector<uint8_t> buffer; in Save() local 45 AddUintToBuffer(&buffer, static_cast<uint8_t>(dex_file->GetLocation().size())); in Save() 46 AddStringToBuffer(&buffer, dex_file->GetLocation()); in Save() 49 AddUintToBuffer(&buffer, static_cast<uint8_t>(0)); in Save() 53 AddUintToBuffer(&buffer, pair.first); in Save() 54 AddUintToBuffer(&buffer, pair.second); in Save() 56 if (!WriteBuffer(fd, buffer.data(), buffer.size())) { in Save()
|
D | profile_compilation_info.cc | 398 ProfileLoadStatus Read(void* buffer, 936 static bool WriteBuffer(int fd, const void* buffer, size_t byte_count) { in WriteBuffer() argument 938 int bytes_written = TEMP_FAILURE_RETRY(write(fd, buffer, byte_count)); in WriteBuffer() 943 reinterpret_cast<const uint8_t*&>(buffer) += bytes_written; // Move the buffer forward. in WriteBuffer() 1085 SafeBuffer buffer(dex_files_section_size); in Save() local 1086 buffer.WriteUintAndAdvance(dchecked_integral_cast<ProfileIndexType>(info_.size())); in Save() 1088 buffer.WriteUintAndAdvance(dex_data->checksum); in Save() 1089 buffer.WriteUintAndAdvance(dex_data->num_type_ids); in Save() 1090 buffer.WriteUintAndAdvance(dex_data->num_method_ids); in Save() 1091 buffer.WriteUintAndAdvance(dchecked_integral_cast<uint16_t>(dex_data->profile_key.size())); in Save() [all …]
|
/art/tools/ahat/src/main/com/android/ahat/heapdump/ |
D | AhatBitmapInstance.java | 164 AhatInstance buffer = bufferVal.asAhatInstance(); in toBitmapDumpData() local 165 result.buffers.put(nativePtr.asLong(), buffer.asArrayInstance().asByteArray()); in toBitmapDumpData() 166 result.referenced.add(buffer.getId()); in toBitmapDumpData() 201 private final byte[] buffer; field in AhatBitmapInstance.BitmapInfo 204 public BitmapInfo(int width, int height, int format, byte[] buffer) { in BitmapInfo() argument 208 this.buffer = buffer; in BitmapInfo() 209 bufferHash = Arrays.hashCode(buffer); in BitmapInfo() 256 byte[] buffer = getByteArrayField("mBuffer"); in getBitmapInfo() 257 if (buffer != null) { in getBitmapInfo() 258 if (buffer.length < 4 * height * width) { in getBitmapInfo() [all …]
|
/art/test/070-nio-buffer/ |
D | Android.bp | 3 // Build rules for ART run-test `070-nio-buffer`. 16 name: "art-run-test-070-nio-buffer", 21 ":art-run-test-070-nio-buffer-expected-stdout", 22 ":art-run-test-070-nio-buffer-expected-stderr", 28 name: "art-run-test-070-nio-buffer-expected-stdout", 29 out: ["art-run-test-070-nio-buffer-expected-stdout.txt"], 36 name: "art-run-test-070-nio-buffer-expected-stderr", 37 out: ["art-run-test-070-nio-buffer-expected-stderr.txt"],
|
D | expected-stdout.txt | 1 Direct byte buffer has array: true 2 Got expected buffer overflow exception 4 Got expected buffer overflow exception
|
/art/compiler/debug/ |
D | elf_debug_frame_writer.h | 39 static void WriteCIE(InstructionSet isa, /*inout*/ std::vector<uint8_t>* buffer) { in WriteCIE() argument 66 WriteCIE(is64bit, return_reg, opcodes, buffer); in WriteCIE() 89 WriteCIE(is64bit, return_reg, opcodes, buffer); in WriteCIE() 112 WriteCIE(is64bit, return_reg, opcodes, buffer); in WriteCIE() 138 WriteCIE(is64bit, return_reg, opcodes, buffer); in WriteCIE() 164 WriteCIE(is64bit, return_reg, opcodes, buffer); in WriteCIE() 211 std::vector<uint8_t> buffer; // Small temporary buffer. in WriteCFISection() local 212 WriteCIE(builder->GetIsa(), &buffer); in WriteCFISection() 213 cfi_section->WriteFully(buffer.data(), buffer.size()); in WriteCFISection() 214 buffer.clear(); in WriteCFISection() [all …]
|
D | elf_debug_writer.cc | 122 std::vector<uint8_t> buffer; in MakeMiniDebugInfoInternal() local 123 buffer.reserve(KB); in MakeMiniDebugInfoInternal() 124 VectorOutputStream out("Mini-debug-info ELF file", &buffer); in MakeMiniDebugInfoInternal() 143 compressed_buffer.reserve(buffer.size() / 4); in MakeMiniDebugInfoInternal() 144 XzCompress(ArrayRef<const uint8_t>(buffer), &compressed_buffer); in MakeMiniDebugInfoInternal() 184 std::vector<uint8_t> buffer; in MakeElfFileForJIT() local 185 buffer.reserve(KB); in MakeElfFileForJIT() 186 VectorOutputStream out("Debug ELF file", &buffer); in MakeElfFileForJIT() 208 Reader reader(buffer); in MakeElfFileForJIT() 225 return buffer; in MakeElfFileForJIT() [all …]
|
/art/libartbase/base/ |
D | bit_table_test.cc | 34 std::vector<uint8_t> buffer; in TEST() local 35 BitMemoryWriter<std::vector<uint8_t>> writer(&buffer); in TEST() 39 BitMemoryReader reader(buffer.data()); in TEST() 51 std::vector<uint8_t> buffer; in TEST() local 52 BitMemoryWriter<std::vector<uint8_t>> writer(&buffer); in TEST() 60 BitMemoryReader reader(buffer.data()); in TEST() 77 std::vector<uint8_t> buffer; in TEST() local 78 BitMemoryWriter<std::vector<uint8_t>> writer(&buffer, start_bit_offset); in TEST() 83 BitMemoryReader reader(buffer.data(), start_bit_offset); in TEST() 97 std::vector<uint8_t> buffer; in TEST() local [all …]
|
/art/tools/ahat/src/test-dump/android/graphics/ |
D | Bitmap.java | 29 public Bitmap(int width, int height, long nativePtr, byte[] buffer) { in Bitmap() argument 33 dumpData.add(nativePtr, buffer); in Bitmap() 51 public void add(long nativePtr, byte[] buffer) { in add() argument 53 buffers[count] = buffer; in add()
|
/art/compiler/utils/ |
D | assembler.h | 181 explicit EnsureCapacity(AssemblerBuffer* buffer) { in EnsureCapacity() argument 182 if (buffer->cursor() > buffer->limit()) { in EnsureCapacity() 183 buffer->ExtendCapacity(buffer->Size() + kMinimumGap); in EnsureCapacity() 189 buffer_ = buffer; in EnsureCapacity() 195 CHECK(!buffer->HasEnsuredCapacity()); // Cannot nest. in EnsureCapacity() 196 buffer->has_ensured_capacity_ = true; in EnsureCapacity() 222 explicit EnsureCapacity(AssemblerBuffer* buffer) { in EnsureCapacity() argument 223 if (buffer->cursor() > buffer->limit()) { in EnsureCapacity() 224 buffer->ExtendCapacity(buffer->Size() + kMinimumGap); in EnsureCapacity() 297 explicit DebugFrameOpCodeWriterForAssembler(Assembler* buffer) in DebugFrameOpCodeWriterForAssembler() argument [all …]
|
/art/compiler/optimizing/ |
D | liveness_test.cc | 37 std::ostream& buffer, in DumpBitVector() argument 40 buffer << prefix; in DumpBitVector() 41 buffer << '('; in DumpBitVector() 43 buffer << vector->IsBitSet(i); in DumpBitVector() 45 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/test/2036-jni-filechannel/src/ |
D | Main.java | 28 MappedByteBuffer buffer = channel.map(FileChannel.MapMode.READ_ONLY, 0, 0); in main() local 29 checkBufferCapacity(buffer, 0); in main() 32 static native void checkBufferCapacity(Buffer buffer, int expectedCapacity); in checkBufferCapacity() argument
|
/art/libelffile/stream/ |
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()
|
/art/libartbase/base/unix_file/ |
D | fd_file_test.cc | 113 uint8_t buffer[16]; in TEST_F() local 114 EXPECT_FALSE(file.ReadFully(&buffer, 4)); in TEST_F() 144 char buffer[sizeof(read_suffix)]; in TEST_F() local 145 EXPECT_TRUE(file.PreadFully(buffer, sizeof(read_suffix), offset)); in TEST_F() 146 EXPECT_STREQ(&read_suffix[0], &buffer[0]); in TEST_F() 578 uint8_t buffer[16] = { 0 }; in TEST_F() local 579 EXPECT_TRUE(file.WriteFully(&buffer, sizeof(buffer))); in TEST_F() 590 std::vector<uint8_t> buffer; in TEST_F() local 593 buffer.push_back(static_cast<uint8_t>(i)); in TEST_F() 603 EXPECT_TRUE(tmp.GetFile()->WriteFully(&buffer[0], length)); in TEST_F() [all …]
|
D | fd_file.h | 106 bool ReadFully(void* buffer, size_t byte_count) WARN_UNUSED; 107 bool PreadFully(void* buffer, size_t byte_count, size_t offset) WARN_UNUSED; 108 bool WriteFully(const void* buffer, size_t byte_count) WARN_UNUSED; 109 bool PwriteFully(const void* buffer, size_t byte_count, size_t offset) WARN_UNUSED; 176 bool WriteFullyGeneric(const void* buffer, size_t byte_count, size_t offset);
|
/art/dex2oat/ |
D | verifier_deps_test.cc | 313 bool RunValidation(Fn fn, const std::vector<uint8_t>& buffer) { in RunValidation() argument 320 bool parsed = decoded_deps.ParseStoredData(second_dex_files, ArrayRef<const uint8_t>(buffer)); in RunValidation() 480 std::vector<uint8_t> buffer; in TEST_F() local 481 verifier_deps_->Encode(dex_files_, &buffer); in TEST_F() 482 ASSERT_FALSE(buffer.empty()); in TEST_F() 485 bool parsed = decoded_deps.ParseStoredData(dex_files_, ArrayRef<const uint8_t>(buffer)); in TEST_F() 494 std::vector<uint8_t> buffer; in TEST_F() local 495 verifier_deps_->Encode(dex_files_, &buffer); in TEST_F() 496 ASSERT_FALSE(buffer.empty()); in TEST_F() 514 bool parsed = decoded_deps.ParseStoredData(dex_files, ArrayRef<const uint8_t>(buffer)); in TEST_F() [all …]
|
/art/test/2036-jni-filechannel/ |
D | jni_filechannel.cc | 22 jobject buffer, in Java_Main_checkBufferCapacity() argument 24 jlong capacity = env->GetDirectBufferCapacity(buffer); in Java_Main_checkBufferCapacity()
|
/art/test/2040-huge-native-alloc/src/ |
D | Main.java | 31 private ByteBuffer buffer; field in Main.BufferHolder 34 buffer = getHugeNativeBuffer(); in BufferHolder() 40 deleteHugeNativeBuffer(buffer); in finalize() 41 buffer = null; in finalize()
|
/art/libelffile/dwarf/ |
D | expression.h | 114 explicit Expression(std::vector<uint8_t>* buffer) : Writer<>(buffer) { in Expression() argument 115 buffer->clear(); in Expression()
|