/art/test/580-crc32/src/ |
D | Main.java | 157 private static long CRC32ByteArray(byte[] bytes, int off, int len) { in CRC32ByteArray() argument 159 crc32.update(bytes, off, len); in CRC32ByteArray() 165 private static long CRC32ByteArray(byte[] bytes) { in CRC32ByteArray() argument 167 crc32.update(bytes); in CRC32ByteArray() 171 private static long CRC32ByteAndByteArray(int value, byte[] bytes) { in CRC32ByteAndByteArray() argument 174 crc32.update(bytes); in CRC32ByteAndByteArray() 178 private static long CRC32ByteArrayAndByte(byte[] bytes, int value) { in CRC32ByteArrayAndByte() argument 180 crc32.update(bytes); in CRC32ByteArrayAndByte() 185 private static boolean CRC32ByteArrayThrowsAIOOBE(byte[] bytes, int off, int len) { in CRC32ByteArrayThrowsAIOOBE() argument 188 crc32.update(bytes, off, len); in CRC32ByteArrayThrowsAIOOBE() [all …]
|
/art/libartbase/base/ |
D | endian_utils.h | 27 inline void AppendBytes(std::vector<uint8_t>& bytes, T data) { in AppendBytes() argument 28 size_t size = bytes.size(); in AppendBytes() 29 bytes.resize(size + sizeof(T)); in AppendBytes() 30 memcpy(bytes.data() + size, &data, sizeof(T)); in AppendBytes() 33 inline void Append1BE(std::vector<uint8_t>& bytes, uint8_t value) { in Append1BE() argument 34 bytes.push_back(value); in Append1BE() 37 inline void Append2BE(std::vector<uint8_t>& bytes, uint16_t value) { in Append2BE() argument 38 AppendBytes<uint16_t>(bytes, htobe16(value)); in Append2BE() 41 inline void Append4BE(std::vector<uint8_t>& bytes, uint32_t value) { in Append4BE() argument 42 AppendBytes<uint32_t>(bytes, htobe32(value)); in Append4BE() [all …]
|
D | arena_allocator.cc | 114 void ArenaAllocatorStatsImpl<kCount>::RecordAlloc(size_t bytes, ArenaAllocKind kind) { in RecordAlloc() argument 115 alloc_stats_[kind] += bytes; in RecordAlloc() 223 void* ArenaAllocator::AllocWithMemoryTool(size_t bytes, ArenaAllocKind kind) { in AllocWithMemoryTool() argument 227 size_t rounded_bytes = RoundUp(bytes + kMemoryToolRedZoneBytes, 8); in AllocWithMemoryTool() 236 MEMORY_TOOL_MAKE_DEFINED(ret, bytes); in AllocWithMemoryTool() 238 DCHECK(std::all_of(ret, ret + bytes, [](uint8_t val) { return val == 0u; })); in AllocWithMemoryTool() 242 void* ArenaAllocator::AllocWithMemoryToolAlign16(size_t bytes, ArenaAllocKind kind) { in AllocWithMemoryToolAlign16() argument 246 size_t rounded_bytes = bytes + kMemoryToolRedZoneBytes; in AllocWithMemoryToolAlign16() 260 MEMORY_TOOL_MAKE_DEFINED(ret, bytes); in AllocWithMemoryToolAlign16() 262 DCHECK(std::all_of(ret, ret + bytes, [](uint8_t val) { return val == 0u; })); in AllocWithMemoryToolAlign16() [all …]
|
D | arena_allocator.h | 122 void RecordAlloc(size_t bytes ATTRIBUTE_UNUSED, ArenaAllocKind kind ATTRIBUTE_UNUSED) {} in RecordAlloc() 138 void RecordAlloc(size_t bytes, ArenaAllocKind kind); 268 void* Alloc(size_t bytes, ArenaAllocKind kind = kArenaAllocMisc) ALWAYS_INLINE { 270 return AllocWithMemoryTool(bytes, kind); 272 bytes = RoundUp(bytes, kAlignment); 273 ArenaAllocatorStats::RecordAlloc(bytes, kind); 274 if (UNLIKELY(bytes > static_cast<size_t>(end_ - ptr_))) { 275 return AllocFromNewArena(bytes); 279 ptr_ += bytes; 284 void* AllocAlign16(size_t bytes, ArenaAllocKind kind = kArenaAllocMisc) ALWAYS_INLINE { [all …]
|
D | scoped_arena_allocator.h | 97 void* Alloc(size_t bytes, ArenaAllocKind kind) ALWAYS_INLINE { in Alloc() argument 99 return AllocWithMemoryTool(bytes, kind); in Alloc() 102 size_t rounded_bytes = RoundUp(bytes + (kIsDebugBuild ? kAlignment : 0u), kAlignment); in Alloc() 107 CurrentStats()->RecordAlloc(bytes, kind); in Alloc() 119 void* AllocWithMemoryTool(size_t bytes, ArenaAllocKind kind); 153 void* Alloc(size_t bytes, ArenaAllocKind kind = kArenaAllocMisc) ALWAYS_INLINE { 155 return arena_stack_->Alloc(bytes, kind);
|
D | allocator.h | 88 inline void RegisterAllocation(AllocatorTag tag, size_t bytes) { in RegisterAllocation() argument 89 g_total_bytes_used[tag].fetch_add(bytes, std::memory_order_relaxed); in RegisterAllocation() 90 size_t new_bytes = g_bytes_used[tag].fetch_add(bytes, std::memory_order_relaxed) + bytes; in RegisterAllocation() 98 inline void RegisterFree(AllocatorTag tag, size_t bytes) { in RegisterFree() argument 99 g_bytes_used[tag].fetch_sub(bytes, std::memory_order_relaxed); in RegisterFree()
|
/art/runtime/native/ |
D | org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc | 179 std::vector<uint8_t>& bytes = *reinterpret_cast<std::vector<uint8_t>*>(context); in ThreadStatsGetterCallback() local 180 Append4BE(bytes, t->GetThreadId()); in ThreadStatsGetterCallback() 181 Append1BE(bytes, ToJdwpThreadStatus(t->GetState())); in ThreadStatsGetterCallback() 182 Append4BE(bytes, t->GetTid()); in ThreadStatsGetterCallback() 183 Append4BE(bytes, utime); in ThreadStatsGetterCallback() 184 Append4BE(bytes, stime); in ThreadStatsGetterCallback() 185 Append1BE(bytes, t->IsDaemon()); in ThreadStatsGetterCallback() 189 std::vector<uint8_t> bytes; in DdmVmInternal_getThreadStats() local 198 Append1BE(bytes, kThstHeaderLen); in DdmVmInternal_getThreadStats() 199 Append1BE(bytes, kThstBytesPerEntry); in DdmVmInternal_getThreadStats() [all …]
|
D | libcore_util_CharsetUtils.cc | 35 ScopedByteArrayRO bytes(env, javaBytes); in CharsetUtils_asciiBytesToChars() local 36 if (bytes.get() == nullptr) { in CharsetUtils_asciiBytesToChars() 44 const jbyte* src = &bytes[offset]; in CharsetUtils_asciiBytesToChars() 55 ScopedByteArrayRO bytes(env, javaBytes); in CharsetUtils_isoLatin1BytesToChars() local 56 if (bytes.get() == nullptr) { in CharsetUtils_isoLatin1BytesToChars() 64 const jbyte* src = &bytes[offset]; in CharsetUtils_isoLatin1BytesToChars()
|
/art/test/102-concurrent-gc/src/ |
D | Main.java | 24 public byte[] bytes; field in Main.ByteContainer 37 l[index].bytes = new byte[bufferSize]; in main() 57 byte[] temp = l[a].bytes; in main() 58 l[a].bytes = l[b].bytes; in main() 59 l[b].bytes = temp; in main()
|
/art/runtime/arch/x86_64/ |
D | memcmp16_x86_64.S | 701 jnc L(16bytes) 706 jnc L(16bytes) 711 jnc L(16bytes) 715 jmp L(16bytes) 720 jmp L(16bytes) 724 jmp L(16bytes) 728 jmp L(16bytes) 732 jmp L(16bytes) 736 jmp L(16bytes) 740 jmp L(16bytes) [all …]
|
/art/test/712-varhandle-invocations/src/ |
D | VarHandleBadCoordinateTests.java | 245 byte[] bytes = new byte[16]; in doTest() 247 vh.get(bytes, -1); in doTest() 252 vh.get(bytes, bytes.length); in doTest() 257 vh.get(bytes, Integer.MAX_VALUE - 1); in doTest() 262 vh.get(bytes, bytes.length - Integer.SIZE / 8 + 1); in doTest() 266 vh.get(bytes, bytes.length - Integer.SIZE / 8); in doTest() 287 byte[] bytes = new byte[33]; in doTest() 289 int alignedIndex = VarHandleUnitTestHelpers.alignedOffset_int(bytes, 0); in doTest() 293 vh.set(bytes, i, 380); in doTest() 294 vh.get(bytes, i); in doTest() [all …]
|
/art/test/605-new-string-from-bytes/ |
D | Android.bp | 3 // Build rules for ART run-test `605-new-string-from-bytes`. 16 name: "art-run-test-605-new-string-from-bytes", 21 ":art-run-test-605-new-string-from-bytes-expected-stdout", 22 ":art-run-test-605-new-string-from-bytes-expected-stderr", 28 name: "art-run-test-605-new-string-from-bytes-expected-stdout", 29 out: ["art-run-test-605-new-string-from-bytes-expected-stdout.txt"], 36 name: "art-run-test-605-new-string-from-bytes-expected-stderr", 37 out: ["art-run-test-605-new-string-from-bytes-expected-stderr.txt"],
|
/art/runtime/gc/collector/ |
D | object_byte_pair.h | 28 : objects(num_objects), bytes(num_bytes) {} in objects() 31 bytes += other.bytes; in Add() 37 int64_t bytes; member
|
D | iteration.h | 49 return freed_.bytes; in GetFreedBytes() 52 return freed_los_.bytes; in GetFreedLargeObjectBytes() 66 void SetScannedBytes(uint64_t bytes) { in SetScannedBytes() argument 67 bytes_scanned_ = bytes; in SetScannedBytes()
|
/art/runtime/ |
D | debugger.cc | 323 std::vector<uint8_t> bytes; in DdmSendThreadNotification() local 324 Append4BE(bytes, t->GetThreadId()); in DdmSendThreadNotification() 327 AppendUtf16CompressedBE(bytes, chars_compressed, char_count); in DdmSendThreadNotification() 329 AppendUtf16BE(bytes, chars, char_count); in DdmSendThreadNotification() 331 CHECK_EQ(bytes.size(), char_count*2 + sizeof(uint32_t)*2); in DdmSendThreadNotification() 332 cb->DdmPublishChunk(type, ArrayRef<const uint8_t>(bytes)); in DdmSendThreadNotification() 433 std::vector<uint8_t> bytes; in DdmSendHeapInfo() local 434 Append4BE(bytes, heap_count); in DdmSendHeapInfo() 435 Append4BE(bytes, 1); // Heap id (bogus; we only have one heap). in DdmSendHeapInfo() 436 Append8BE(bytes, MilliTime()); in DdmSendHeapInfo() [all …]
|
/art/test/407-arrays/src/ |
D | Main.java | 32 static void $opt$testReads(boolean[] bools, byte[] bytes, char[] chars, short[] shorts, in $opt$testReads() argument 38 assertEquals(0, bytes[0]); in $opt$testReads() 39 assertEquals(0, bytes[index]); in $opt$testReads() 63 static void $opt$testWrites(boolean[] bools, byte[] bytes, char[] chars, short[] shorts, in $opt$testWrites() argument 71 bytes[0] = -4; in $opt$testWrites() 72 assertEquals(-4, bytes[0]); in $opt$testWrites() 73 bytes[index] = -8; in $opt$testWrites() 74 assertEquals(-8, bytes[index]); in $opt$testWrites()
|
/art/runtime/arch/x86/ |
D | memcmp16_x86.S | 851 je L(8bytes) 853 je L(10bytes) 855 je L(12bytes) 856 jmp L(14bytes) 863 je L(16bytes) 865 je L(18bytes) 867 je L(20bytes) 868 jmp L(22bytes) 875 je L(24bytes) 877 je L(26bytes) [all …]
|
/art/test/1901-get-bytecodes/ |
D | bytecodes.cc | 57 jbyte* bytes = env->GetByteArrayElements(out, /* is_copy */ nullptr); in Java_art_Test1901_getBytecodes() local 58 memcpy(bytes, bytecodes, bytecodes_size); in Java_art_Test1901_getBytecodes() 59 env->ReleaseByteArrayElements(out, bytes, 0); in Java_art_Test1901_getBytecodes()
|
/art/runtime/gc/space/ |
D | region_space-inl.h | 128 uint64_t bytes = 0; in GetBytesAllocatedInternal() local 137 bytes += r->BytesAllocated(); in GetBytesAllocatedInternal() 141 bytes += r->BytesAllocated(); in GetBytesAllocatedInternal() 146 bytes += r->BytesAllocated(); in GetBytesAllocatedInternal() 151 bytes += r->BytesAllocated(); in GetBytesAllocatedInternal() 158 return bytes; in GetBytesAllocatedInternal() 163 uint64_t bytes = 0; in GetObjectsAllocatedInternal() local 172 bytes += r->ObjectsAllocated(); in GetObjectsAllocatedInternal() 176 bytes += r->ObjectsAllocated(); in GetObjectsAllocatedInternal() 181 bytes += r->ObjectsAllocated(); in GetObjectsAllocatedInternal() [all …]
|
D | bump_pointer_space.cc | 149 uint8_t* BumpPointerSpace::AllocBlock(size_t bytes) { in AllocBlock() argument 150 bytes = RoundUp(bytes, kAlignment); in AllocBlock() 155 AllocNonvirtualWithoutAccounting(bytes + sizeof(BlockHeader))); in AllocBlock() 158 header->size_ = bytes; // Write out the block header. in AllocBlock() 212 bool BumpPointerSpace::AllocNewTlab(Thread* self, size_t bytes) { in AllocNewTlab() argument 215 uint8_t* start = AllocBlock(bytes); in AllocNewTlab() 219 self->SetTlab(start, start + bytes, start + bytes); in AllocNewTlab()
|
/art/cmdline/ |
D | memory_representation.h | 34 static Memory<kDivisor> FromBytes(size_t bytes) { in FromBytes() 35 assert(bytes % kDivisor == 0); in FromBytes() 36 return Memory<kDivisor>(bytes); in FromBytes()
|
/art/test/003-omnibus-opcodes/src/ |
D | Array.java | 25 static void checkBytes(byte[] bytes) { in checkBytes() argument 26 Main.assertTrue(bytes[0] == 0); in checkBytes() 27 Main.assertTrue(bytes[1] == -1); in checkBytes() 28 Main.assertTrue(bytes[2] == -2); in checkBytes() 29 Main.assertTrue(bytes[3] == -3); in checkBytes() 30 Main.assertTrue(bytes[4] == -4); in checkBytes()
|
/art/odrefresh/ |
D | odr_fs_utils.h | 38 WARN_UNUSED bool GetFreeSpace(const std::string& path, uint64_t* bytes); 42 WARN_UNUSED bool GetUsedSpace(const std::string& dir_path, uint64_t* bytes);
|
D | odr_fs_utils.cc | 91 bool GetFreeSpace(const std::string& path, uint64_t* bytes) { in GetFreeSpace() argument 97 *bytes = sv.f_bfree * sv.f_bsize; in GetFreeSpace() 101 bool GetUsedSpace(const std::string& path, uint64_t* bytes) { in GetUsedSpace() argument 134 *bytes = file_bytes; in GetUsedSpace()
|
/art/test/580-checker-string-fact-intrinsics/src-art/ |
D | Main.java | 23 byte[] bytes = { 'f', 'o', 'o' }; in testNewStringFromBytes() 24 String s = StringFactory.newStringFromBytes(bytes, 0, 0, 3); in testNewStringFromBytes()
|